Build system: make output wording and labels consistent

Ouverte
#9,244 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@cknitt y travaille déjà.

Depuis le 6/11/2026.

  • #9250 par @cknitt — ouverte

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
48/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
ocaml

Piste de recherche

Reproduce the listed output issues with ReScript 13.0.0-alpha.8 and inspect the named files under rewatch-ocaml/, starting with build_report.ml and output.ml. The report names specific locations for build, clean, diagnostics, scheduling, and compiler output. Done means correcting the listed wording, labels, ordering, and color behavior across terminal and redirected output, then checking each reproduction.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

The build system's messages still follow the Rust implementation's output, which the OCaml one had to match exactly. Now that #9238 removes it, they can be made consistent. All reproduce with rescript 13.0.0-alpha.8; paths are in rewatch-ocaml/.

Progress and results

  • Wrong plurals: Parsed 1 source files, Compiled 1 modules, in plain and terminal output (build_report.ml:52-54, output.ml).
  • A failed one-shot build ends with Incremental build failed. Error: \e[2K\r Failed to Compile. See Errors Above (parse errors: Could not parse Source Files): "Incremental", the Error: in mid-sentence, Title Case, and a line-clear sequence even when redirected (build.ml:317-330).
  • Cleaned 0/0 on every fresh build; a no-op build prints Cleaned 0/1, Parsed 0 source files, Compiled 0 modules (build_report.ml:50-53). The counts are stale ASTs out of previous ASTs, which the line does not say.
  • A redirected one-shot build prints no completion line, while watch prints Finished initial compilation (build_report.ml:89).
  • Redirected rescript clean prints only Cleaning <pkg> (clean.ml:98). In a terminal with "in-source": false, it prints Cleaning files... / Cleaned files with an empty suffix list (clean.ml:102-110).

Diagnostics

  • ERROR: with exit 0: a dependency source folder that is missing or is a file prints ERROR: / Could not read folder: "nosuch". Specified in dependency: dep, located "<path>"..., and the build succeeds. The root package is also called "dependency", and a file is called a folder (package_diagnostics.ml:87-91).
  • The field 'ignored-dirs' … is not supported by ReScript 12's new build system. (config.ml:410-415).
  • Could not start Rescript build next to A ReScript build is already running (build_lock.ml:14, :174, project_context.ml:8).
  • Labels: ERROR:, WARN:, DEBUG: and TRACE: sit on their own line before the message (package_diagnostics.ml:88, :96, output.ml:5-7), while other warnings have none: Duplicated package: a ./node_modules/a (chosen) vs … in ./node_modules/b (package_resolution.ml:76), No implementation file found for interface file (skipping): src/B.resi, which also starts with a line-clear sequence when redirected (package_graph.ml:111).
  • Config diagnostics (deprecated bsc-flags, unknown fields) are printed after the Parsed/Compiled lines and after compiler warnings, with three blank lines before the first and one between the others (build_report.ml:64-73, config.ml:313).
  • Parse errors get an Error in <pkg>: header; type errors do not (package_parse.ml:103).

Verbose output

  • -vv prints compile dirty: A without a label (compiler_scheduler.ml:117), and TRACE: / Compiled 2 out of 2 in the universe (compiler_scheduler.ml:404).

Colors

  • With NO_COLOR=1, progress lines lose their colors, but compiler errors and warnings keep them; compiler output is also colored when redirected. bsc is always run with -color always (compiler_process.ml:240-241 and the compile arguments), while progress output follows output.ml:102-119.
Langage dominant
OCaml
Étoiles
7.5k
Forks
485
Merge moyen
16 h 51 min
PR mergées (30 j)
268

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de rescript-lang/rescript

Toutes les issues de rescript-lang/rescript

Issues similaires

Plus d'issues Build System

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.