Skip to content

Fix 5055: Run tests with Java 11 #6470

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

Merged
merged 2 commits into from
May 16, 2019

Conversation

OlivierBlanvillain
Copy link
Contributor

No description provided.

@OlivierBlanvillain OlivierBlanvillain requested a review from smarter May 7, 2019 12:34
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

.drone.yml Outdated
image: lampepfl/dotty:2019-04-22
commands:
- cp -R . /tmp/6/ && cd /tmp/6/
- JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/" ./project/scripts/sbt -java-home "/usr/lib/jvm/java-11-openjdk-amd64/" ";dotty-bootstrapped/compile ;dotty-bootstrapped/test; dotty-semanticdb/compile; dotty-semanticdb/test:compile;sjsSandbox/run;sjsSandbox/test"
Copy link
Member

Choose a reason for hiding this comment

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

I think we should only run this on merges, like the 2.12 tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 I'm gonna do that as a second commit so we can make sure that is passes on the CI (it works locally).

.drone.yml Outdated
image: lampepfl/dotty:2019-04-22
commands:
- cp -R . /tmp/6/ && cd /tmp/6/
- JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64/" ./project/scripts/sbt -java-home "/usr/lib/jvm/java-11-openjdk-amd64/" ";dotty-bootstrapped/compile ;dotty-bootstrapped/test; dotty-semanticdb/compile; dotty-semanticdb/test:compile;sjsSandbox/run;sjsSandbox/test"
Copy link
Member

Choose a reason for hiding this comment

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

I think instead of passing java home the simplest thing to do is set the PATH to start with "/usr/lib/jvm/java-11-openjdk-amd64/bin

@OlivierBlanvillain
Copy link
Contributor Author

I tried to change the PATH but that's ignored by sbt. In the end I updates ./project/scripts/sbt to forward the JAVA_HOME to sbt, which seams to work (the "WARNING: An illegal reflective access operation has occurred" shows that this is running under a different JVM).

smarter
smarter previously requested changes May 9, 2019
if [ -z "$JAVA_HOME" ]; then
SET_JAVA_VERSION=""
else
SET_JAVA_VERSION="-java-home"
Copy link
Member

Choose a reason for hiding this comment

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

Why not directly:

Suggested change
SET_JAVA_VERSION="-java-home"
SET_JAVA_VERSION="-java-home $JAVA_HOME"

@OlivierBlanvillain OlivierBlanvillain dismissed smarter’s stale review May 16, 2019 14:17

It works with the correct PATH!

@OlivierBlanvillain OlivierBlanvillain merged commit 9be57ca into scala:master May 16, 2019
@OlivierBlanvillain OlivierBlanvillain deleted the test-java-11 branch May 16, 2019 14:17
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

Successfully merging this pull request may close these issues.

2 participants