Skip to content

Conversation

mdedetrich
Copy link
Contributor

@mdedetrich mdedetrich commented Feb 6, 2024

From https://docs.scala-lang.org/overviews/compiler-options/optimizer.html#in-brief

Don’t enable the optimizer during development: it breaks incremental compilation, and it makes the compiler slower. Only enable it for testing, on CI, and to build releases.

This PR makes it so that the Scala 2 optimizer is only enabled in CI since it causes issues when used in local development with additional logging to make it clear when its enabled.

Note That there is a presumption in that Scala modules that use this sbt-plugin do their releases in CI rather than a local machine. @SethTisue would be good to check if this is the case, if not then then let me know which Scala modules don't use CI for release and I can look into enabling it (I do think that by now all Scala modules should be creating release artifacts in CI).

@mdedetrich mdedetrich force-pushed the only-enable-optimizer-in-ci branch from d51829f to 0e55988 Compare February 6, 2024 01:49
@SethTisue SethTisue self-assigned this Feb 6, 2024
@SethTisue SethTisue removed their assignment Feb 14, 2024
@SethTisue
Copy link
Member

Note That there is a presumption in that Scala modules that use this sbt-plugin do their releases in CI rather than a local machine. @SethTisue would be good to check if this is the case

Confirmed, this is the case.

Let's find out what Mr. Optimizer himself, @lrytz, thinks about this PR

@SethTisue SethTisue requested a review from lrytz February 14, 2024 00:04
@SethTisue
Copy link
Member

@lrytz ping :-)

Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

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

LGTM, missed it... thanks for the ping.

@SethTisue
Copy link
Member

SethTisue commented Aug 14, 2024

Note That there is a presumption in that Scala modules that use this sbt-plugin do their releases in CI rather than a local machine

I've added a commit that adds a statement to this effect to the Scaladoc for the setting.

And yes, all the modules are currently released from CI using sbt-ci-release.

(And I think only scala-async actually enables the optimizer.)

@SethTisue SethTisue merged commit db7d705 into scala:main Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants