builder: add use_relative_replace_paths#15098
Open
braydonk wants to merge 6 commits intoopen-telemetry:mainfrom
Open
builder: add use_relative_replace_paths#15098braydonk wants to merge 6 commits intoopen-telemetry:mainfrom
braydonk wants to merge 6 commits intoopen-telemetry:mainfrom
Conversation
When users want to track their generated OCB directory in source control, absolute paths don't work because the `go replace` statements need to resolve on any machine. This PR adds the `dist::use_relative_replace_paths` feature so that `path` values in modules are not forcibly resolved to absolute paths and instead calculated as relative paths to the output directory.
braydonk
commented
Apr 10, 2026
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (78.26%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #15098 +/- ##
==========================================
- Coverage 91.26% 91.24% -0.03%
==========================================
Files 699 699
Lines 44766 44776 +10
==========================================
Hits 40855 40855
- Misses 2769 2775 +6
- Partials 1142 1146 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
I wonder if anyone would actually explicitly want to keep paths absolute, and not have them made relative. |
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.
Description
When users want to track their generated OCB directory in source control, absolute paths don't work because the
go replacestatements need to resolve on any machine. This PR adds thedist::use_relative_replace_pathsfeature so thatpathvalues in modules are not forcibly resolved to absolute paths and instead calculated as relative paths to the output directory.Link to tracking issue
Fixes #15097
Testing
I installed the tool locally and used it in our setup. When I had this module:
I got the following replacement:
I was able to build successfully.
Documentation
Added to the config docs in README.
AI Usage Disclosure
The code changes in this PR were created with AI assistance via Gemini/Antigravity.