From 8de8f59d47ef00c077ec53ad7a0ee5610cfdf746 Mon Sep 17 00:00:00 2001 From: Rin Kuryloski Date: Thu, 23 Feb 2023 14:47:41 +0100 Subject: Use gazelle generated bazel files Bazel build files are now maintained primarily with `bazel run gazelle`. This will analyze and merge changes into the build files as necessitated by certain code changes (e.g. the introduction of new modules). In some cases there hints to gazelle in the build files, such as `# gazelle:erlang...` or `# keep` comments. xref checks on plugins that depend on the cli are a good example. --- BAZEL.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'BAZEL.md') diff --git a/BAZEL.md b/BAZEL.md index 6e0cd55153..868b02be7a 100644 --- a/BAZEL.md +++ b/BAZEL.md @@ -71,15 +71,23 @@ Note: This takes quite some time on a single machine. `bazel test //deps/rabbit:lazy_queue_SUITE` -## Add/update an external dependency from hex.pm +## Add/update an external dependency + +### from hex.pm 1. `bazel run gazelle-update-repos -- -args hex.pm/accept@0.3.5` to generate/update `bazel/BUILD.accept` 1. `git checkout WORKSPACE` to reset the workspace file 1. Add/update the entry in MODULE.bazel -## Add/update an external dependency from github +### from github + +1. `bazel run gazelle-update-repos -- -args --testonly github.com/extend/ct_helper@master` +1. `git checkout WORKSPACE` to reset the workspace file +1. Add/update the entry in MODULE.bazel + +## Update BUILD files -`bazel run gazelle-update-repos -- -args --testonly github.com/extend/ct_helper` +`bazel run gazelle` ## Additional Useful Commands -- cgit v1.2.1