Skip to content

def.bzl: fix extra_args.#62

Merged
jayconrod merged 2 commits intobazel-contrib:masterfrom
diegs:extra-args
Dec 28, 2017
Merged

def.bzl: fix extra_args.#62
jayconrod merged 2 commits intobazel-contrib:masterfrom
diegs:extra-args

Conversation

@diegs
Copy link
Copy Markdown
Contributor

@diegs diegs commented Dec 28, 2017

The extra_args (and args, via the fallback logic) are no longer being
added to the generated bash script.

The extra_args (and args, via the fallback logic) are no longer being
added to the generated bash script.
@diegs
Copy link
Copy Markdown
Contributor Author

diegs commented Dec 28, 2017

Sorry, the other deltas were performed automatically by buildifier. I can back them out.

Copy link
Copy Markdown
Contributor

@jayconrod jayconrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing! I reverted the buildifier changes; it works well on build files, not as much for .bzl.

@jayconrod jayconrod merged commit 57a4458 into bazel-contrib:master Dec 28, 2017
@diegs diegs deleted the extra-args branch December 28, 2017 21:54
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants