-
Notifications
You must be signed in to change notification settings - Fork 928
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
^compile does not resolve correct version of sbt plugin dependency (using addSbtPlugin) #3393
Comments
Yeah. Good issues, @jeffreyolchovy, thank you. |
this exact same problem can be observed in the recently released SBT 1.0.0, preventing cross compiling plugins that depend on other plugins (the exact same workaround suggested here fixes the error). Could be this ported to SBT 1.0.1? |
Is there a PR for this or a commit? |
Fix was merged to 0.13 branch - #3397 |
Due to sbt/sbt#3393, we cannot use `addSbtPlugin` because it is broken in 0.13.16 for cross-building scenarios. Instead, we inline the fixed definition that will be released in 0.13.17.
Due to sbt/sbt#3393, we cannot use `addSbtPlugin` because it is broken in 0.13.16 for cross-building scenarios. Instead, we inline the fixed definition that will be released in 0.13.17.
Due to sbt/sbt#3393, we cannot use `addSbtPlugin` because it is broken in 0.13.16 for cross-building scenarios. Instead, we inline the fixed definition that will be released in 0.13.17.
For those too impatient to wait for a new release: |
sbt/sbt#3393 has been fixed, so the workaround code should no longer be needed. the call to `update` in the workaround code is not dbuild-friendly (since it tries to retrieve dependencies during dependency extraction, before dbuild has had a chance to actually build the dependencies), so it's worth removing
Mostly to get the fix to sbt/sbt#3393.
steps
Given a build.sbt for an sbt plugin that needs to include another sbt plugin as a library dependency (e.g. we are creating an AutoPlugin which requires this other sbt plugin):
problem
When attempting to cross-build (
^compile
) this plugin for the given versions of sbt, the resolution for the plugin used as a dependency fails:expectation
I would expect
addSbtPlugin
to use the correct version of Scala, conditionally, for each version of sbt that it is attempting to compile against.notes
This can be worked around by replacing
addSbtPlugin
with the following:sbt version: 0.13.16, cross building for 0.13.16 and 1.0.0-RC3
The text was updated successfully, but these errors were encountered: