Add ShortenAbsoluteLabelsToRelative configuration option#3492
Open
hartblanc wants to merge 2 commits intothought-machine:masterfrom
Open
Add ShortenAbsoluteLabelsToRelative configuration option#3492hartblanc wants to merge 2 commits intothought-machine:masterfrom
hartblanc wants to merge 2 commits intothought-machine:masterfrom
Conversation
Author
|
After pondering about please-build/puku#147, I'm actually wondering if we want to make The approach of gofmt for example, is to not allow any configuration and 'Gofmt's style is no one's favorite, yet gofmt is everyone's favorite.'. This works very nicely for tools which modify go source code, as they are able to always produce well-formatted output by simply calling gofmt (as a library). For this reason, whilst it seems a little crude at first, I'm wondering if please-build/buildtools#10 might actually be preferable to this approach. |
toastwaffle
approved these changes
Mar 2, 2026
toastwaffle
reviewed
Mar 2, 2026
Contributor
toastwaffle
left a comment
There was a problem hiding this comment.
Please could you fix the lint (otherwise this is good to go)
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 change ensures that absolute labels to package-local targets (e.g.
//a/b/c:d) are transformed into local labels (e.g.:d) by the please format command when the newFormat.ShortenAbsoluteLabelsToRelativeconfig option is enabled.The aim of this change is to address #3471.
This change supercedes please-build/buildtools#10.