Suppres project prefix from local module names#2937
Merged
Conversation
a5ead24 to
69bdafd
Compare
`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.
69bdafd to
294253f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This aligns the compiler output to consistently print local project names without the project prefix:
I didn't do
snapshots/expectedpaths, but I guess that should be updated too?