Skip to content

Bump jgit version#2401

Open
matthughes wants to merge 1 commit intoscalacenter:mainfrom
matthughes:patch-1
Open

Bump jgit version#2401
matthughes wants to merge 1 commit intoscalacenter:mainfrom
matthughes:patch-1

Conversation

@matthughes
Copy link
Copy Markdown

In 7.0.0, jgit started supporting git work trees. I've been using this workflow a lot lately and am used to relying on scalafix --diff but that doesn't work when you're in a worktree. It doesn't think you're in a git repo.

In 7.0.0, jgit started supporting git work trees.  I've been using this workflow a lot lately and am used to relying on `scalafix --diff` but that doesn't work when you're in a worktree.  It doesn't think you're in a git repo.
val commontTextV = "1.15.0"
val googleDiffV = "1.3.0"
val jgitV = "5.13.5.202508271544-r"
val jgitV = "7.6.0.202603022253-r"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this was to support JDK 8, but we could run JDK 17 with the -release option.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like we would have drop JDK 17 altogether for sbt plugin. Maybe one of the newer 5 versions also support worktrees?

@matthughes
Copy link
Copy Markdown
Author

matthughes commented Apr 3, 2026 via email

@tgodzik
Copy link
Copy Markdown
Contributor

tgodzik commented Apr 5, 2026

Ach sorry, drop 8 to 11. We would have to switch to 17

@matthughes
Copy link
Copy Markdown
Author

matthughes commented Apr 6, 2026 via email

@tgodzik
Copy link
Copy Markdown
Contributor

tgodzik commented Apr 7, 2026

@bjaglin what do you think, is it the time to drop JDKs pre 17?

@bjaglin
Copy link
Copy Markdown
Collaborator

bjaglin commented Apr 7, 2026

@bjaglin what do you think, is it the time to drop JDKs pre 17?

I was hoping to coordinate the next minor / breaking scalafix/sbt-scalafix release with #2041, so I'd rather wait a little bit.

However, what we can do without breaking compatibility is bump jgit to 7.x only for the scalafix-cli 3.8.x which already targets JDK17 (since it requires the presentation compiler that itself targets JDK17). @matthughes would that be a good first step / workaround for your use-case?

val commontTextV = "1.15.0"
val googleDiffV = "1.3.0"
val jgitV = "5.13.5.202508271544-r"
val jgitV = "7.6.0.202603022253-r"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

independently of the current discussion, please remove

updates.pin = [
# JGit 6.x requires Java 11, see https://www.eclipse.org/lists/cross-project-issues-dev/msg18654.html
{ groupId = "org.eclipse.jgit", artifactId = "org.eclipse.jgit", version = "5." },
]
to keep upgrading that in the future

@bjaglin
Copy link
Copy Markdown
Collaborator

bjaglin commented Apr 20, 2026

I'll tag a release in a couple of weeks when Scala 3.8.4 comes out, until then we can discuss if it's worth breaking bytecode compatibility to improve compatibility for a single command.

I know worktrees are common now with agents, so it might deserve a minor, breaking-signaling release. @matthughes is that your use-case? sbt-scalafix has built-in caching so such invocations are not very useful.

@matthughes
Copy link
Copy Markdown
Author

matthughes commented Apr 21, 2026 via email

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.

3 participants