Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document command parameter handling with mainargs #2029

Closed
lefou opened this issue Sep 9, 2022 · 2 comments · Fixed by #3504
Closed

Document command parameter handling with mainargs #2029

lefou opened this issue Sep 9, 2022 · 2 comments · Fixed by #3504
Milestone

Comments

@lefou
Copy link
Member

lefou commented Sep 9, 2022

No description provided.

@lihaoyi
Copy link
Member

lihaoyi commented May 7, 2023

Is this just a matter of adding a link to https://github.com/com-lihaoyi/mainargs? The docs there are pretty comprehensive, except for mill-specific things like taking Task[_] or Evaluator

@lefou
Copy link
Member Author

lefou commented May 7, 2023

Yeah it's the link and about the Mill specifics.

  • Handling tasks (Task) vs. referencing tasks (Tasks) from the cli
  • How to evolve commands with args in a binary compatible way
  • Best practices: using an args case class vs. many separate args

lihaoyi added a commit that referenced this issue Sep 10, 2024
…it via example tests for `Bundle Libraries` docs (#3504)

* Includes a `mainargs.TokensReader[os.Path]` by default for
convenience, and added example tests for 4 of the listed bundled
libraries
* Removed the type parameter from `Discover[T]`, since it was not
necessary and only ever caused type inference problems
* Moved the `lazy val millDiscover = Discover[T]` call from the
`MillMiscInfo` object to the main body of the class containing user
code, so it can see anything the user writes in `build.mill`, including
`TokensReader` instances. The old reasoning for having it outside (that
we want it to propagate implicitly to be picked up by nested
`RootModule`s) no longer applies with the codegen-time `RootModule`
unpacking

Fixes #2029
Fixes #2857
@lefou lefou added this to the 0.12.0 milestone Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants