You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
N/A. This isn't a rule-related bug, but rather a bug with the pre-commit hook update-deleted-packages.
Is this a regression?
No.
Description
Running pre-commit run update-deleted-packages --all-files actually removes items that were added by the script that it calls (./tools/update_deleted_packages)
Add a new example dir: ./examples/foobar with BUILD.bazel, MODULE.bazel, foo.py files.
run ./tools/update_deleted_packages.sh
Note that examples/foobar is now included in .bazelrc's --deleted_packages arg.
Run pre-commit run update-deleted-packages --all-files
Expected Result:
.bazelrc is unchanged, as it was already updated in (3).
Actual Result:
The examples/foobar value is no longer present in --deleted_packages
🔥 Exception or Error
$ pre-commit run update-deleted-packages --all-filesUpdate deleted packages..................................................Failed- hook id: update-deleted-packages- files were modified by this hookINFO: Analyzed target @@rules_bazel_integration_test~0.20.0//tools:update_deleted_packages (0 packages loaded, 0 targets configured).INFO: Found 1 target...Target @@rules_bazel_integration_test~0.20.0//tools:update_deleted_packages up-to-date: bazel-bin/external/rules_bazel_integration_test~0.20.0/tools/update_deleted_packagesINFO: Elapsed time: 29.376s, Critical Path: 0.01sINFO: 1 process: 1 internal.INFO: Build completed successfully, 1 total actionINFO: Running command line: bazel-bin/external/rules_bazel_integration_test~0.20.0/tools/update_deleted_packagesdirname: missing operandTry 'dirname --help' for more information.
🌍 Your Environment
Operating System:
$ # Ubuntu 22.04 on WSL(1) on Windows 10.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
Output of bazel version:
$ bazel version
Bazelisk version: v1.19.0
Build label: 7.0.0
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Mon Dec 11 16:51:49 2023 (1702313509)
Build timestamp: 1702313509
Build timestamp as int: 1702313509
🐞 bug report
Affected Rule
N/A. This isn't a rule-related bug, but rather a bug with the pre-commit hook
update-deleted-packages
.Is this a regression?
No.
Description
Running
pre-commit run update-deleted-packages --all-files
actually removes items that were added by the script that it calls (./tools/update_deleted_packages
)🔬 Minimal Reproduction
See also #1842 (comment).
./examples/foobar
withBUILD.bazel
,MODULE.bazel
,foo.py
files../tools/update_deleted_packages.sh
examples/foobar
is now included in.bazelrc
's--deleted_packages
arg.pre-commit run update-deleted-packages --all-files
Expected Result:
.bazelrc
is unchanged, as it was already updated in (3).Actual Result:
The
examples/foobar
value is no longer present in--deleted_packages
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Dirty working tree off commit cdc7f2f
Anything else relevant?
The text was updated successfully, but these errors were encountered: