Skip to content

Split jvm-specific settings into scalaModuleSettingsJVM #27

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

Merged
merged 1 commit into from
Jul 7, 2017

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Jul 6, 2017

Move jvm-specific settings from scalaModuleSettings to a new
scalaModuleSettingsJVM setting. This means that JVM projects in
scala modules now have to add bot scalaModuleSettings and
scalaModuleSettingsJVM.

Adding sbt-osgi settings in a scala-js project caused the published
jar to be empty (scala/scala-parser-combinators#119).

Upgrades sbt-osgi to the latest version.

Also anticipates the new optimizer settings in 2.12.3
(scala/scala#5964).

val v = scalaVersion.value
val Some((2, maj)) = CrossVersion.partialVersion(v)
if (maj >= 12) {
if (v.startsWith("2.12.3")) Seq("-opt:l:inline", "-opt-inline-from", "scala.**")
Copy link
Member

Choose a reason for hiding this comment

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

That doesn't make any sense. What about 2.12.4?

Copy link
Member Author

Choose a reason for hiding this comment

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

haha, thanks.

@lrytz lrytz force-pushed the sbt-osgi-0.9.1 branch from 0928a5d to 29a82ff Compare July 6, 2017 11:19
Move jvm-specific settings from scalaModuleSettings to a new
scalaModuleSettingsJVM setting. This means that JVM projects in
scala modules now have to add bot `scalaModuleSettings` and
`scalaModuleSettingsJVM`.

Adding sbt-osgi settings in a scala-js project caused the published
jar to be empty (scala/scala-parser-combinators#119).

Upgrades sbt-osgi to the latest version.

Also anticipates the new optimizer settings in 2.12.3
(scala/scala#5964).
@lrytz lrytz force-pushed the sbt-osgi-0.9.1 branch from 29a82ff to a3b5676 Compare July 7, 2017 13:20
@lrytz lrytz merged commit 74b093e into scala:master Jul 7, 2017
)

lazy val scalaModuleSettingsJVM: Seq[Setting[_]] = Seq(
mimaPreviousVersion := None
) ++ mimaSettings ++ scalaModuleOsgiSettings
Copy link
Member

Choose a reason for hiding this comment

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

Hum I just realized that this means you've deactivated MiMa for Scala.js, doesn't it?

Scala.js artifacts can very well be checked by MiMa, and should be. We have an (almost) guarantee that "JVM binary compatible" implies "SJSIR binary compatible". So if MiMa says OK for the .class files in a Scala.js artifact, it also means OK for the .sjsir files. It's very useful. We check our own artifacts with MiMa.

Copy link
Member Author

@lrytz lrytz Jul 7, 2017

Choose a reason for hiding this comment

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

Ah, good to know. I thought that MiMa probably doesn't support scala-js jars because it was already deactivated for Scala.js in the build, as the "previous version" is only set for the JVM project (https://github.com/scala/scala-parser-combinators/blob/1.0.x/build.sbt#L62-L64).

I guess the additional value is to also test classfiles compiled from platform-specific sources?

Copy link
Member Author

Choose a reason for hiding this comment

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

In fact, running MiMa would have probably caught scala/scala-parser-combinators#119 :-)

Copy link
Member

Choose a reason for hiding this comment

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

I guess the additional value is to also test classfiles compiled from platform-specific sources?

Yes indeed.

In fact, running MiMa would have probably caught scala/scala-parser-combinators#119 :-)

Ah ah, probably!

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