Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR]: automatically configure BUILD files when needed #684

Open
alexeagle opened this issue May 7, 2024 · 0 comments
Open

[FR]: automatically configure BUILD files when needed #684

alexeagle opened this issue May 7, 2024 · 0 comments
Labels
enhancement New feature or request untriaged Requires traige

Comments

@alexeagle
Copy link
Member

alexeagle commented May 7, 2024

What is the current behavior?

Currently users get an error from Bazel or their application when BUILD files are out-of-date. For example, adding a new source file to a package that doesn't use glob means that source file won't be included in actions that invoke a build step. They have to interpret this error to mean "BUILD files are outdated" and then run aspect configure manually to fix them.

Describe the feature

https://pkg.go.dev/github.com/bazelbuild/bazel-gazelle/cmd/autogazelle is one attempt at this, it's highly experimental and I don't know of success stories.

Some ideas:

  1. At Google, an editor plugin detects code changes that should run gazelle (actually the google3 equivalents "glaze", "taze", etc).
  2. watch the filesystem, similar to what we need for Support "watch mode" #63 so we know that a source file is created or other changes that make BUILD files "dirty" and run configure. But this implies that the CLI starts a daemon process is always running. Note that bb-clientd is already a similar shape.
  3. watch for build errors that suggest that configure needs to be re-run. Then retry the same bazel command again, so the user only notices a slower build but doesn't need to manually configure
@alexeagle alexeagle added the enhancement New feature or request label May 7, 2024
@github-actions github-actions bot added the untriaged Requires traige label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request untriaged Requires traige
Projects
None yet
Development

No branches or pull requests

1 participant