From 42b8b46eddc98b6ab377889ade19c0fd8058e72d Mon Sep 17 00:00:00 2001 From: Ovi Stoica Date: Tue, 19 May 2026 12:40:23 +0300 Subject: [PATCH] fix(kmono-git): add missing GraalVM reflect entry for DiffAlgorithm$SupportedAlgorithm DiffFormatter.setRepository() internally calls Config.getEnum() which uses reflection to invoke DiffAlgorithm$SupportedAlgorithm.values(). This fails in the native-image binary because the enum was not registered in reflect-config.json. The fix follows the same pattern as the other 16 JGit enums already registered (CoreConfig$AutoCRLF, CoreConfig$EOL, etc.). Without this fix, any kmono command that triggers file-level change detection (--with-changes-since, --with-changes + ignore-changes) crashes with: java.lang.NoSuchMethodException: org.eclipse.jgit.diff.DiffAlgorithm$SupportedAlgorithm.values() --- .../org.eclipse.jgit/reflect-config.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/kmono-git/resources/META-INF/native-image/org.eclipse.jgit/org.eclipse.jgit/reflect-config.json b/packages/kmono-git/resources/META-INF/native-image/org.eclipse.jgit/org.eclipse.jgit/reflect-config.json index 3c2b4a1..2b77ac1 100644 --- a/packages/kmono-git/resources/META-INF/native-image/org.eclipse.jgit/org.eclipse.jgit/reflect-config.json +++ b/packages/kmono-git/resources/META-INF/native-image/org.eclipse.jgit/org.eclipse.jgit/reflect-config.json @@ -212,6 +212,20 @@ "name": "values", "parameterTypes": [ + ] + } + ] + }, + { + "name": "org.eclipse.jgit.diff.DiffAlgorithm$SupportedAlgorithm", + "condition": { + "typeReachable": "org.eclipse.jgit.diff.DiffFormatter" + }, + "methods": [ + { + "name": "values", + "parameterTypes": [ + ] } ]