rescript format: aborts on a syntax error, unstable output, raw compiler errors
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 56/100
Direzione di ricerca
Start in rewatch-ocaml/format.ml, especially the referenced lines 113, 116, 142–143, 148, 200, and 209; reproduce the listed cases with ReScript 13.0.0-alpha.8. Check formatting behavior for syntax errors, output ordering and paths, duplicate arguments, invalid inputs, and --stdin errors. Done means each case reports all files and useful errors consistently, with deterministic unique paths and <stdin> shown for stdin errors.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problems with rescript format. All reproduce with rescript 13.0.0-alpha.8 (found while reviewing #9238); paths are in rewatch-ocaml/.
-
One file with a syntax error aborts the run. In a project with unformatted files and one file containing
let x =,rescript format --checklists some files, thenError formatting <path>/B.res:with the syntax error, exit 1, and no summary. Without--check, some of the other files are left unformatted (with 40 unformatted files, 26–33 remained, varying per run).format.ml:142-143raises inside the job callback, which stops the whole job graph. Format and report every file, then fail. -
--checkoutput order is nondeterministic, and paths are inconsistent. With 8 unformatted files, six runs ofrescript format --checklisted them in six different orders: each line is printed when its job finishes (format.ml:148). In project mode the paths are absolute; for explicit file arguments they are relative (format.ml:113,:209). Sort the list and print paths relative to the current directory. -
Duplicate arguments are counted twice.
rescript format --check src/F.res src/F.reslists the file twice and reportsThe 2 files listed above need formatting(format.ml:209). -
Invalid arguments surface raw compiler errors.
rescript format src/Missing.res:Error formatting src/Missing.res:(trailing space), thenWe've found a bug for you!,_none_,I/O error: …: No such file or directory.rescript format srcandrescript format README.md:Error formatting src: don't know what to do with src.
Nothing checks existence or extension before calling the compiler;
format.ml:116prefixes the compiler's stderr, which starts with a newline. -
--stdinerrors name a temporary file.echo 'let x =' | rescript format --stdin .resreports the syntax error at/tmp/rescript-format-7546c4.res:1:8-2:0(format.ml:200); it should say<stdin>.
- Lingua principale
- OCaml
- Stelle
- 7.5k
- Fork
- 485
- Merge medio
- 16h 51m
- PR unite (30g)
- 268
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né 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 rescript-lang/rescript
-
Exception analysis does not know the Temporal `fromStringOrThrow` functionsForse già presa @cknitt l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
rescript-lang/rescript#9182 ·
I maintainer di solito rispondono entro 1 giorno
-
Build system: make output wording and labels consistentForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
rescript-lang/rescript#9244 ·
I maintainer di solito rispondono entro 1 giorno
-
Build system CLI: behavior that disagrees with the help textForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 43/100
rescript-lang/rescript#9242 ·
I maintainer di solito rispondono entro 1 giorno
-
Build system: a failed first build forces full rebuilds, and clean breaks a running watchForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
rescript-lang/rescript#9241 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
rescript-lang/rescript#9239 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di rescript-lang/rescript
Issue simili
-
bug good first issue priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TMHSDigital/Free-Game-Dev-Assets#250 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
fish-shell/fish-shell#13084 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
http-party/http-server#982 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
hardikverma22/sandfit#20 ·
I maintainer di solito rispondono entro 1 giorno