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

1.3.1 breaks compatibility with SBT 1.2.8 #87

Closed
nigredo-tori opened this issue Oct 4, 2019 · 4 comments
Closed

1.3.1 breaks compatibility with SBT 1.2.8 #87

nigredo-tori opened this issue Oct 4, 2019 · 4 comments
Labels

Comments

@nigredo-tori
Copy link
Contributor

nigredo-tori commented Oct 4, 2019

Describe the bug

After updating from 1.3.0 to 1.3.1 I get a NoSuchMethodError when running dependencyCheck.

Version of sbt-dependency-check used

The problem occurs using version 1.3.1 of the the plugin.

Log file

https://gist.github.com/nigredo-tori/b09e66fda6d1f040da6d5e796906cfd3

To Reproduce

  1. Create a build with SBT 1.2.8 and sbt-dependency-check 1.3.1
  2. Run dependencyCheck.

Expected behavior

dependencyCheck works as intended.

Additional context

It's probably not a good idea to build for the latest SBT version. These are, in general, backward compatible, but not forward compatible. We don't want to accidentally use an API that was not present in the previous versions (like we did here), so we should revert crossSbtVersions to Vector("0.13.18", "1.2.8").

@albuch
Copy link
Owner

albuch commented Oct 4, 2019

Hi @nigredo-tori,
good catch, the scripted plugin that I'm using for tests does not catch this type of incompatibility as you can see in the latest build that succeeds for sbt 1.2.8: https://travis-ci.org/albuch/sbt-dependency-check/builds/593451231
However I don't think that you described the aimed compatibility for sbt correctly. They explicitly aim for forward compatibility for sbt plugins as you can see by the release of sbt 1.2.1 that fixed such an incompatibility.
I'll double check with the sbt folks what the expected behaviour would be in this case.

In the meantime I would recommend to either use sbt-dependency-check v1.3.0 or upgrade your project to sbt v1.3.x.

@nigredo-tori
Copy link
Contributor Author

good catch, the scripted plugin that I'm using for tests does not catch this type of incompatibility as you can see in the latest build that succeeds for sbt 1.2.8

The problem here seems to be that you build for, and test on, the same SBT version. So you effectively check that your plugin builds for 1.2.8, and then check that artifact against 1.2.8. You won't catch any bincompat issues this way.

A proper way to do this would be to build for whatever version you build your published artifact against, and test against different SBT versions. So instead of ^^ $SBT_VERSION you should somehow put sbt.version = $SBT_VERSION to project/build.properties in your scripted test projects.

In the meantime I would recommend to either use sbt-dependency-check v1.3.0 or upgrade your project to sbt v1.3.x.

Yes, that's what I am doing right now.

@albuch
Copy link
Owner

albuch commented Oct 4, 2019

A proper way to do this would be to build for whatever version you build your published artifact against, and test against different SBT versions. So instead of ^^ $SBT_VERSION you should somehow put sbt.version = $SBT_VERSION to project/build.properties in your scripted test projects.

Yeah you're right, I need to set up a different test for that. However I will only do that if sbt decides that everything is working as expected. I obviously don't want to do the tests that sbt should do in the first place.

@albuch
Copy link
Owner

albuch commented Oct 6, 2019

Just released v1.3.3 that should address the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants