Remove totally unnecessary transitive sbt-git dependency (!) - #471
Merged
Conversation
sbt-ci-release no longer uses sbt-git APIs. scmInfo is populated by shelling out to git directly, while versioning continues to come from sbt-dynver. Drop sbt-git from the published plugin dependency set and from the local meta-build. Update the README so users are not told that sbt-git is brought in transitively. Verified with: - sbt +test - sbt scalafmtSbtCheck +scalafmtCheckAll - sbt plugin/makePom
Member
Author
|
@eed3si9n If you could also tag a new release, that would be awesome, because that would solve many people's linked worktree problems (as sbt-dynver does not use sbt-git but shells out to the git command anyway) |
Member
Member
Author
|
Thanks! |
Member
|
Excellent catch!! |
jigarkhwar
added a commit
to galax-io/gatling-jdbc-plugin
that referenced
this pull request
Jul 12, 2026
sbt-ci-release 1.12.0 removed its bundled sbt-git dependency (sbt/sbt-ci-release#471), so GitVersioning used in build.sbt no longer resolves and project load fails (CI: 'not found: value GitVersioning'). Restore sbt-git 2.1.0 explicitly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jigarkhwar
added a commit
to galax-io/sbt-schema-registry-plugin
that referenced
this pull request
Jul 19, 2026
sbt-ci-release 1.12.0 no longer pulls in sbt-git (sbt/sbt-ci-release#471), but publish.sbt imports com.github.sbt.git.SbtGit. Declare sbt-git 2.1.0 directly to keep the build loading. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jigarkhwar
added a commit
to galax-io/sbt-schema-registry-plugin
that referenced
this pull request
Jul 19, 2026
* Update sbt-ci-release to 1.12.0 * fix: pin sbt-git explicitly sbt-ci-release 1.12.0 no longer pulls in sbt-git (sbt/sbt-ci-release#471), but publish.sbt imports com.github.sbt.git.SbtGit. Declare sbt-git 2.1.0 directly to keep the build loading. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: John Axe <jigarkhwar88@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
jigarkhwar
added a commit
to galax-io/gatling-amqp-plugin
that referenced
this pull request
Aug 9, 2026
sbt-ci-release 1.12.0 no longer depends on sbt-git (sbt/sbt-ci-release#471), so `GitVersioning` is unresolvable and project loading fails with "not found: value GitVersioning". Versioning already comes from sbt-dynver, which sbt-ci-release still bundles and which does not use sbt-git. Verified on a clean checkout of tag v1.3.3: `version` and `dynver` both resolve to 1.3.3, identical to the previous behaviour, and `scmInfo` still resolves via the git-ls-remote fallback. Dropping sbt-git also fixes the jgit NoWorkTreeException that made sbt unloadable from a linked git worktree. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jigarkhwar
added a commit
to galax-io/gatling-amqp-plugin
that referenced
this pull request
Aug 9, 2026
* Update sbt-ci-release to 1.12.0 * fix: drop GitVersioning after sbt-ci-release 1.12.0 removed sbt-git sbt-ci-release 1.12.0 no longer depends on sbt-git (sbt/sbt-ci-release#471), so `GitVersioning` is unresolvable and project loading fails with "not found: value GitVersioning". Versioning already comes from sbt-dynver, which sbt-ci-release still bundles and which does not use sbt-git. Verified on a clean checkout of tag v1.3.3: `version` and `dynver` both resolve to 1.3.3, identical to the previous behaviour, and `scmInfo` still resolves via the git-ls-remote fallback. Dropping sbt-git also fixes the jgit NoWorkTreeException that made sbt unloadable from a linked git worktree. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: John Axe <jigarkhwar88@gmail.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sbt-ci-release no longer uses sbt-git APIs directly. The
scmInfofallback shells out togit ls-remote --get-url origin, and versioning continues to come from sbt-dynver (which does NOT use sbt-git).This also removes sbt-git from the local meta-build and updates the README so users are not told that sbt-git is brought in transitively.
Note
Just having sbt-git on the classpath causes all those issues listed in sbt/sbt-git#382 when people are inside a linked worktree. Just having sbt-git on the plugin classpath is enough to activate its settings. Then its build settings evaluate Git metadata, including
ThisBuild / gitUncommittedChanges := gitReader.value.withGit(_.hasUncommittedChanges)With current released sbt-git/JGit 5, that read path uses JGit by default. In a linked worktree, JGit 5 cannot resolve the worktree correctly and throws:
NoWorkTreeException: Bare Repository has neither a working tree, nor an indexSo the chain is:
sbt-ci-release depends on sbt-git
-> sbt-git is on plugin classpath
-> GitPlugin auto-enables
-> gitUncommittedChanges gets evaluated during setting loading
-> JGit 5 status fails in linked worktree