Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update-repos: insert rules and macros higher in WORKSPACE (bazel-cont…
…rib#876) update-repos now calls a function, findWorkspaceInsertIndex, which finds the best place to insert new dependencies. It looks for an index after repositories containing repository rules are declared and after loads from files that contain known repository rules. It returns an index after that index, following any calls that appear to be direct dependencies. merger now recognizes a private attribute on unmatched, generated rules indicating where they should be inserted. I'm not sure if this is a good interface yet, so marked as unstable. Updated the Gazelle boilerplate so that the load of @bazel_gazelle//:deps.bzl appears before go_rules_dependencies. New dependencies must be added after this loaded (because go_repository will be loaded from there), but they ought to be added before go_rules_dependencies, since it's common to override protobuf, x_tools and other things in there. Fixes bazel-contrib#865
- Loading branch information