Conversation
Changed Files
|
3ba5da9 to
4de72bb
Compare
4de72bb to
3a6d0d1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a6d0d15e5
ℹ️ 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".
| .insert( | ||
| "[CORE_PATH]", | ||
| regex::Regex::new( | ||
| r"(?<redacted>(?:\$MOON_HOME|(?:[A-Za-z]:)?/[^ \t\r\n]*\.moon)/lib/core)", |
There was a problem hiding this comment.
Handle non-.moon MOON_HOME in core-path redaction
stack_trace_redactions only redacts core paths that already contain $MOON_HOME or whose absolute path has a .moon segment before /lib/core, but moonutil::moon_dir::home() allows arbitrary MOON_HOME values. In environments where MOON_HOME is set to something like /opt/moonbit, this pattern will not match, so the updated snapshots in crates/moonrun/tests/test.rs and crates/moon/tests/test_cases/native_abort_trace/mod.rs that now require [CORE_PATH] will fail with unreplaced absolute paths.
Useful? React with 👍 / 👎.
Summary
Previously the test was extremely unstable due to the fact that stack trace was snapshot. Whenever the core has file change, the line number gets updated, and the test result is changed.
This PR adds redaction for the line numbers.
Metadata