Skip to content

Commit 13e9db6

Browse files
authored
fix: Release with JDK 8, #2994 (#2995)
* Missing --release 8 in javacOptions * Release must be with JDK 8 because --release 8 flag prevents access to com.sun.nio.file.SensitivityWatchEventModifier
1 parent cc228bc commit 13e9db6

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

.github/workflows/check-build-test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,32 @@ jobs:
4343
- name: "Code style, compile tests, MiMa. Run locally with: sbt \"verifyCodeStyle; +Test/compile; mimaReportBinaryIssues\""
4444
run: sbt "verifyCodeStyle; +Test/compile; mimaReportBinaryIssues"
4545

46+
compile-jdk-8:
47+
name: Compile with JDK 8
48+
runs-on: ubuntu-22.04
49+
env:
50+
JAVA_OPTS: -Xms2G -Xmx2G -Xss2M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
51+
52+
steps:
53+
- name: Checkout
54+
uses: actions/[email protected]
55+
with: # https://github.com/olafurpg/setup-scala#faster-checkout-of-big-repos
56+
fetch-depth: 100
57+
58+
- name: Fetch tags
59+
run: git fetch --depth=100 origin +refs/tags/*:refs/tags/*
60+
61+
- name: Set up JDK 8
62+
uses: coursier/[email protected]
63+
with:
64+
jvm: adopt:1.8.0-275
65+
66+
- name: Cache Coursier cache
67+
uses: coursier/[email protected]
68+
69+
- name: "Compile JDK 8"
70+
run: sbt compile
71+
4672
documentation:
4773
name: ScalaDoc, Documentation with Paradox
4874
runs-on: ubuntu-22.04

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ jobs:
2929
- name: Cache Coursier cache
3030
uses: coursier/[email protected]
3131

32-
- name: Set up JDK 11
32+
# Release must be with JDK 8 because --release 8 flag prevents access to com.sun.nio.file.SensitivityWatchEventModifier
33+
- name: Set up JDK 8
3334
uses: coursier/[email protected]
3435
with:
35-
jvm: temurin:1.11.0.17
36+
jvm: adopt:1.8.0-275
3637

3738
- name: Publish artifacts for all Scala versions
3839
env:

project/Common.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ object Common extends AutoPlugin {
114114
"-Xlint:try",
115115
"-Xlint:unchecked",
116116
"-Xlint:varargs"
117+
// Release must be with JDK 8 because this flag prevents access to com.sun.nio.file.SensitivityWatchEventModifier
118+
// "--release",
119+
// "8"
117120
),
118121
compile / javacOptions ++= (scalaVersion.value match {
119122
case Dependencies.Scala213 if insideCI.value && fatalWarnings.value && !Dependencies.CronBuild =>

0 commit comments

Comments
 (0)