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

Adjust codegen to allow custom mainargs.TokensReaders and exercise it via example tests for Bundle Libraries docs #3504

Merged
merged 9 commits into from
Sep 10, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Sep 10, 2024

  • 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 RootModules) no longer applies with the codegen-time RootModule unpacking

Fixes #2029
Fixes #2857

@lihaoyi lihaoyi merged commit 40b1920 into com-lihaoyi:main Sep 10, 2024
23 checks passed
@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