enso/project
Pavel Marek 9daca288f4
Java and Graal versions are checked before the build starts (#9106)
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)
```
2024-02-21 10:33:32 +00:00
..
src/main/scala/licenses 8830 add google analytics authentication and reporting to enso (#8907) 2024-02-13 16:23:48 +00:00
BenchTasks.scala Bump SBT and Scalafmt (#1203) 2020-10-22 16:12:28 +02:00
build.properties Bump SBT version (#8498) 2023-12-08 17:15:51 +00:00
BuildInfo.scala Fix warnings in SBT build (#8026) 2023-10-12 08:19:45 +00:00
Cargo.scala Use SimpleFormatter.formatMessage to replace {0} with actual parameters (#5870) 2023-03-11 00:15:58 +00:00
CustomLogManager.scala Use SimpleFormatter.formatMessage to replace {0} with actual parameters (#5870) 2023-03-11 00:15:58 +00:00
Distribution.scala Scala 2.13.11 and libraries update (#7010) 2023-06-14 13:15:57 +00:00
DistributionPackage.scala Always runEngineDistrubtion with -ea (#8915) 2024-02-01 09:07:43 +01:00
Editions.scala 8830 add google analytics authentication and reporting to enso (#8907) 2024-02-13 16:23:48 +00:00
FrgaalJavaCompiler.scala Upgrade enso to GraalVM for jdk 21 (#7991) 2023-11-17 18:02:36 +00:00
GatherLicenses.scala Register instruments/language in their own compilation units to fix the sbt build issues (#3509) 2022-06-13 14:09:08 +00:00
GenerateFlatbuffers.scala Use SimpleFormatter.formatMessage to replace {0} with actual parameters (#5870) 2023-03-11 00:15:58 +00:00
GraalVM.scala Java and Graal versions are checked before the build starts (#9106) 2024-02-21 10:33:32 +00:00
JavaFormatter.scala Update java formatter sbt plugin (#8543) 2023-12-15 14:45:23 +00:00
JavaFormatterPlugin.scala Update java formatter sbt plugin (#8543) 2023-12-15 14:45:23 +00:00
JPMSPlugin.scala Fix incremental compilation of runtime/test (#8975) 2024-02-13 10:05:31 +01:00
JPMSUtils.scala Better runEngineDistribution --run test/Base_Tests "filter" (#8940) 2024-02-04 11:39:36 +01:00
LauncherShimsForTest.scala Use SimpleFormatter.formatMessage to replace {0} with actual parameters (#5870) 2023-03-11 00:15:58 +00:00
LibraryManifestGenerator.scala Upgrade enso to GraalVM for jdk 21 (#7991) 2023-11-17 18:02:36 +00:00
NativeImage.scala Remove akka from runtime (#8953) 2024-02-19 16:39:05 +00:00
Platform.scala Build distribution for amd64 and aarch64 MacOS (#8407) 2023-12-05 11:24:02 +01:00
plugins.sbt Run unit tests with truffle-compiler (#8467) 2023-12-18 18:22:16 +01:00
RecompileParser.scala New documentation parser (#5917) 2023-03-15 15:43:51 +00:00
SPIHelpers.scala Fix incremental compilation of SPI in Java helper libraries (#8129) 2023-10-23 09:14:35 +00:00
StdBits.scala Upgrade enso to GraalVM for jdk 21 (#7991) 2023-11-17 18:02:36 +00:00
VerifyReflectionSetup.scala Fix the project manager reflection configuration (#1394) 2021-01-14 10:46:01 +00:00
WithDebugCommand.scala WithDebug command works for bench and for test (#8786) 2024-01-17 11:43:20 +00:00