rescript format: aborts on a syntax error, unstable output, raw compiler errors
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 56/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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>.
- Lenguaje dominante
- OCaml
- Estrellas
- 7.5k
- Forks
- 485
- Merge medio
- 16 h 51 min
- PR fusionados (30 d)
- 268
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rescript-lang/rescript
-
Exception analysis does not know the Temporal `fromStringOrThrow` functionsPosiblemente ocupada @cknitt la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rescript-lang/rescript#9182 ·
Los mantenedores suelen responder en 1 día
-
Build system: make output wording and labels consistentPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
rescript-lang/rescript#9244 ·
Los mantenedores suelen responder en 1 día
-
Build system CLI: behavior that disagrees with the help textPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 43/100
rescript-lang/rescript#9242 ·
Los mantenedores suelen responder en 1 día
-
Build system: a failed first build forces full rebuilds, and clean breaks a running watchPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
rescript-lang/rescript#9241 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
rescript-lang/rescript#9239 ·
Los mantenedores suelen responder en 1 día
Todos los issues de rescript-lang/rescript
Issues similares
-
bug good first issue priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TMHSDigital/Free-Game-Dev-Assets#250 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
fish-shell/fish-shell#13084 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
http-party/http-server#982 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
hardikverma22/sandfit#20 ·
Los mantenedores suelen responder en 1 día