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

Scala 3 build.sc #2969

Closed
lolgab opened this issue Jan 13, 2024 · 3 comments
Closed

Scala 3 build.sc #2969

lolgab opened this issue Jan 13, 2024 · 3 comments
Labels
duplicate The issue is a duplicate of another one. Progress is tracked in another issue.

Comments

@lolgab
Copy link
Member

lolgab commented Jan 13, 2024

Mill is gaining adoption, but being a Scala 3 only build tool, would help it position itself as a next-generation build tool for Scala.

Sbt will be soon running on Scala 3, so it would be nice if Mill did the same.

If we want to avoid breaking changes, we cross-compile Mill to Scala 3 and let users decide which version they want to use, either via the meta-build, a config file or a directive (like //> using scala 3 from scala-cli).

@lihaoyi
Copy link
Member

lihaoyi commented Jan 13, 2024

I think a breaking change for Scala 3 is fine IMO. Trying to keep things cross-building adds considerable internal complexity, and giving the user a choice adds considerable user-facing complexity. We should just make the jump; maybe not immediately, but perhaps mid/late this year?

All of Mill's upstream Scala libraries are Scala 3 compatible, if I'm not mistaken. The normal code should be trivial to make cross-compatible (e.g. adding missing return type ascriptions for implicits), and the generated code should be similar (since it's just code). Most of the "heavy lifting" is already moved to T.workers that live in separate classloaders

So the main work seems to be (a) porting the Applicative task macros to Scala 3 and (b) porting the line number fixer plugin to Scala 3. Neither of them seems terribly difficult, though we would need someone familiar with Scala 3 metaprogramming for (a) and Scala 3 internals for (b).

@kubukoz
Copy link
Contributor

kubukoz commented Jan 26, 2024

All of Mill's upstream Scala libraries are Scala 3 compatible

Coursier will require a _2.13 prefix afaik, but it should be fine... I think.

@lihaoyi lihaoyi changed the title Scala 3 build.sc Scala 3 build.sc (1000USD Bounty) May 14, 2024
@lihaoyi lihaoyi changed the title Scala 3 build.sc (1000USD Bounty) Scala 3 build.sc May 14, 2024
@lihaoyi
Copy link
Member

lihaoyi commented May 14, 2024

Superseded by #3152

@lihaoyi lihaoyi closed this as completed May 14, 2024
@lefou lefou added the duplicate The issue is a duplicate of another one. Progress is tracked in another issue. label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate The issue is a duplicate of another one. Progress is tracked in another issue.
Projects
None yet
Development

No branches or pull requests

4 participants