-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/buildattr: implement
@ignore
attributes
This adds support for an `@ignore()` attribute to enable a file to be unconditionally ignored. Unlike `@if` build attributes, a file with an `@ignore()` attribute is always ignored when calculating dependencies, for example when running `cue mod tidy`. We decided against following Go's lead here, which would have been `@if(ignore)` because there is no existing convention like Go had, and because this is sufficiently different from regular build tags that it seems like it justifies another attribute. Also because `@ignore()` seems to read a bit better than `@if(ignore)`. Fixes #2962. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I7ee84cea2ffce6765bd7667feb78c4d44e0254ea Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198249 TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Daniel Martí <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information
Showing
6 changed files
with
84 additions
and
61 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
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