Reputation: 3320
For sbt 0.13, we publish sbt plugins that are versioned 0.13, and for sbt 1.0.x, we published sbt plugins that are versioned 1.0. However, for sbt 1.1.x, it seems like we publish sbt plugins that are versioned 1.0 too. For example, the latest sbt-site is published with a 1.1.x version, but it only publishes 0.13 and 1.0 versions. How does sbt plugin versioning work for sbt 1.x.x?
Upvotes: 1
Views: 307
Reputation: 22085
Versioning sbt plugins for sbt 1.x as 1.0 was a mistake. The versioning should have been 1 instead, since the sbt 1.x series are guaranteed to stay backward binary compatible.
See this issue in the sbt repository: https://github.com/sbt/sbt/issues/3858
This means that for all practical (and theoretical) purposes, when you read 1.0 in an sbt plugin version scheme you should think 1 instead (or 1.x if you prefer).
Upvotes: 2
Reputation: 27535
Before 1.0 versioning API was not guaranteed to be stable (within major version). sbt iterated on minor version, so between 0.12, and 0.13 lines there could be breaking changes - though developers tries to avoid them if they didn't bring any value to the table, and within minor version line (e.g. 0.13.0, 0.13.1, 0.13.2, ... 0.13.15) they did their best to don't break changes.
0.13.x line was actually kind of stable - most of the time you could upgrade thing without much issues, and (I might be wrong here but) usually any braking changed were either bugs, or fixes to invalid behavior.
1.0 broke compatibility with 0.13. The biggest one was change from Scala 2.10 to Scala 2.12. Since it was deemed actual, mature release, authors could commit and guarantee backward compatibility within major version, so plugins written for 1.0 will work with 1.1, 1.2 etc. One exception I remember is addition of unified slash syntax in 1.1.2 - if you use in your build or plugin it you force usage of sbt at at least 1.1.2. Other than that I cannot remember anything big.
Since the change from 0.13 to 1.0 is quite a big one for community (basically each plugin need to either be migrated and/or cross compiled), some people might stay for a while on 0.13 line. That's the main reason why it is still supported.
For any practical purpose I would assume that right now you can publish and use any plugin intended for 0.13 with latest 0.13 versions, and any plugin published for 1.0 (that do not use unified slash syntax) to be usable by any 1.0 version: 1.0.x, 1.1.x, 1.2.x, ...
Upvotes: 2