compiletest silently fails on a name-value directive with a known name but missing colon but does not report an error
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
compiletest expects that a name-value directive, like //@ revisions: foo, to have the colon :
If the name-value directive contains a known directive name like revisions but does not have the colon (i.e. //@ revisions foo), then:
- compiletest known directive check accepts the known directive name
revisions parse_name_value_directiveexpectsrevisions:but only gotrevisions, so parsing fails- no other compiletest directive parsing rules accept
revisionsdirective name - no errors raised yet there is no effect (no revisions in this example).
compiletest should not silently fail here because it's very surprising and a pain to debug unless you know exactly what's wrong.
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
The relevant code is in src/tools/compiletest/src/header.rs around the linked lines, with parsing handled by parse_name_value_directive. Start there and trace how a known directive name without ':' is handled; done means the malformed directive reports an error instead of being silently ignored, with regression coverage in the relevant compiletest tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100