feat(coverage): upload each source map's repo-relative path for monorepo source resolution#810
Merged
Merged
Conversation
…epo source resolution upload-source-maps now sends the map file's path relative to the repo root (e.g. dashboard/dist/assets/X.js.map) alongside the existing fileName, as a new optional mapPath field. The fallow.cloud source-evidence viewer uses it to resolve a map's relative sources[] (../../src/components/X.tsx) against the map's directory, recovering the package-prefixed path dashboard/src/components/X.tsx so it matches the monorepo-relative runtime coverage path. Previously only the basename was known, so the cloud collapsed ../../src/X to src/X and the viewer reported source_not_in_maps for monorepo sub-packages. The field is omitted when a map is not under the repo root (an absolute --dir outside it); the cloud then falls back to its prior root-anchored normalization, so the change is backwards compatible and a no-op for single-package projects. fileName and --strip-path are unchanged. Closes fallow-rs/fallow-cloud#260.
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.
What
fallow coverage upload-source-mapsnow sends each map file's path relative to the repo root (e.g.dashboard/dist/assets/X.js.map) as a new optionalmapPathfield, alongside the existingfileName.Why
The fallow.cloud source-evidence viewer resolves a map's relative
sources[](e.g.../../src/components/X.tsx) back to original source. For a monorepo sub-package map it previously had only the basename, so it collapsed../../src/Xtosrc/Xand the package-prefixed runtime pathdashboard/src/components/X.tsxnever matched, yieldingsource_not_in_maps. With the map's repo-relative path, the cloud resolves each source against the map's directory and recoversdashboard/src/components/X.tsx.Behavior
mapPathis omitted when a map is not under the repo root (an absolute--diroutside it); the cloud then falls back to its prior normalization, so this is backwards compatible and a no-op for single-package projects.fileNameand--strip-pathare unchanged.upload-source-mapsfrom the repo root so the prefix is correct (already the documented usage).Tests
map_pathis repo-root-relative when--diris a subdirectory;Nonefor a map outside the root; request serializesmapPathand omits it when absent. fmt + clippy clean.Cross-repo
Pairs with fallow-rs/fallow-cloud#265, which persists
map_pathand resolves sources against the map directory.Closes fallow-rs/fallow-cloud#260.