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

Backwards compatablity #58

Closed
adoble opened this issue Sep 1, 2024 · 2 comments
Closed

Backwards compatablity #58

adoble opened this issue Sep 1, 2024 · 2 comments

Comments

@adoble
Copy link
Owner

adoble commented Sep 1, 2024

I am concerned that supporting backwards compatibility right back to Java 8 (see PR 53) will result in problems down the line (e.g. new functionality that uses other libraries, inability to use new features in Java that could lighten the coding workload). This was the reason for ADR 8.

However, as @wviana mentioned

Big enterprise projects using ADRs are probably not on the cutting edge java version.

So my proposal would be:

  • Use the the latest Java LTS version for development (as per ADR 8)
  • Provide backwards compatibly for two LTS versions before (e.g developed using Java 21, compatible with Java 11 - exactly as was done in PR 57)
  • The old compatibility version is signaled as being deprecated. In our current case this means that version 11 is shown as deprecated
  • Supersede ADR 8 to show this change.

Any thoughts on this?

@sdavids
Copy link
Contributor

sdavids commented Sep 1, 2024

See comments in 07e8a69.


I suggest:

Gradle build

current LTS

toolchainVersion=21

languageVersion = JavaLanguageVersion.of(21)

Sources

src/main: release = current LTS - 2

release = 11

src/test: release = current LTS

languageVersion = JavaLanguageVersion.of(21)

So basically the current setup.


When a new LTS drops the following lines have to be changed:

toolchainVersion=21

languageVersion = JavaLanguageVersion.of(21)

release = 11

The major version should be increased:

version = "3.3.1"

The changelog/release notes should say something along the lines:

We have dropped support for Java version 11; the new minimum JRE version is 17.

@adoble
Copy link
Owner Author

adoble commented Sep 2, 2024

Thanks for the review.

I've added some comments to the build script to highlight where things need to be changed and also created ADR 10 to cover binary compatibility.

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

2 participants