Skip to content

Declare versionScheme #93

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ lazy val scalaLibraryNext = crossProject(JVMPlatform, JSPlatform)
.jsEnablePlugins(ScalaJSJUnitPlugin)
.settings(
ScalaModulePlugin.scalaModuleSettings,
versionPolicyIntention := Compatibility.None, // TODO Change to `Compatibility.BinaryAndSourceCompatible` after the first release
Copy link
Contributor

Choose a reason for hiding this comment

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

we're committing to source compatibility? that seems... unusual

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We relax the compatibility guarantees according to our needs. In the case of scala-library-next, we never want break the binary compatibility, so we will be using Compatibility.BinaryAndSourceCompatible between patch releases, and Compatibility.BinaryCompatible between minor releases.

Copy link
Member

Choose a reason for hiding this comment

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

see scalacenter/sbt-version-policy#71 for discussion on what "source compatibility" even means in this context

Copy link
Contributor

Choose a reason for hiding this comment

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

are we using BinaryAndSourceCompatible as a proxy for forward and backward binary compatibility here? this seems like we've gone in a very confusing circle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

are we using BinaryAndSourceCompatible as a proxy for forward and backward binary compatibility here?

No. I am sorry if this is confusing, but we are using BinaryAndSourceCompatible between patch releases (which are expected to be both binary and source compatible with previous releases), and we use BinaryCompatible only between minor releases (which are expected to be binary compatible with previous releases). Does that make sense? I don’t understand what is problematic here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't think we committed to strict source compatibility between patch releases is all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@NthPortal Yeah, according to the recommended versioning scheme, patch releases must not break compilation (in addition to being binary compatible with the previous patch releases), so they must be source compatible.

scalaModuleMimaPreviousVersion := None,
scalacOptions ++= Seq("-deprecation", "-feature", "-Werror"),
libraryDependencies ++= Seq(
Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?"
tagPat="^v$verPat(#.*)?$"

if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then
versionCheckTask="versionCheck"
releaseTask="ci-release"
if ! isReleaseJob; then
echo "Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION"
Expand All @@ -50,4 +51,4 @@ export CI_SNAPSHOT_RELEASE="${projectPrefix}publish"
# for now, until we're confident in the new release scripts, just close the staging repo.
export CI_SONATYPE_RELEASE="; sonatypePrepare; sonatypeBundleUpload; sonatypeClose"

sbt clean ${projectPrefix}test ${projectPrefix}publishLocal $releaseTask
sbt clean ${projectPrefix}test versionPolicyCheck ${projectPrefix}publishLocal $versionCheckTask $releaseTask
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.2.4")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.6.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")
addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.1")