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

Set JDK21 as the baseline for the 3.0 major version #154

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [ 11, 17, 21 ]
java: [ 21 ]
if: github.repository == 'opensearch-project/custom-codecs'
runs-on: ubuntu-latest
container:
Expand All @@ -38,7 +38,7 @@ jobs:
if: github.repository == 'opensearch-project/custom-codecs'
strategy:
matrix:
java: [ 11, 17, 21 ]
java: [ 21 ]
os: [windows-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 17
java-version: 21

- name: Checkout custom-codecs Repo
uses: actions/checkout@v4
Expand All @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
jdk: [11, 17]
jdk: [21]
platform: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-maven-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
java-version: 21
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ allprojects {
}

java {
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_21
Copy link
Member Author

Choose a reason for hiding this comment

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

@reta Should we keep source compatibility at Java 11 so that we don't introduce syntax that can't be backported to 2.x? I'm thinking we should probably keep this constraint until we've got a release date for 3.0 and can make a clean break away from the 2.x line.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@reta Should we keep source compatibility at Java 11 so that we don't introduce syntax that can't be backported to 2.x?

@andrross here is the thing, Apache Lucene 10 is using JDK-21 release (source + target), so we won't be able to stick to JDK-11 and use Apache Lucene 10 types (in general)

Copy link
Member Author

Choose a reason for hiding this comment

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

So the risk is that Lucene exposes something in its API that is only available in JDK 21+? How does that fail if we have a lower source constraint? Does it only fail if we attempt to use that thing?

Copy link
Collaborator

Choose a reason for hiding this comment

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

So the risk is that Lucene exposes something in its API that is only available in JDK 21+?

Correct, fe records.

How does that fail if we have a lower source constraint? Does it only fail if we attempt to use that thing?

I think it won't fail (since most of the construct are retrofitted into existing bytecode), but it will force to use weird combination (fe classes and records) to essentially describe the same things. Plus we are loosing a lot from language enhancements .

}
}

Expand Down
Loading