forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix that running on a BUILD file expands to all of its targets (pants…
…build#16546) ## Problem @thejcannon is moving formatting of BUILD files from `update-build-files` to `fmt`. But there's a weird edge: `./pants fmt BUILD` often formats much more than `BUILD` because it runs on all the defined targets. Josh and I both believe this is not intuitive - a user would expect only `BUILD` to be changed. Before: ``` ❯ ./pants --cli-build-files-expand-to-targets list BUILD //BUILD_ROOT:files //cargo:scripts //conftest.py:test_utils //pants:scripts //pants.toml:files ``` After: ``` ❯ ./pants --no-cli-build-files-expand-to-targets list BUILD 15:12:08.84 [WARN] No targets were matched in goal `list`. ``` While this is technically a user API change, we believe the old behavior was buggy and not intentional. It also was not documented. So we fix this as a bug fix, without using a deprecation. ### `--changed-since` It's important that `--changed-since` does expand BUILD files to their targets, as changing a BUILD file might result in any of the targets changing too. This preserves that behavior, regardless of `--cli-build-files-expand-to-targets `.
- Loading branch information
1 parent
1551fe8
commit 35866ff
Showing
4 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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