parser: "expression nesting too deep" never reaches the first-error recorder (LSP/--lint show a cascade instead)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 78/100
Direzione di ricerca
Start in src/parser.c at the PARSE_MAX_DEPTH guards in parse_unary and parse_expression, then run the deep.eigs reproduction with --lint --json. Add regression coverage in tests/test_lsp.py or the --lint suite for the current-token location, message, length, and precedence when both limits trip; done means the reported error is expression nesting too deep and the existing #943 f-string checks still pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Repro
python3 -c "print('x is ' + '(' * 300 + '1' + ')' * 300)" > deep.eigs
src/eigenscript deep.eigs # stderr: Parse error line 1: expression nesting too deep (plus cascades)
src/eigenscript --lint --json deep.eigs
--lint --json and the LSP publish only the first recorded error. The PARSE_MAX_DEPTH guards in parse_unary and parse_expression (src/parser.c) call fprintf and g_parse_errors++, but never eigs_record_first_error*. As a result, the published diagnostic is whatever recovery cascade comes after it (for example expected ')', got '('), not the actual cause. I found this while working on #1331 (the 65-level f-string case from #943).
Done when
- Both
PARSE_MAX_DEPTHguards record the error at the current token's line and column (and length). -
--lint --jsonon the repro reportsexpression nesting too deepas its error, not a cascade. - A regression test in tests/test_lsp.py (or the --lint suite) fails with the fix reverted.
- The #943 f-string depth checks in tests/test_lsp.py still pass. Decide which message wins when both limits trip on one line, and write that decision in the test.
- Lingua principale
- C
- Stelle
- 3
- Fork
- 7
- Merge medio
- 4h 15m
- PR unite (30g)
- 106
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di InauguralSystems/EigenScript
-
area:lint-tooling bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
InauguralSystems/EigenScript#1340 ·
I maintainer di solito rispondono entro 1 giorno
-
area:stdlib found-by:code-review kind:silent-wrong
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
InauguralSystems/EigenScript#1338 ·
I maintainer di solito rispondono entro 1 giorno
-
area:lint-tooling found-by:critic kind:docs-drift
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
InauguralSystems/EigenScript#1335 ·
I maintainer di solito rispondono entro 1 giorno
-
area:ci found-by:critic kind:gate-defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
InauguralSystems/EigenScript#1311 ·
I maintainer di solito rispondono entro 1 giorno
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetApertaarea:gates found-by:critic kind:decision
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
InauguralSystems/EigenScript#1280 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InauguralSystems/EigenScript
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
sandialabs/seacas#945 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ARM-software/sysarch-acs#556 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
netdata/netdata#24062 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno