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

Kill mill.modules package #2513

Merged
merged 7 commits into from
May 11, 2023
Merged

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented May 10, 2023

Ticks off #1826 (comment)

mill.modules is a very confusing name that I came up with very early in Mill's development. It misleadingly has nothing to do with mill.Module, and is just a grab bag of helpers. This PR moves them to the JVM packages which are most related to their functionality

We basically move the following files:

  1. mill.modules.Assembly -> mill.scalalib.Assembly
  2. mill.modules.Util -> mill.util.Util
  3. mill.modules.Jvm -> mill.util.Jvm
  4. mill.modules.CoursierSupport -> mill.util.CoursierSupport

There is probably further cleanup and re-organization we can do here. Currently, Util and Jvm are pretty tightly coupled together, with VisualizeModule living in main stopping us from moving them all to scalalib. An alternative is to move Assembly to mill.util, so at least createJar and createAssembly can live in the same package rather than being split across mill.{util,scalalib}.

But for now, just breaking up mill.modules should already be a step forward, and further cleanups can come in follow up PRs

@lihaoyi lihaoyi requested a review from lefou May 10, 2023 00:50
@lihaoyi lihaoyi marked this pull request as ready for review May 10, 2023 01:36
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, but we need some @deprecated type aliases and forwarder objects to keep source compatibility for a while. Migration and cross compilation is otherwise a pita and especially, when not the whole ecosystem is migrated, it's less attractive to try something out if there is no easy going back.

@lihaoyi
Copy link
Member Author

lihaoyi commented May 11, 2023

Added backwards compat forwarders. Needed to put them in scalalib/ even though they're in mill.main, due to Assembly being moved there

@lihaoyi lihaoyi requested a review from lefou May 11, 2023 03:56
@lihaoyi lihaoyi merged commit d1030f4 into com-lihaoyi:main May 11, 2023
@lefou lefou added this to the 0.11.0-M9 milestone May 11, 2023
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.

2 participants