Bump jgit version#2401
Conversation
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" |
There was a problem hiding this comment.
I think this was to support JDK 8, but we could run JDK 17 with the -release option.
There was a problem hiding this comment.
Looks like we would have drop JDK 17 altogether for sbt plugin. Maybe one of the newer 5 versions also support worktrees?
|
Not sure I follow. 7.0.0 is what introduced supposed for worktrees.
Release notes show it requires jdk17. Why do you say we’d have to drop 17
altogether?
…On Fri, Apr 3, 2026 at 11:00 AM Tomasz Godzik ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In project/Dependencies.scala
<#2401?email_source=notifications&email_token=AABKITCZZHFXSEXCFSVLXAL4T7GYLA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMBVGYYDMMJTGM42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K64DSL5ZGK5TJMV3V6Y3MNFRWW#discussion_r3033194406>
:
> @@ -22,7 +22,7 @@ object Dependencies {
val coursierInterfaceV = "1.0.28"
val commontTextV = "1.15.0"
val googleDiffV = "1.3.0"
- val jgitV = "5.13.5.202508271544-r"
+ val jgitV = "7.6.0.202603022253-r"
Looks like we would have drop JDK 17 altogether for sbt plugin. Maybe one
of the newer 5 versions also support worktrees?
—
Reply to this email directly, view it on GitHub
<#2401?email_source=notifications&email_token=AABKITBJJPSKZGTY34LZJFT4T7GYLA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTIMBVGYYDMMJTGM42M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2L24DSL5ZGK5TJMV3V63TPORUWM2LDMF2GS33OONPWG3DJMNVQ#discussion_r3033194406>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABKITBZX3JWFA64QWIVYHL4T7GYLAVCNFSM6AAAAACXL3WQQSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHM2DANJWGA3DCMZTHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Ach sorry, drop 8 to 11. We would have to switch to 17 |
|
Obviously your call but I’d be surprised if that change affected many
people. It’s easy enough bump your jdk for your ci.
…On Sun, Apr 5, 2026 at 2:48 PM Tomasz Godzik ***@***.***> wrote:
*tgodzik* left a comment (scalacenter/scalafix#2401)
<#2401 (comment)>
Ach sorry, drop 8 to 11. We would have to switch to 17
—
Reply to this email directly, view it on GitHub
<#2401 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABKITADCASPYR5JTJ5MAID4UKTANAVCNFSM6AAAAACXL3WQQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCOBZGM2DKNBVGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
@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" |
There was a problem hiding this comment.
independently of the current discussion, please remove
Lines 2 to 5 in dda28c7
|
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. |
|
Yes I encountered this as I started playing around with git worktree. Not
having the agents create them but I tend to juggle more PRs than usual and
have found them useful.
…On Mon, Apr 20, 2026 at 5:38 PM Brice Jaglin ***@***.***> wrote:
*bjaglin* left a comment (scalacenter/scalafix#2401)
<#2401?email_source=notifications&email_token=AABKITGUHXVDUFSNX7N5K7L4W2KFDA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMRYGQ2DKMRRGI22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4284452125>
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 for a
single command.
On the other hand, I know worktrees are common now with agents, so it
might deserve a minor, breaking-signaling release. @matthughes
<https://github.com/matthughes> is that your use-case? sbt-scalafix has
built-in caching so such invocations are not very useful.
—
Reply to this email directly, view it on GitHub
<#2401?email_source=notifications&email_token=AABKITGUHXVDUFSNX7N5K7L4W2KFDA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMRYGQ2DKMRRGI22M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4284452125>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABKITCPWHEZPQGQWTE2Z3T4W2KFDAVCNFSM6AAAAACXL3WQQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DEOBUGQ2TEMJSGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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 --diffbut that doesn't work when you're in a worktree. It doesn't think you're in a git repo.