Skip to content

Commit 5ba1ec9

Browse files
authored
Silence noisy logback error (#6778)
Fixes #6777 Tested manually by building the native image locally and forcing coursier to download stuff: ```console > ./mill dist.native.installLocal > rm -rf ~/Library/Caches/Coursier > ./mill-native version ``` Without this PR we get the spurious error, with this PR we do not
1 parent 5fddd66 commit 5ba1ec9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dist/package.mill

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,12 @@ object `package` extends MillJavaModule with Proguard with DistModule {
517517
"-Dfile.encoding=UTF-8",
518518
"-Dsun.stdout.encoding=UTF-8",
519519
"-Dsun.stderr.encoding=UTF-8",
520+
// Include logback version properties files (added in logback 1.5.26, see https://logback.qos.ch/news.html)
521+
// to avoid NPE in VersionUtil.checkForVersionEquality during logback initialization in native image
522+
// https://www.graalvm.org/latest/reference-manual/native-image/guides/include-resources/
523+
// https://github.com/com-lihaoyi/mill/issues/6777
524+
"""-H:IncludeResources=ch/qos/logback/.*/logback-.*-version\.properties""",
525+
"""-H:-ReduceImplicitExceptionStackTraceInformation""",
520526
// Prevent Native Image runtime from consuming runtime options like -D<key>=<value>
521527
// https://github.com/com-lihaoyi/mill/issues/6770
522528
"-H:-ParseRuntimeOptions"

0 commit comments

Comments
 (0)