The Slang frontend reports every diagnostic as an error, including warnings
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- solidity
- Domain
- compilers
Research direction
Start in solx-slang/src/slang/mod.rs:134-150 and inspect the diagnostic mapping, then check the bail at line 162 and the DiagnosticExtensions trait usage. Run the affected solx-mlir/tests/lit/ fixtures, including the missing-version-pragma case; done means warnings are emitted without stopping compilation, while errors still do.
Written by the indexing model from the issue text.
Description
solx-slang/src/slang/mod.rs:134-150 maps every entry of unit.diagnostics() through OutputError::new_error_with_data without consulting diagnostic.severity(), and :162 then bails on output.has_errors(). So a Slang warning stops compilation and emits nothing.
The instance that surfaced it is syntax/missing-version-pragma, which Slang declares as DiagnosticSeverity::Warning and legacy solc also reports as a warning — Source file does not specify required compiler version!, compiling to bytecode with exit 0. Under Ground truth 1 solc defines behavior here, so solx should warn and carry on.
DiagnosticExtensionsis already imported atmod.rs:13for.message();.severity()is on the same trait and is never called.- Every LIT fixture is affected: none of the 158 under
solx-mlir/tests/lit/declares a pragma, so 141 of them fail against a Slang revision that emits this diagnostic. - The tester corpus is mostly unaffected — 1236 of 1265 sources already declare one.
- Dominant language
- Solidity
- Stars
- 186
- Forks
- 20
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 31
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.
More from NomicFoundation/solx
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NomicFoundation/solx#701 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
NomicFoundation/solx#720 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 76/100
NomicFoundation/solx#713 · 1 reaction ·
-
enhancement
NomicFoundation/solx#635 · 1 assignee ·
-
Slang: sema-level contract-dependency analysis, and the circular bytecode reference error it enables Openenhancement
NomicFoundation/solx#634 · 1 assignee ·
All issues in NomicFoundation/solx
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
objectionary/eo#8869 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
EricSpencer00/Resilient#4824 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/jeo-maven-plugin#1758 ·
-
generics
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
mlir
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
llvm/llvm-project#224908 · 1 comment ·