rescript format: aborts on a syntax error, unstable output, raw compiler errors
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 56/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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>.
- Langage dominant
- OCaml
- Étoiles
- 7.5k
- Forks
- 485
- Merge moyen
- 16 h 51 min
- PR mergées (30 j)
- 268
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de rescript-lang/rescript
-
Exception analysis does not know the Temporal `fromStringOrThrow` functionsPeut-être pris @cknitt l’a pris il y a 3 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
rescript-lang/rescript#9182 ·
Les mainteneurs répondent en général sous 1 jour
-
Build system: make output wording and labels consistentPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
rescript-lang/rescript#9244 ·
Les mainteneurs répondent en général sous 1 jour
-
Build system CLI: behavior that disagrees with the help textPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 43/100
rescript-lang/rescript#9242 ·
Les mainteneurs répondent en général sous 1 jour
-
Build system: a failed first build forces full rebuilds, and clean breaks a running watchPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
rescript-lang/rescript#9241 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 54/100
rescript-lang/rescript#9239 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de rescript-lang/rescript
Issues similaires
-
bug good first issue priority: low
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
TMHSDigital/Free-Game-Dev-Assets#250 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
fish-shell/fish-shell#13084 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
http-party/http-server#982 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
hardikverma22/sandfit#20 ·
Les mainteneurs répondent en général sous 1 jour