Comments (1)
To expand on this a bit, Gazelle merges generated rules with existing rules by looking for rules with matching kinds and names (e.g., go_library(name = "go_default_library")
. When there is no match, Gazelle adds new rules to the file instead of merging. Existing rules that don't match are ignored.
The proposal here is to make the matching logic smarter. For example, if there is a single go_binary
rule with a matching import path, we could merge with that, regardless of the name.
Gazelle may change the names of rules when then fix
command is run, but only when references to renamed rules can be updated safely.
from bazel-gazelle.
Related Issues (20)
- gazelle:default_visibility directive does not work properly HOT 2
- bug(bzlmod): go_deps overrides should fail with `path` that doesn't exist
- `findGoTool` uses the system Go when it should use the Go defined in the Bazel workspace
- feat(bzlmod): script to generate `go_deps.{}_override`s from `go_repository` rules in a `.bzl` file
- embedsrcs fails when downloading files with http_archive
- Bug: when the go code embedded a file that located in another package gazelle will ignore that file HOT 1
- `# gazelle:resolve` directives are very inefficient
- bug(cmd/gazelle): `:gazelle_test` is broken on Bzlmod HOT 1
- BUILD file not found in directory 'modfile' of external repository @org_golang_x_mod. HOT 4
- gazelle resolve directives not working
- idea: lang/go: generate BUILD files from `go build -x` output HOT 1
- go_deps extension doesn't generate indirect dependencies HOT 2
- gazelle generates and recreates grpc targets that rules_go complains about HOT 6
- Missing documentation and best practices for bzlmod HOT 9
- Support Golang Workspaces in Gazelle HOT 6
- gazelle 0.35.0 panics HOT 4
- #gazelle:proto file” directive isn’t usable unless option go_package is explicitly set in each proto_library HOT 18
- Error in fail: failed to fetch com_github_gorilla_mux: go: missing Git command.
- Gazelle requires WORKSPACE when using update-repos in a bzlmod only repo HOT 4
- Gazelle fails with `BUILD file not found in directory` for Go module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazel-gazelle.