rescript format: aborts on a syntax error, unstable output, raw compiler errors
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 56/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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>.
- Linguagem predominante
- OCaml
- Estrelas
- 7.5k
- Forks
- 485
- Merge médio
- 16h 51min
- PRs com merge (30d)
- 268
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de rescript-lang/rescript
-
Exception analysis does not know the Temporal `fromStringOrThrow` functionsTalvez já em andamento @cknitt assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
rescript-lang/rescript#9182 ·
Mantenedores costumam responder em até 1 dia
-
Build system: make output wording and labels consistentTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
rescript-lang/rescript#9244 ·
Mantenedores costumam responder em até 1 dia
-
Build system CLI: behavior that disagrees with the help textTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 43/100
rescript-lang/rescript#9242 ·
Mantenedores costumam responder em até 1 dia
-
Build system: a failed first build forces full rebuilds, and clean breaks a running watchTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 52/100
rescript-lang/rescript#9241 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 54/100
rescript-lang/rescript#9239 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de rescript-lang/rescript
Issues semelhantes
-
bug good first issue priority: low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
TMHSDigital/Free-Game-Dev-Assets#250 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
fish-shell/fish-shell#13084 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
http-party/http-server#982 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
hardikverma22/sandfit#20 ·
Mantenedores costumam responder em até 1 dia