Skip to content

Suppres project prefix from local module names#2937

Merged
mzagozen merged 3 commits into
mainfrom
remove-test-proj-duplicates
Jun 18, 2026
Merged

Suppres project prefix from local module names#2937
mzagozen merged 3 commits into
mainfrom
remove-test-proj-duplicates

Conversation

@mzagozen

Copy link
Copy Markdown
Collaborator

This aligns the compiler output to consistently print local project names without the project prefix:

  • acton build
  • acton test list
  • acton test --module
  • paths in error messages

I didn't do snapshots/expected paths, but I guess that should be updated too?

@mzagozen mzagozen force-pushed the remove-test-proj-duplicates branch from a5ead24 to 69bdafd Compare June 16, 2026 18:43
mzagozen added 3 commits June 17, 2026 21:00
`acton test list` and `acton test --json` emitted fully-qualified,
project-prefixed module names (e.g. `proj.mod`), but every consumer
expects the bare name: the VS Code extension resolves modules to
`src/<mod>.act`, the `--module` flag re-adds the project prefix itself,
and run-result matching pairs discovery names against result names.

Strip the prefix at every user-facing output site -- test-list
JSON/text, run-result JSON/text, and the live progress UI's module
headers -- mirroring #2929 which did the same for build progress
output. The live UI was the most-visible gap: interactive runs showed
`proj.mod` while piped/JSON output already showed the bare name.

Route both header renderers through a single shared `moduleHeaderLine`
(previously duplicated in TestRunner and TestUI) and drop the dead
trace scaffolding. Internal task keys, snapshot paths, caches and
perf_data keep the canonical prefixed name.
Build progress labels, the incremental Stale/Fresh/Hash-delta lines,
the --dbp selection lines, and compile-error source paths all rendered
the project-prefixed module name (e.g. `proj.mod`, `proj/mod.act`),
doubling the prefix for nested modules (`proj.proj.mod`,
`proj/proj/mod.act`). Every consumer wants the bare name: it matches
the `--module` input, the `src/` layout, and the path users actually
open.

Render the bare name at these user-facing sites, mirroring the test
output fix: modLabel strips the root project prefix (dependency
modules stay qualified); compile/scope/type errors anchor on the
de-prefixed path; the verbose rebuild-reason lines drop the prefix;
and the --dbp selection/disabled/failure lines de-prefix via the
project paths threaded through the selection helpers. Internal task
keys, snapshot paths, the .tydb/output layout, and internal-error and
debug messages keep the canonical prefixed name.

Make the incremental test helpers (matchesModule, statusReported)
match module identity across prefixed and bare formats, and update the
DBP test assertions to the bare names.
@mzagozen mzagozen force-pushed the remove-test-proj-duplicates branch from 69bdafd to 294253f Compare June 17, 2026 19:00
@mzagozen mzagozen marked this pull request as ready for review June 17, 2026 19:05
@mzagozen mzagozen merged commit 4dbaa8a into main Jun 18, 2026
47 checks passed
@mzagozen mzagozen deleted the remove-test-proj-duplicates branch June 18, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant