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

Cleanup mill.define.Module and mill.define.Ctx #4518

Merged
merged 39 commits into from
Feb 10, 2025

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Feb 9, 2025

  • Bundle the necessary things we want to propagate together under Ctx.Nested, rather than passing a loose bunch of implicits. This reduces the amount of implicits we have flying around, and lets us easily mark fields on Ctx.Nested as private where possible so we can add or remove them

  • Standardize naming convention of module members as module*: moduleDirectChildren, moduleCtx, etc. Fixes Rename millSourcePath #4111 by renaming millSourcePath to moduleDir

  • Clean up mill.define.Ctx, removing a bunch of the special case semantics around RootModule/SubfolderModule

  • Add some basic unit tests in core/define/test/src/mill/define/ModuleTests.scala to assert on the module instantiation and context propagation, without the complexity of downstream tests in exec or resolve

  • Introduced mill.define.internal package, which is stuff in mill.define that isn't really intended for direct use. Some of it is private but needs to be in this module, some of it can't be private but isn't really meant to be used directly.

@lihaoyi lihaoyi marked this pull request as ready for review February 9, 2025 14:19
@lihaoyi lihaoyi changed the title Cleanup module implicit propagation Cleanup Module.scala Feb 9, 2025
@lihaoyi lihaoyi changed the title Cleanup Module.scala Cleanup mill.define.Module and mill.define.Ctx Feb 9, 2025
@lihaoyi lihaoyi merged commit 3a47816 into com-lihaoyi:main Feb 10, 2025
28 of 31 checks passed
@lefou lefou added this to the 0.13.0 milestone Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename millSourcePath
2 participants