Skip to content
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

Require Java 11 #213

Open
raboof opened this issue Mar 11, 2022 · 6 comments
Open

Require Java 11 #213

raboof opened this issue Mar 11, 2022 · 6 comments

Comments

@raboof
Copy link
Collaborator

raboof commented Mar 11, 2022

Currently, upgrading JGit to version 6 is blocked because we still support Java 8 and they already require Java 11.

We should probably stick with Java 8 as long as (for example) typelevel projects like cats are still building on it (https://github.com/typelevel/cats/blob/main/build.sbt#L33), and consider updating after they do.

@colindean
Copy link

I just hit against this trying to resolve some vuln scanner warnings urging upgrade to jgit 6.6.1 minimally, but my own projects still require Java 8.

@raboof
Copy link
Collaborator Author

raboof commented Nov 30, 2023

Thanks for sharing - the fact that there are apparently now security advisories for the version of JGit we're depending on might be another reason to start requiring Java 11 in sbt-git, but since it is possible to avoid the library (via useReadableConsoleGit) perhaps we should still wait for typelevel.

OTOH, typelevel can stick to the currently-released version of sbt-git until they're requiring Java 11 as well.

@armanbilge
Copy link

Is the latest JGit binary-compatible with the version used in this plugin? i.e. can the user just upgrade the JGit version themselves by adding an explicit dependency, instead of doing the upgrade in sbt-git and forcing it on everyone?

@raboof
Copy link
Collaborator Author

raboof commented Nov 30, 2023

I have no idea, but since it's a major version change I presume not.

This also likely means sbt-git is now incompatible with any plugin that wants to use a recent version of JGit.

I'm in no rush to upgrade jgit, but if there's any strong reason to (e.g. when worktree support finally lands) I'd support it. Maybe we could still target jdk8 bytecode in sbt-git to leave some wiggle room for projects that are still built on JDK 8, but I don't think we should be going out of our way to support that - if all else fails they can just keep using the already-released versions.

@colindean
Copy link

I imagine it might take some work, but could sbt-git catch the jgit classloader exception and fall back to using the git executable?

I.e. fall back unless useJGit is true or useReadableConsoleGit is false?

@mkurz
Copy link
Member

mkurz commented Oct 7, 2024

JGit 7 out, requires Java 17 😢 see #243 (comment)

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

No branches or pull requests

4 participants