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

Fix the scala-library dependency for (generic) platform modules #2739

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

lefou
Copy link
Member

@lefou lefou commented Sep 14, 2023

In Scala 3 modules, that also define a platform, the scala library is not correctly resolved.
The current implementation exists merely as a convenience for JS and Native modules. ScalaNativeModule already handles a correct scala library by overriding scalaLibraryIvyDeps. This pull request overrides the same in ScalaJSModule and removed the faulty platfrom dependency from ScalaModule.

E.g. imagine, someone tries to build a Mill plugin with Scala 3 (which is currently not supported) and sets the platform to _mill0.11, then you would run into the following issue:

object root extends ScalaModule {
  override def scalaVersion = "3.3.0"
  override def platformSuffix = "_mill0.11"
  // ..
}
>> mill ivyDepsTree
1 targets failed
resolvedIvyDeps
Resolution failed for 1 modules:
--------------------------------------------
  org.scala-lang:scala3-library_mill0.11_3:3.3.0
	not found: /Users/me/ivy2/local/org.scala-lang/scala3-library_mill0.11_3/3.3.0/ivys/ivy.xml
	not found: https://repo1.maven.org/maven2/org/scala-lang/scala3-library_mill0.11_3/3.3.0/scala3-library_mill0.11_3-3.3.0.pom

Copy link
Member

@lolgab lolgab left a comment

Choose a reason for hiding this comment

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

Thank you for the fix! ❤️

@lefou lefou marked this pull request as ready for review September 15, 2023 10:54
@lefou lefou merged commit 19625f5 into main Sep 15, 2023
37 checks passed
@lefou lefou deleted the fix-platform-for-scalalib branch September 15, 2023 10:59
@lefou lefou added this to the 0.11.3 milestone Sep 15, 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