Prototype/rust fragments#6
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91769278ec
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fn axis_ok(axis: Axis) -> bool { | ||
| axis == Axis::new(NAME) |
There was a problem hiding this comment.
Accept fallback axis labels for concat on unnamed shapes
axis_ok now compares against the compile-time NAME const, which is "" for shape!(...) axes without labels. That makes concat reject valid calls like root::<shape!(2), _>(..., vec![Axis::FEATURES]) + concat(Axis::FEATURES, ...) with a runtime panic (unsupported concat axis), even though root still accepts fallback axis names. This is a regression from enum-based axis matching and breaks existing unnamed-shape pipelines that rely on fallback labels.
Useful? React with 👍 / 👎.
| where | ||
| F: Fragment, | ||
| { | ||
| share_fragment_with_id(fragment, fragment as *const F as *const () as usize) |
There was a problem hiding this comment.
Stop deriving shared fragment IDs from raw pointer values
Using fragment as *const F as usize for share_fragment IDs is unsafe for identity: zero-sized fragment values can have the same address, so unrelated shared fragments can collide. In one model this can silently tie parameters together or trigger shared runtime type mismatch during materialization when colliding IDs map to different runtime types. The new fragment-sharing API should not rely on object address for uniqueness.
Useful? React with 👍 / 👎.
No description provided.