def.bzl: fix extra_args.#62
Merged
jayconrod merged 2 commits intobazel-contrib:masterfrom Dec 28, 2017
Merged
Conversation
The extra_args (and args, via the fallback logic) are no longer being added to the generated bash script.
Contributor
Author
|
Sorry, the other deltas were performed automatically by |
jayconrod
approved these changes
Dec 28, 2017
Contributor
jayconrod
left a comment
There was a problem hiding this comment.
Thanks for fixing! I reverted the buildifier changes; it works well on build files, not as much for .bzl.
gh-worker-dd-mergequeue-cf854d bot
pushed a commit
to DataDog/datadog-agent
that referenced
this pull request
Mar 27, 2026
…nsistencies (#48279) ### What does this PR do? Remove `gazelle` exclusions that had to be put in place pending a fix for `gazelle` confused by `build` directories on "broken" case-insensitive filesystem stacks (docker/desktop-feedback#251). Doing so, I realized there were inconsistencies in the `gazelle` setup and took the opportunity to fix them. ### Motivation #48455 indeed allows to get rid of the following exclusions: ``` # TODO(agent-build): This exclusion is ready for removal, blocked by issues caused by the interaction of # Bazel with directories named `build` created by the CMake builds. We can remove this once we remove CMake # support or we upgrade to a Bazel version containing a fix: bazelbuild/bazel#26842 # In the meantime, temporarily remove this exclusion locally if regeneration of BUILD files is required # gazelle:exclude rtloader ... # gazelle:exclude .gitlab ``` Nearby inconsistencies in the `gazelle` setup: - `build_tags` is passed by attribute (`build_tags = ALL_BUILD_TAGS`) => OK (**canonical**), - `external` was passed by `args` (`-external=static`) => pass by attribute (`external = "static"`), - `prefix` was passed by directive (`# gazelle:prefix github.com/DataDog/datadog-agent`) => pass by attribute (`prefix = "github.com/DataDog/datadog-agent"`), - `args` happens to be a [compatibility shim](bazel-contrib/bazel-gazelle#62) => use `extra_args` (**canonical**) when there's no corresponding attribute yet: - `build_file_name` was passed by `args` and doesn't have a corresponding attribute yet => pass by `extra_args`, - `strict` was passed from a single GitLab job and doesn't have a corresponding attribute yet => pass by `extra_args`. ### Describe how you validated your changes Kind assistance of @alopezz and/or @JSGette who run Linux containers on their macOS-powered laptop. Co-authored-by: regis.desgroppes <[email protected]>
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.
The extra_args (and args, via the fallback logic) are no longer being
added to the generated bash script.