Hidden paths cover every line a run prints, and only the command line or the root config turns them on
Date: 2026-12-01
Area: errors, cli
Related: #2474, refines
ADR 0225, Errors — Hidden paths
Context
ADR 0225 added --hide-paths for diagnostics' locations:
stack traces, the uncaught error's --> line, parse warnings and the JSON reports' file names. It kept error messages,
a permission error's Suggestion: line and the lines that echo an input (Running script, the test runner's progress
lines) as they were, and it let a nested config's "hide-paths": false turn the option off for its files. A run with
the option on still printed host directories, which is what the option exists to prevent. On 2026-12-01 Johannes
decided both points ("Agree with all"): those lines hide paths too, and only the root config or the command line sets
the option.
Decision
-
Every line a run prints that names a host file shows it hidden, in the form ADR 0225 set (relative to the root inside it,
<external>/<name>outside it):- error messages the engine makes (
Cannot find module '<path>',Cannot load bytecode module,The module <path> did not finish evaluating, a data module's parse error, a globals file, manifest or virtual-module config that cannot be read, a snapshot file the test runner refuses or cannot write); - an absolute specifier, whether the source wrote it or the host loads a file of its own (a config's globals module,
a manifest,
--host-environment), in aPermissionDeniedmessage and scope and inModule not found. A relative specifier is the program's own text and stays as written; - a permission error's
Suggestion:line: the path and the directory a grant would name; - the lines that name an input or an output (
Running script, the test runner's[n/m]lines, the bundler'sCompiling:andCompiled to,Source map written to,Path not found,Error in <file>, an input that cannot be read) and the warnings about a config or a virtual module.
The root itself, which a suggestion can name as a directory, is shown as
.. - error messages the engine makes (
-
Where a path is mapped: text the engine makes during a run maps it with
ShownHostPathorStackSourceForDisplayunder the root the running engine sets for its thread, so an embedder'sDiagnosticPathRoothides it too. The CLI sets the same root for its main thread once the root config is read, and maps the text it prints withTGocciaEngineOptions.ShownPath. -
The setting holds for the whole run.
--hide-pathsand the root config's"hide-paths": trueturn it on;TGocciaEngineOptions.DiagnosticPathRootis''when it is off and every file of the run uses the same root. A nested config's"hide-paths"is ignored, with a warning when its value disagrees with the run's. -
Unchanged:
- what the program computes for itself:
import.meta.url,import.meta.resolve()and a relative specifier as the source wrote it; - the report files an operator asks for (audit log, coverage, profile output), an error in writing one, and the path
stored in a
.gbcheader; - errors in the configuration itself, which stop the run: an invalid config value, a missing
extendstarget or import map, and the report of configs whose permissions are not trusted, whose commands are meant to be pasted; - commands that are not a script run: the trust commands (
--trustand the commands that list or remove trusts) and--install, whose output is the operator's own files; - sandbox mode, whose paths are already virtual, and the host paths of its copy inputs and write-back report.
- what the program computes for itself:
Consequences
- One host file has one spelling in a run's output with the option on: a message and a suggestion name it as its stack frame does.
- A suggestion's
--allow-read=<external>/...cannot be pasted back as a flag; the option trades that convenience for not showing where the file is. Without--hide-pathsthe suggestion names the real path. - A nested config can no longer turn the option off for a directory of test fixtures; run without
--hide-pathsto see their full paths. - GocciaTestRunner given several files and no
--configapplies no root config, so a project's"hide-paths": trueno longer hides that run's paths as it did when each file's own config set the option. The warning names--configand--hide-paths, either of which turns it on. - Output written before the root config is read (an error in reading the root config itself,
--confignaming a path that is not there) cannot know the setting and keeps the path as given.