bazel sync --experimental_repository_resolved_file is formatted differently than buildifier
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Description of the problem / feature request:
The output of `bazel sync --experimental_repository_resolved_file` is formatted differently than `buildifier` formats .bzl files. If both sync and buildifer are used in a pre-commit hook this can cause the hooks to continuously fail.
### Feature requests: what underlying problem are you trying to solve with this feature?
Consistent formatting of bazel files and not having pre-commit hooks continuously fail.
### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Run `bazel-sync --experimental_repository_resolved_file=resolved.bzl` and then `buildifier resolved.bzl` and observe that the file has changed in formatting.
### What operating system are you running Bazel on?
Debian Linux.
### What's the output of `bazel info release`?
release 4.2.2
### Have you found anything relevant by searching the web?
No
### Any other information, logs, or outputs that you want to share?
No
Contributor guide
Research direction
Reproduce the issue with `bazel sync --experimental_repository_resolved_file=resolved.bzl` and then `buildifier resolved.bzl` on Debian Linux. Compare the generated `resolved.bzl` formatting with buildifier's result; done means the two commands no longer produce continuously changing formatting.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100