JuliaLang / JuliaLang/JuliaSyntax.jl
Error message implies missing parenthesis, but the issue is a missing argument
- Dominant language
- Julia
- Stars
- 293
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
Description
When an argument is missing, the error message is not fantastic:
```julia
julia> rand(, 10)
ERROR: ParseError:
# Error @ REPL[1]:1:6
rand(, 10)
# └──┘ ── Expected `)`
Stacktrace:
[1] top-level scope
@ none:1
```
In fact, replacing the underlined part with the "expected" ) would not even solve the problem. It is much less the root issue.
Relevant issues: https://github.com/JuliaLang/JuliaSyntax.jl/issues/348 and https://github.com/JuliaLang/JuliaSyntax.jl/issues/336
```julia
julia> versioninfo()
Julia Version 1.10.0-rc2
Commit dbb9c46795b (2023-12-03 15:25 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 8 × Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 on 8 virtual cores
Environment:
JULIA_PKG_PRESERVE_TIERED_INSTALLED = true
JULIA_CONDAPKG_BACKEND = Null
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce `rand(, 10)` in the Julia REPL and inspect the resulting ParseError. Read the linked JuliaSyntax issues 348 and 336 for related parser behavior. Done means the diagnostic explains that an argument is missing instead of implying that a closing parenthesis is expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100