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

Don't make ScalaModulePlugin.enableOptimizer fail on Scala3 #155

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

mdedetrich
Copy link
Contributor

If you use ScalaModulePlugin.enableOptimizer on a project which happens to compile for Scala3 then it fails to load the SBT project because it assumes you are only using Scala2, you end up getting the following error

[error] scala.MatchError: 3.2.0 (of class java.lang.String)
[error] 	at com.lightbend.tools.scalamoduleplugin.ScalaModulePlugin$.$anonfun$enableOptimizer$1(ScalaModulePlugin.scala:53)

The PR updates enableOptimizer so that it works with projects that target Scala3 (note that Scala3 does not yet have an inlining optimizer, this has been noted).

@SethTisue SethTisue requested a review from lrytz October 13, 2022 10:50
@SethTisue
Copy link
Member

ping @lrytz

@lrytz
Copy link
Member

lrytz commented Dec 7, 2022

Thanks @mdedetrich!

@lrytz lrytz merged commit 4a57142 into scala:main Dec 7, 2022
@mdedetrich mdedetrich deleted the dont-make-optimizer-fail-on-scala3 branch December 7, 2022 09:09
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.

3 participants