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

Java and Graal versions are checked before the build starts #9106

Merged
merged 3 commits into from
Feb 21, 2024

Conversation

Akirathan
Copy link
Member

Pull Request Description

Add checks of Java and GraalVM versions before the sbt project is fully loaded. This ensures that all the devs have exactly the version specified in our build.sbt.

Important Notes

Trying to start sbt with a different java versions now results in:

$ java -version
openjdk version "21" 2023-09-19
OpenJDK Runtime Environment GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15)
OpenJDK 64-Bit Server VM GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15, mixed mode, sharing)
$ sbt
[info] welcome to sbt 1.9.7 (GraalVM Community Java 21)
[info] loading settings for project enso-build from plugins.sbt ...
[info] loading project definition from /home/pavel/dev/enso/project
[info] loading settings for project enso from build.sbt ...
[info] resolving key references (65272 settings) ...
[info] set current project to enso (in build file:/home/pavel/dev/enso/)
[error] Running on GraalVM version 21. Expected GraalVM version 21.0.2.
[error] Total time: 0 s, completed Feb 20, 2024, 1:06:18 PM
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
$ java -version
openjdk version "17.0.10" 2024-01-16
OpenJDK Runtime Environment JBR-17.0.10+1-1087.17-jcef (build 17.0.10+1-b1087.17)
OpenJDK 64-Bit Server VM JBR-17.0.10+1-1087.17-jcef (build 17.0.10+1-b1087.17, mixed mode)
$ sbt
[info] welcome to sbt 1.9.7 (JetBrains s.r.o. Java 17.0.10)
[info] loading settings for project enso-build from plugins.sbt ...
[info] loading project definition from /home/pavel/dev/enso/project
[info] compiling 44 Scala sources to /home/pavel/dev/enso/project/target/scala-2.12/sbt-1.0/classes ...
[info] loading settings for project enso from build.sbt ...
[info] resolving key references (65272 settings) ...
[info] set current project to enso (in build file:/home/pavel/dev/enso/)
[warn] Running on non-GraalVM JVM (The actual java.vendor is JetBrains s.r.o.). Expected GraalVM Community java.vendor.
[error] Running on Java version 17. Expected Java version 21.
[error] Total time: 0 s, completed Feb 20, 2024, 1:07:40 PM
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)

@Akirathan Akirathan added the CI: No changelog needed Do not require a changelog entry for this PR. label Feb 20, 2024
@Akirathan
Copy link
Member Author

Akirathan commented Feb 20, 2024

The very first issue disovered in formatting.yml action in https://github.com/enso-org/enso/actions/runs/7973188458/job/21766530064?pr=9106#step:5:23 fixed by df8f082

@Akirathan Akirathan added the CI: Keep up to date Automatically update this PR to the latest develop. label Feb 21, 2024
@Akirathan Akirathan added CI: Ready to merge This PR is eligible for automatic merge and removed CI: Keep up to date Automatically update this PR to the latest develop. labels Feb 21, 2024
@mergify mergify bot merged commit 9daca28 into develop Feb 21, 2024
28 checks passed
@mergify mergify bot deleted the wip/akirathan/check-graal-version branch February 21, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants