mirror of
https://github.com/horizon-rust/horizon-mixins.git
synced 2026-12-03 19:34:02 +07:00
[PR #18] feat(native): support dependencies between declared bundle crates #20
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#20
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/18
Author: @finalpantasy
Created: 11/1/2026
Status: 🔄 Open
Base:
main← Head:feat/bundle-sibling-crates📝 Commits (4)
00a8371fix: index production test cfg modules3ac63dffeat(native): support dependencies between declared bundle cratesddd9700Merge pull request #17 from arismoko/fix/cfg-test-modules6757cc1Local test snapshot: combine current SDK main and sibling crate support📊 Changes
26 files changed (+1563 additions, -99 deletions)
View changed files
📝
README.md(+4 -3)📝
crates/horizon-mixins-cli/tests/cases/advanced.rs(+1 -1)📝
crates/horizon-mixins-cli/tests/cases/effects.rs(+1 -1)📝
crates/horizon-mixins-cli/tests/cases/native.rs(+670 -1)📝
crates/horizon-mixins-cli/tests/cases/scoped.rs(+1 -1)📝
crates/horizon-mixins-cli/tests/integration.rs(+22 -0)📝
crates/horizon-mixins-cli/tests/snapshots/advanced-plan.json(+1 -1)📝
crates/horizon-mixins-cli/tests/snapshots/boundary-plan.json(+1 -1)📝
crates/horizon-mixins-cli/tests/snapshots/effects-plan.json(+1 -1)📝
crates/horizon-mixins-cli/tests/snapshots/plan.json(+1 -1)📝
crates/horizon-mixins-cli/tests/snapshots/scoped-plan.json(+1 -1)📝
crates/horizon-mixins-core/src/index.rs(+110 -16)📝
crates/horizon-mixins-core/src/native.rs(+647 -18)📝
crates/horizon-mixins-core/src/plan.rs(+13 -3)📝
docs/advanced-injections.md(+2 -2)📝
docs/architecture.md(+8 -5)📝
docs/boundary-head-and-modules.md(+10 -9)📝
docs/crates-data-and-named-hooks.md(+44 -15)📝
docs/effects-and-state.md(+1 -1)📝
docs/implementation.md(+3 -2)...and 6 more files
📄 Description
A native bundle cannot currently split its logic into libraries that depend on each other: a dependency such as
engine_math = { package = "utility-kernel", path = "../../shared/math" }is rejected even when both crates are explicitly declared by the same bundle.This adds same-bundle crate dependencies while retaining the existing registry lock allowlist. Planning resolves forward references, aliases, version requirements and nested source paths, and rejects undeclared targets, escapes, linked paths, self-dependencies and cycles. Staging verifies original file hashes before rewriting only the staged dependency paths. Source manifests remain unchanged. Plan schema 7 records the resolved edges.
Cycle checks conservatively include normal, build, dev and inactive optional edges. Cross-bundle, arbitrary filesystem and git dependencies remain unsupported. Existing loose
.tomlmods continue to work. Related to #12; this addresses its sibling-crate request only.Current-base Windows self-check
The original feature revision is
3ac63df26d332bc344ba645d5d23497b7d4ad985. The tested combined revision6757cc1f08be368f20e98fa23d22e560f853325bmerges upstream mainddd9700b21997c95d95ac6ee5ecafe3830cf622awith that feature. The feature diff against the new base remains 24 files, 1,422 insertions and 75 deletions. No unrelated repair is included.Both snapshots were tested separately on Windows, serially with one Cargo job and one test thread:
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --offline --locked -- -D warningscargo test --workspace --locked --offline --no-fail-fast -- --test-threads=1The full test commands used Rust 1.99.1 GNU; formatting and Clippy used the installed Rust/Clippy 1.98.1 MSVC toolchain. All workspace test binaries and both doctest suites completed. All 98 existing test outcomes were retained, and all 12 additional sibling-crate tests passed. Each invocation exited naturally with confirmed cleanup and unchanged source/tool inputs. Independent raw-evidence review covers these results.
The added tests compile separate libraries through the SDK, including forward/nested/aliased dependencies, optional/default features, build scripts and dev dependencies; exercise invalid paths, cycles and altered plans; and cover loose
.tomlcompatibility. Separate earlier Windows probes also accepted an ordinary sibling dependency and rejected junctions in both declared crate roots and dependency paths.The full Windows suite is not all green. Its seven reproduced upstream failures remain four existing-stage replacement tests, two direct workspace-indexing path tests, and one stage-ownership diagnostic assertion. Earlier Windows findings on #3 and #4 describe the same limitations. No assertion was weakened to hide them. Linux, Unix-only symlink tests and the repository-pinned Rust 1.95 toolchain were not run locally; upstream CI remains a separate gate.
The historical checks at the original feature head remain 101 passed/7 failed versus 89 passed/the same 7 failed on upstream
a2af5c0. The table above is the fresh current-base result, not a relabeling of those older runs.Launcher and installed-runtime follow-up
The companion launcher validation fix has merged as horizon-rust/horizon#5756. With the original SDK feature head (
3ac63df26d332bc344ba645d5d23497b7d4ad985), a native bundle containing declared dependent crates passed the normal launcher build/install workflow and four real offscreen save/reopen sessions. The sessions used normal content-mod discovery, exited naturally, and preserved machine and player state without output duplication. The portable source and scoped verification metadata are published in gtnh-native-rust dce6efc.That installed-game proof remains bound to the original SDK feature revision. The combined current-base revision above was checked at the SDK level; it has not replaced the installed game build. Unmodified upstream SDK support for sibling crates is not established by this PR.
The current-base SDK self-check is complete. This PR remains draft while the seven existing Windows failures await resolution or explicit review. No all-platform or all-green CI claim is made.
🤖 Generated with OpenAI Codex
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.