rescript format: aborts on a syntax error, unstable output, raw compiler errors
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 56/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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>.
- Vorherrschende Sprache
- OCaml
- Sterne
- 7.5k
- Forks
- 485
- Ø Merge
- 16 Std. 51 Min.
- Gemergte PRs (30 T.)
- 268
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rescript-lang/rescript
-
Exception analysis does not know the Temporal `fromStringOrThrow` functionsEvtl. vergeben @cknitt hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
rescript-lang/rescript#9182 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Build system: make output wording and labels consistentEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
rescript-lang/rescript#9244 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Build system CLI: behavior that disagrees with the help textEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 43/100
rescript-lang/rescript#9242 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Build system: a failed first build forces full rebuilds, and clean breaks a running watchEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
rescript-lang/rescript#9241 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 54/100
rescript-lang/rescript#9239 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in rescript-lang/rescript
Ähnliche Issues
-
bug good first issue priority: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
TMHSDigital/Free-Game-Dev-Assets#250 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
fish-shell/fish-shell#13084 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
http-party/http-server#982 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
hardikverma22/sandfit#20 ·
Maintainer antworten meist innerhalb von 1 Tag