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

[regression] Publish nightly releases and releases using Java 8 #19722

Merged
merged 1 commit into from
Feb 19, 2024
Merged
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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,8 @@ jobs:
SONATYPE_USER: ${{ secrets.SONATYPE_USER_ORGSCALALANG }}

steps:
- name: Set JDK 17 as default
run: echo "/usr/lib/jvm/java-17-openjdk-amd64/bin" >> $GITHUB_PATH
- name: Set JDK 8 as default
run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for making the build future-proof, we should add explicit -source/-release/-target flags to JDK to always emit JDK 8 bytecode and use only JDK API available in that version.
Same issue might be also present in normal releases

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this would have to be set in SBT, not in the CI configuration. The best we can do from the CI point of view is switch the default Java version.

- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
Expand Down Expand Up @@ -723,6 +723,8 @@ jobs:
SONATYPE_USER: ${{ secrets.SONATYPE_USER_ORGSCALALANG }}

steps:
- name: Set JDK 8 as default
Copy link
Member Author

Choose a reason for hiding this comment

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

If we don't explicitly set the version, CI will use Java 21

run: echo "/usr/lib/jvm/java-8-openjdk-amd64/bin" >> $GITHUB_PATH
- name: Reset existing repo
run: |
git config --global --add safe.directory /__w/dotty/dotty
Expand Down
Loading