mill icon indicating copy to clipboard operation
mill copied to clipboard

Evaluator API Commands Example doc

Open c0d33ngr opened this issue 6 months ago • 5 comments

To close #4598

c0d33ngr avatar May 27 '25 05:05 c0d33ngr

This isn't really a good example showing off the Evaluator API. There is too much code unrelated to Evaluator and it doesn't explain or highlight what is interesting about the APIs that Evaluator exposes to users

lihaoyi avatar May 30 '25 07:05 lihaoyi

This isn't really a good example showing off the Evaluator API. There is too much code unrelated to Evaluator and it doesn't explain or highlight what is interesting about the APIs that Evaluator exposes to users

Thank you for the feedback.

Is it this style of writing the example doc for Evaluator API as is in mill built-in command here you was expecting?

How I understand the issue description was to use the mentioned Evaluator commands to do something and then explain what each commands do in the sample project.

c0d33ngr avatar May 30 '25 18:05 c0d33ngr

The basic requirement is to clearly explain what the different APIs on the Evaluator object are useful for and how to use them. How you do so doesn't really matter, but the current PR does not successfully achieve that goal

lihaoyi avatar May 30 '25 19:05 lihaoyi

What do you think of the updated doc?

c0d33ngr avatar Jun 02 '25 17:06 c0d33ngr

Looking through the examples, they are not sufficiently motivated to serve as useful explanations or examples to users. I think. And the evaluator.adoc is just a rehash of Scaladoc and type signatures and is similarly unhelpful

lihaoyi avatar Jun 09 '25 03:06 lihaoyi

I made some updates

1-depmapper example: It demonstrates a depMapper task command which uses the Evaluator API to resolve and execute tasks such as mvnDeps, test.mvnDeps, and allSourceFiles to generate a "Dependency Users Report" of source files

2-unreferencedfiles example: Here, an unreferencedFiles task command uses the Evaluator API to resolve, plan, and later evaluate to determine "known sources."

I can make more iterations if they're fit to be in the documentation

c0d33ngr avatar Jul 16 '25 13:07 c0d33ngr