Skip to content

Conversation

@majk-p
Copy link
Contributor

@majk-p majk-p commented Sep 27, 2024

Solution

This PR resolves #30 by throwing error when libraryDependencies are overridden instead of silently proceeding.

Review guidelines

Since sbt tasks are not allowed to override setting values we can't recover from that otherwise. Those changes are done in 4462537 (#32)

To make that work I adjusted the build so that you can work on it with modern IDE. This required dropping support for sbt 0.13 that is long unsupported anyway as well as updating native-packager dependency to a recent one. The later has changed it's publish namespace from com.typesafe.sbt to com.github.sbt since 1.9.x

Followup changes

This PR doesn't rewrite the build.sbt in tests, which still use the old sbt syntax. I decided to keep them as they are to avoid even more bloated PR, IMO it's better to clean that up in a followup PR.

build.sbt Outdated

// sbt cross build
crossSbtVersions := Seq("0.13.18", "1.2.8")
crossSbtVersions := Seq("1.2.8")
Copy link

Choose a reason for hiding this comment

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

suggestion: bump this and you probably won't have to set build.properties in all the tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch!

Copy link
Member

Choose a reason for hiding this comment

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

Likely on old sbt versions to make sure it's compatible since that version, and doesn't depend on anything from newer sbt versions. But should be no problem to just bump to latest now.

@majk-p majk-p force-pushed the libraryDependencies-override branch from 6f6daad to fb9ce92 Compare September 30, 2024 14:31
Copy link
Member

@pvlugter pvlugter left a comment

Choose a reason for hiding this comment

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

Yes, fine to bring this all up to date.

Let's make the next release of this plugin at least a minor version bump.

@pvlugter pvlugter merged commit 17bd3f6 into sbt:master Sep 30, 2024
@majk-p majk-p mentioned this pull request Oct 2, 2024
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.

Agent not added when using libraryDependencies :=

3 participants