Commit 724faa4
SONARIAC-2741 Isolate tree-sitter native library extraction per module (#105)
## Summary
- Set `tree-sitter-lib` system property per test JVM to isolate native
library extraction directories
- Each module extracts tree-sitter native libraries to its own
`build/tree-sitter-native/` directory
- Fixes intermittent `LinkageError` on Windows CI caused by parallel
Gradle test JVMs racing to extract the same `.dll` to a shared
`~/.tree-sitter/` path
## Context
The "QA Windows OS Tests" CI job in sonar-iac-enterprise fails
intermittently because Windows locks DLL files while loaded, preventing
concurrent extraction by parallel test JVMs. Linux is unaffected because
`.so` files are not locked on disk.
tree-sitter-ng's `NativeUtils.getLibStorePath()` checks
`System.getProperty("tree-sitter-lib")` first, falling back to
`${user.home}/.tree-sitter`. By setting this property per module, each
test JVM gets its own extraction path.
## Test plan
- [x] shell and docker tests pass locally when run in parallel
- [x] Verified separate extraction:
`shell/build/tree-sitter-native/lib/` and
`docker/build/tree-sitter-native/lib/` each contain their own `.dll`
copies
- [ ] Windows CI no longer fails intermittently
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent f029d6a commit 724faa4
File tree
1 file changed
+5
-0
lines changed- gradle-modules/src/main/kotlin
1 file changed
+5
-0
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
0 commit comments