Hidden paths resolve per file like every other option
Date: 2026-12-01
Area: errors, cli
Related: #2495, refines
ADR 0228, Errors — Hidden paths
Context
ADR 0228 widened --hide-paths to every line a run
prints and made it a setting for the whole run that only the command line or the root config sets, ignoring a nested
config's "hide-paths" with a warning. That is a mechanism no other option has. It also broke a working setup:
GocciaTestRunner given several files and no --config applies no root config, so a project's "hide-paths": true
stopped hiding that run's paths. On 2026-12-01 Johannes asked: "Shouldn't hide paths follow the same config mechanism
with config files, CLI etc. rather than doing a new mechanism that causes compatibility problems", and agreed to the
decision below ("Agreed, go ahead").
Decision
--hide-pathsresolves as every option does (Build System — Configuration File): the command line, then the"hide-paths"of the config nearest the file, then the root config. GocciaTestRunner given several files and no--configgives each file its nearest config, as it does for every other option.- A line about one file follows that file's setting: its engine's diagnostics and messages (the engine gets the
root only when the file's setting is on, as ADR 0225 had it), its progress line (
[n/m],Running script,Compiling:,Compiled to,Source map written to), an error naming it (Error in <file>, an input that cannot be read,File not found), the file name its JSON report gives, and an inline snapshot written back into it. The CLI maps such a line withTGocciaCLIApplication.ShownPathFor(<file>, <path>), or with the file's config when it has loaded it (TGocciaEngineOptions.ShownPathWhen). The test runner'sTest Results Failed Tests:summary repeats each file's failure lines, which that file's engine rendered with its stack frames, so each entry keeps its file's setting; the summary's counts name no path. - A line that belongs to no single file follows the command line and the root config: a config's warning,
Path not foundfor an input that is not there, a bundler collision (two inputs and the output they share), and the main thread's messages outside any file's engine (TGocciaEngineOptions.ShownPath). Every runner runs each file's engine on a thread of its own, so a file's root never stays on the main thread; the REPL's one engine runs on the main thread under its one config. - The root does not move: paths are shown relative to the root config's directory, else the working directory, as ADR 0225 set it; a nested config that turns the option on uses the same root.
- The root is always set:
TGocciaEngineOptions.DiagnosticPathRootis the run's root whether the option is on or off, replacing ADR 0228's''when it is off. Whether it applies is decided per file: a file's engine gets it only when the file's setting is on (ResolveFileSettings), and a line that belongs to no file uses it only when the command line or the root config turns the option on. - The nested-config warning is gone, since a nested
"hide-paths"now takes effect. - Everything else ADR 0228 decided stands: which lines are hidden, how an engine's thread maps a path, and what stays unchanged.
Consequences
- A project's
"hide-paths": truehides the paths of a GocciaTestRunner run over several files without--configagain. - A nested config's
"hide-paths": falseturns the option off for the files it governs, as a nested config can for any option;--hide-pathson the command line turns it on for every file. - One run can show some files' paths and hide others'. A line about one file is shown by that file's setting, so a file's message, suggestion and stack frame still name it one way; a line that belongs to no file can differ from the files' own lines when their configs disagree with the root config.