AOTMode=create subprocess drops non "-XX:" JVM args, breaking --add-modules / --enable-preview
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I think https://github.com/PaperMC/tack/blob/12766ae9ad7748bc28b98581e4830a7273f3bfbb/src/aot/record.rs#L260 should also include "--" args, so it would look like this:
.filter(|arg| arg.starts_with("-XX:") || arg.starts_with("--"))
since I've just had an issue where "--add-modules=jdk.incubator.vector" and "--enable-preview" were dropped and tack was unable to create the AOT cache file:
[0.098s][info][aot] archived module property jdk.module.addmods: jdk.incubator.vector
[0.098s][error][aot] An error has occurred while processing the AOT configuration file. Run with -Xlog:aot for details.
[0.098s][error][aot] Mismatched values for property jdk.module.addmods: jdk.incubator.vector specified during dump time but not during runtime
[0.098s][error][aot] Disabling optimized module handling
...
[0.399s][error][aot] java.lang.NoClassDefFoundError: jdk/incubator/vector/ByteVector
[0.399s][error][aot] Please check if your VM command-line is the same as in the training run
[0.399s][error][aot] An error has occurred while writing the shared archive file.
Both were dropped; the one that actually broke the build is "--add-modules", as the log shows.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/aot/record.rs around line 260, where JVM arguments are filtered while creating the AOT subprocess. Reproduce the case with --add-modules and --enable-preview, then verify that the AOT cache can be created with those arguments preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, rust
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100