Repository navigation
fix(runtime): compile error/3 and raise its reason - #23
Merged
Merged
Conversation
Register the native entry for direct and dynamic calls, reusing the existing error exception path. Add an OTP 29 parity fixture and document that Args and error_info metadata are not retained in stacktrace frames.
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.
Why
OTP libraries use error/3 to raise a reason with diagnostic options, but native compilation rejected these calls.
What changed
Before and after
Before: Direct error/3 calls failed to compile; all three probed dynamic call shapes raised error:undef.
After: All nine regression call paths raise the supplied reason, and all three dynamic probe results match BEAM.
This changes native compilation and raised exceptions, not a screen; the evidence is compiled program output compared with BEAM.
Checked
Live validation: Demonstrated for this version. 1 of 1 scenarios driven live in the product.
How it was checked
Built the runtime before the compiler with cargo build --release --locked.
Ran cargo clippy --workspace --all-targets --locked -- -D warnings and cargo test --workspace --locked --no-fail-fast.
Ran python3 scripts/test-allocator-config.py and ./target/release/nera test -j 1 --timeout 30.
Compared compiled native programs with BEAM, including ten consecutive executions of the new fixture in each mode.
Local execution covered macOS arm64; hosted checks also passed native Linux x86_64 execution and both cross-compilation jobs.
Risk
Risk: low in every dimension.
Full risk assessment
Not done
Args and error_info metadata are accepted but not retained in Nera's arity-only stacktrace frames.
Pipeline
Updates from git push no-mistakes
Infinitary checked this version: an independent review that also judged the documents, and live validation the review accepted.