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

Switched to external mill-moduledefs dependency #2068

Merged
merged 4 commits into from
Oct 21, 2022

Conversation

lefou
Copy link
Member

@lefou lefou commented Oct 17, 2022

This is the second step of externalizing the moduledefs module.

The first step was to migrate the current moduledefs code into an external project mill-moduledefs.

This second step now removes the moduledefs local module and refactors the build setup to use the external one. In the external project, we split the shared code and the scalac plugin code into two modules, to respect the different use cases and technical requirements.

  • The new mill-moduledefs aritfact contains the traits and classes, which need to be on the classpath
  • The scalac-mill-moduledefs-plugin artifact contains the scalac plugin, which is distributed for the full compiler version and is only used at compile-time

The overall goal is, to develop and maintain both projects (Mill and mill-moduledefs) independently. It especially enables proper distribution of the compiler plugin for each full version of the Scala compiler. In addition, we can post-release the now independent mill-moduledefs project for newer Scala versions without bumping the version (if needed), so externally developed Mill plugin projects can safely use newer Scala versions without risking compiler issues.

Review by @lihaoyi

@lefou lefou marked this pull request as ready for review October 17, 2022 20:12
@@ -131,6 +131,9 @@ object Deps {
val lambdaTest = ivy"de.tototec:de.tobiasroeser.lambdatest:0.7.1"
val log4j2Core = ivy"org.apache.logging.log4j:log4j-core:2.18.0"
val osLib = ivy"com.lihaoyi::os-lib:0.8.1"
val millModuledefsVersion = "0.10.9-alpha-1"
Copy link
Member

Choose a reason for hiding this comment

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

Why are we using an alpha version?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's until we settle on this setup. There will be a stable release (0.10.9) once we do.

Currently (before this PR), Mill also contains a mill-moduledefs artifact, and we need to distinguish it from the other one. Hopefully, once we tag Mill 0.10.9, we can also release it as 0.10.9 without any collisions.

Also, Maven-compatible tools treat 0.10.9-alpha-1 as before 0.10.9, and the meaning of alpha in software development will make it semantically clear. Although in Mill, we used to treat a 0.10.9-1 as after 0.10.9.

@lefou lefou merged commit 3a6c33c into com-lihaoyi:main Oct 21, 2022
@lefou lefou added this to the after 0.10.8 milestone Oct 21, 2022
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.

Split out scalac compiler plugins
2 participants