Skip to content

Commit

Permalink
tidy: document MODULE.bazel.lock maintencance
Browse files Browse the repository at this point in the history
  • Loading branch information
malt3 committed May 22, 2024
1 parent d9c7c07 commit 2c82882
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/test-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ jobs:
- name: Run Bazel tidy
shell: bash
run: bazel run //:tidy
run: |
bazel run //:tidy
bazel mod deps --lockfile_mode=update
- name: Check if untidy
id: untidy
Expand Down
7 changes: 7 additions & 0 deletions dev-docs/workflows/bazel.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
Bazel is the primary build system for this project. It is used to build all Go code and will be used to build all artifacts in the future.
Still, we aim to keep the codebase compatible with `go build` and `go test` as well.
Whenever Go code is changed, you will have to run `bazel run //:tidy` to regenerate the Bazel build files for Go code.
Additionally, you need to update `MODULE.bazel`, together with `MODULE.bazel.lock`:

```
# if the steps below fail, try to recreate the lockfile from scratch by deleting it
bazel mod deps --lockfile_mode=update
bazel mod tidy
```

## Bazel commands

Expand Down

0 comments on commit 2c82882

Please sign in to comment.