Repository navigation
fix: fail early when the output target is Windows - #79
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The validation, tests, and documentation consistently implement the stated Windows output restriction.
0 open findings
What changed in this PR
Rejects unsupported Windows output targets before build processing while retaining Windows as a build host.
Changes:
- Adds early target validation with actionable guidance.
- Tests supported and unsupported output targets.
- Clarifies Windows behavior in platform documentation.
| File | Description |
|---|---|
src/main.rs |
Validates the resolved target before building. |
src/config.rs |
Defines validation and unit tests. |
docs/reference/platforms.md |
Documents the Windows target limitation. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The launcher is a POSIX shell stub, so a windows-x64 binary never runs. On a Windows host that was also the default target, so a plain jbundle build quietly produced a file that can't start. Error out with the targets that work and a pointer to #74. Signed-off-by: Avelino <31996+avelino@users.noreply.github.com>
avelino
force-pushed
the
avelino/fix/windows-target-error
branch
from
October 16, 2026 11:03
589aba4 to
0dcaa94
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
jbundle runs fine on Windows as a build host, but the binary it produces starts with
#!/bin/sh, so awindows-x64output never runs. Worse, on a Windows hostwindows-x64is the default target, so a plainjbundle buildquietly downloaded a Windows JDK and wrote a file that can't start. I think that's what bit people in #74.Now
--target windows-x64(or no--targeton a Windows host, ortarget = "windows-x64"injbundle.toml) fails right away with the targets that do work and a link to #74. The platforms doc no longer listswindows-x64as the Windows default.Native Windows output needs its own launcher (a small
.exethat finds its payload and extracts it), which is a bigger piece of work. I wrote up the plan on #74.How it was tested
cargo test: 190 unit + 2 e2e passed, including the newwindows_is_not_a_supported_outputandunix_targets_are_supported_outputs.cargo clippy --all-targets -- -D warningsandcargo fmt --checkclean.jbundle build --input a.jar --output out --target windows-x64exits 1 with the new message before downloading anything.Not tested by hand on a Windows machine. The
windows-latestCI job runs the unit tests.