Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Read the Scala cross versions from travis file for checking the isLastScalaVersion #709

Conversation

fedefernandez
Copy link
Contributor

@fedefernandez fedefernandez commented Nov 13, 2017

This PR:

@fedefernandez fedefernandez force-pushed the ff-issue-649-compares-last-scala-version-suing-binary-version branch from 0a62f3c to 2cd61f6 Compare November 13, 2017 21:18
@@ -51,7 +51,7 @@ object libraries {
"doobie" -> "0.5.0-M9",
"embedded-redis" -> "0.6",
"export-hook" -> "1.2.0",
"finch" -> "0.16.0-M3",
"finch" -> "0.16.0-RC1",
Copy link
Member

Choose a reason for hiding this comment

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

M3 is more recent than RC1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, bad merge. Thanks for pointing out it.

case _ => None
}

crossV.lastOption.flatMap(majorMinorV).exists(_ == scalaBinaryV)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a chance that someone/we would build artifact(s) for multiple patch version?
2.12.1/2.12.2/2.12.3 ... Would sbt release run for each version, if labelled in travis.yml?

Does crossV/crossScalaVersions require any order of Scala versions? (lastOption)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it will run for each version, but we could put it in the docs. IMHO it's a minor drawback compared to the current issue but we can discuss it here.

Good point, I think I could add a sorted call before the lastOption to be sure we get the major version.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, having multiple patch versions seems like a very special case.

sorted sounds good 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now I'm thinking loudly, but, another approach could be to parse the Travis file. In that way we could know not only the major Scala version but also the major SBT version.

@fedefernandez fedefernandez force-pushed the ff-issue-649-compares-last-scala-version-suing-binary-version branch from 130745b to b8c408d Compare November 14, 2017 12:21
@fedefernandez
Copy link
Contributor Author

Ready for a review!

@fedefernandez fedefernandez changed the title Uses Scala Binary version for checking the isLastScalaVersion Read the Scala cross versions from travis file for checking the isLastScalaVersion Nov 14, 2017
val scalaV = extracted.get(scalaVersion)
val crossBuild = extracted.get(crossScalaVersions).toList
val orgBranch = extracted.get(orgCommitBranchSetting)
val baseDir = extracted.get(baseDirectory in LocalRootProject)
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, niche catch, I'll rename this to rootDir and use the rootDir here

@fedefernandez fedefernandez force-pushed the ff-issue-649-compares-last-scala-version-suing-binary-version branch from b215286 to 9efb2ef Compare November 15, 2017 08:09
@fedefernandez fedefernandez force-pushed the ff-issue-649-compares-last-scala-version-suing-binary-version branch from 9efb2ef to 003c6fe Compare November 15, 2017 08:21
@fedefernandez fedefernandez merged commit 445d486 into master Nov 15, 2017
@fedefernandez fedefernandez deleted the ff-issue-649-compares-last-scala-version-suing-binary-version branch November 15, 2017 08:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants