unstable error message order
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
In https://github.com/rust-lang/rust/pull/125558 we ran into inconsistent ordering of error messages between CI and our local machines.
Our fix was to re-order the top-level definitions, so that global_asm! comes before a function containing inline asm!.
Here the first commit failed on CI, the second one works. The only change is ordering of top-level definitions: https://github.com/rust-lang/rust/commit/08c8887ed1a96a67406972d9e99afde14acbce3e .. https://github.com/rust-lang/rust/commit/8fd7cc91ec4ef33d2caecfff44318fa15e31cf43
gist containing source files because idk how long force pushes are kept
@oli-obk had this theory
It's probably some code iterating over a hashmap and invoking queries as it does. Should be fairly easy to find as it must be in thr backtrace of the error (you can get that with -Ztreat-err-as-bug=index_of_the_error_in_the_output)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked PR, the two comparison commits, and the gist containing the source files. Reproduce the CI/local error-order difference, then use -Ztreat-err-as-bug=index_of_the_error_in_the_output to inspect the backtrace and investigate the suspected hashmap iteration. Done means error messages have stable ordering regardless of top-level definition order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100