Skip to content
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

Downgrade to SBT 1.2.8 #8

Merged
merged 1 commit into from
Oct 1, 2022
Merged

Downgrade to SBT 1.2.8 #8

merged 1 commit into from
Oct 1, 2022

Conversation

nrinaudo
Copy link

This is necessary to be compatible with a few important SBT plugins, such as sbt-scalafmt.

Note that, in order for this to work, I had to:

  • drop the sbt-vspp dependency: there is no 1.2.8 compatible version. This will need to be re-enabled as soon as possible.
  • downgrade the release plugins significantly. I couldn't test these and have no idea whether that broke the release process.

Other than that, all tests pass.

@@ -11,8 +11,6 @@ scriptedLaunchOpts := {

scriptedBufferLog := false

Global / onChangedBuildSource := ReloadOnSourceChanges
Copy link
Author

Choose a reason for hiding this comment

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

Not supported in 1.2.8.

@@ -1,5 +1,5 @@
addSbtPlugin("com.scalawilliam.esbeetee" % "sbt-vspp" % "0.4.11")
//addSbtPlugin("com.scalawilliam.esbeetee" % "sbt-vspp" % "0.4.11")
Copy link
Author

Choose a reason for hiding this comment

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

If there was an SBT 1.2.8-compatible version, I wouldn't be doing this in the first place :)

You'll need to publish an 1.2.8-compatible version and re-enable that dependency.

@ScalaWilliam ScalaWilliam merged commit 8e52654 into esbeetee:main Oct 1, 2022
@ckipp01
Copy link

ckipp01 commented Nov 14, 2022

@nrinaudo is sbt-scalafmt the only plugin you hit on that had issues with this?

@nrinaudo
Copy link
Author

Oh no. Every single SBT plugin has this issue. It's mildly dreadful.

@nrinaudo
Copy link
Author

Hang on, which issue are we talking about here?

  • SBT plugins being impossible to use because they use non-standard naming conventions? Then yes, every single plugin.
  • issues with some plugins being "stuck" on 1.2.8 for compatibility reason? sbt-scalafmt is the only one we've encountered that I know of

@ckipp01
Copy link

ckipp01 commented Nov 14, 2022

issues with some plugins being "stuck" on 1.2.8 for compatibility reason? sbt-scalafmt is the only one we've encountered that I know of

Yup, this is what I was referring to. I'm trying to figure out if we need to care about compat or can just bump to > 1.3.0 to make life easier for everyone.

@bjaglin
Copy link

bjaglin commented Nov 14, 2022

I'm trying to figure out if we need to care about compat or can just bump to > 1.3.0 to make life easier for everyone.

You can use a recent version of sbt to build sbt-scalafmt, but compile it against an old sbt version for maximum compatibility. From sbt/sbt#5049:

pluginCrossBuild / sbtVersion := "1.2.8"

@ScalaWilliam
Copy link
Contributor

@ckipp01 @nrinaudo yes sbt-scalafmt is the only one so far.

@bjaglin that's a very cool trick, did not know, thanks for sharing!

I don't recall the exact issue, but given the recent CVE everyone should get onto 1.8.x. The fix might've been easy but I rather not scare plugin maintainers with having to make more than 1 change, and prefer compatibility with older versions where possible. (e.g. potential questions like "why do we need to upgrade to 1.7.x? does this mean my plugin will not work for those on 1.6.x?")

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.

4 participants