You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ScipBuildTool and ScipOptionBuilder write unescaped Windows backslashes into double-quoted @argfile arguments, corrupting paths containing \t, \n, \r, \b, or \f #1067
When generating javac@argfile options (javacopts.txt in ScipBuildTool.kt and modified @argfile entries in ScipOptionBuilder.java), arguments containing file paths are wrapped in double quotes ("...") without escaping backslashes (\).
According to the JDK javac@argfile specification, backslash escape sequences (\t, \n, \r, \b, \f, \\, \") are interpreted inside quoted strings in @argfiles. On Windows, any path segment starting with t, n, r, b, or f (such as \target\..., C:\temp\..., \repos\..., \build\..., \foo\...) is silently corrupted into a tab, newline, carriage return, backspace, or form-feed character when javac parses @javacopts.txt.
(Note: #992 and #1012 report a similar backslash escaping issue in GradleBuildTool.kt's init-script.gradle, and #1009 covers line splitting in InjectScipOptions.java, but ScipBuildTool.kt and ScipOptionBuilder.java have the same problem when writing javac@argfiles.)
On Windows, place a Java project under a directory containing \t, \n, \r, \b, or \f (e.g., C:\temp\my-project or with targetroot under <repo>\target\scip-targetroot).
Run scip-java index using either ScipBuildTool (javacopts.txt) or InjectScipOptions (@argfile).
javac @javacopts.txt parses "C:\temp\my-project\target\..." as "C:<TAB>emp\my-project<TAB>arget\...", failing with error: file not found / InvalidPathException / NoSuchFileException.
Suggested Fix
Escape backslashes (\ -> \\) and embedded double quotes (" -> \") before wrapping @argfile arguments in double quotes:
In ScipBuildTool.kt:
val quotedArguments = arguments.map { "\"${it.replace("\\", "\\\\").replace("\"", "\\\"")}\"" }
Activity