mirror of
https://github.com/horizon-rust/horizon-mixins.git
synced 2026-12-03 19:34:02 +07:00
[PR #8] [MERGED] fix(native): refuse post-build bins that share a target file #17
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
horizon-rust/horizon-mixins#17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/horizon-rust/horizon-mixins/pull/8
Author: @reservedbytes
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154
Base:
main← Head:fix/post-build-bin-clash📝 Commits (1)
5c6d82bfix(native): refuse post-build bins that share a target file📊 Changes
5 files changed (+95 additions, -2 deletions)
View changed files
📝
crates/horizon-mixins-cli/tests/cases/native.rs(+53 -0)📝
crates/horizon-mixins-core/src/index.rs(+6 -0)📝
crates/horizon-mixins-core/src/native.rs(+32 -0)📝
crates/horizon-mixins-core/src/plan.rs(+1 -1)📝
docs/crates-data-and-named-hooks.md(+3 -1)📄 Description
What and why
The launcher (#3964) builds every
[[post_build]]bin into one shared target folder, and runs the steps afterwards.A bin's file name doesn't include its package, so two mods with a bin named
bakeboth run the last one built, and the build still says success.A step bin named
horizon-clienteven replaces the game binary.Reproduced with
horizon-launcher native-buildon #3964:bake of beta ran for HORIZON_NATIVE_MOD=alpha
bake of beta ran for HORIZON_NATIVE_MOD=beta
plannow refuses a step bin whose file name (ignoring case) is a workspace bin or another crate's step bin, withE_POST_BUILD.One crate's bin can still be run by several steps.
Alternative (or as well): the launcher could build each mod's bins in its own folder, and take the game binary first.
Then any bin name works, and older
mixinsrevs are covered too.This PR just catches it at plan time, before minutes of compiling.
Checks
cargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --locked(90 passed, new testpost_build_bins_never_share_a_file_in_the_target_folder)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.