-
Notifications
You must be signed in to change notification settings - Fork 17
add default versionScheme #111
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
Comments
Clarification: |
There's some documentation in https://www.scala-sbt.org/1.x/docs/Publishing.html#Version+scheme as well. Generally I'd recommend using |
@Sciss I've dragged my feet about responding to this because I'm somewhat reluctant to pile more stuff into sbt-scala-module unless it provides more value than just setting a setting that individual module maintainers could easily set themselves. the more settings come from sbt-scala-module, the more the individual module builds become mysterious things where you don't quite know what sbt-scala-module is or isn't giving you, unless you study it. and for another path towards the goal could be to open a ticket in every module requesting that the maintainer there set their should we actually enforce that all the modules follow the same scheme? again, I find it hard to have an opinion about that without auditing all the modules first to see where things stand, so we'd know how big a change it would be any other opinions on this...? @scala/maintainers note that I've expanded the @scala/maintainers membership to include even Lightbend and Scala Center folks who are the lead or co-lead maintainers of at least one repo, so we can @-mention the team and know we're reaching everyone with a personal stake in questions like these oh and cc @NthPortal who I just added to that team as well (since you seem to be be assuming de facto co-leadership over in scala-library-next) |
Hey, thanks for pinging me :) First, I’m really happy to see this discussion happening! Second, I’m very sorry for not having taken more time to document and advertise the use of I believe this setting is very important, and that all the libraries should be using it. As Eugene said, the recommended versioning scheme is |
Regarding @SethTisue 's concern; I don't see a problem, adding it individually to the module projects (e.g. scala-xml – which shows up mostly in my evicted warnings – swing etc.) |
I definitely think all modules ought to be on |
re: my concern about modules inadvertently getting a wrong default, I suppose I could add the default to the plugin, publish, wait for the Scala Steward PRs to roll in, and then comment on each one, "don't merge this without checking that the new setting it appropriate"... that kind of thing |
Here are the repos currently using sbt-scala-module according to https://github.com/search?l=&o=desc&p=1&q=sbt-scala-module+extension%3Asbt&s=indexed&type=Code
|
@SethTisue I understand your concern, and I agree that setting the Maybe it’s simpler to start with setting it manually in a couple of modules? A good candidate is scala-collection-compat, which is always in your classpath nowadays, and causes false warnings like this one:
|
now that https://www.scala-lang.org/blog/2021/02/16/preventing-version-conflicts-with-versionscheme.html has been published, we should reallllly make sure the modules declare a policy (whether it's through the plugin, or independently). I won't have time this week, but I should have time next week |
rather than address this in this plugin, I've opened tickets in the individual module repos. I'll tackle these myself:
and I leave these for volunteers: |
I've now done those four repos. |
It seems that modules should all follow the
<major>.<minor>.<patch>
scheme, instead of the<epoch>.<major>.<minor>
scheme used by normal Scala libraries. sbt when usingevicted
looks at the version scheme information of the library'spom
, defaulting to<epoch>.<major>.<minor>
when absent. Thus, we get evication warnings, for example, when scala-xml 1.2.0 and 1.3.0 are mixed, although it would be binary compatible?Therefore, I suggest to inject a default
versionScheme
to scala modules. This is supported since sbt 1.4. See also: sbt/sbt#5724As far as I see, the three allowed values are
"early-semver"
,"pvp"
, and"semver-spec"
, and the default would be"pvp"
. sbt has no information what these mean, but https://github.com/scalacenter/sbt-eviction-rules gives some clues:That would mean we should use
always
? It's quite confusing, I don't see how compatibility witihin0.x.y.
is assumed. Perhaps we're doing it wrong for modules altogether and should use pvp instead?The text was updated successfully, but these errors were encountered: