mirror of
https://github.com/horizon-rust/horizon-mixins.git
synced 2026-12-03 19:34:02 +07:00
[GH-ISSUE #21] RETURN injection into durability_loss is rejected due to local macro resolution #7
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#7
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?
Originally created by @sofia-gros on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon-mixins/issues/21
A RETURN injection into Game::durability_loss is rejected during planning, even when the helper simply returns the original value.
Environment:
ddd9700b21Injection target:
horizon_client::game::enchant_effects::Game<'_>::durability_loss
The injection kind is RETURN, with value: u32 bound to $value. The helper is:
fn unchanged(value: u32) -> u32 { value }
Planning fails with:
E_UNSUPPORTED_MACRO: macro identity is ambiguous; use an unshadowed absolute standard path
The target function calls world_stations! and world_items!.
I also tested MODIFY_EXPRESSION_VALUE around the durability_loss call inside Game::wear. Its plan succeeds and targets the result before event emission. However, creature and dispenser code also call durability_loss directly. Similar probes at those call sites are rejected because the enclosing functions contain closures. This does not rule out every alternative, but the tested approach does not cover all these paths.
Could these local macros be supported when their identities and control flow can be verified safely? Alternatively, is there a supported way to modify the result across these callers while preserving event order?
I’m not asking to bypass or weaken the safety checks.