Closed as duplicate of#2627
Closed as duplicate of#2627
Description
🐞 bug report
Affected Rule
- py_binary
Is this a regression?
I don't think this is a regression as I've seen this since I started using gazelle.
Description
When running gazelle on a directory with a new .py
file that satisfies the constraints for a py_binary
, it will replace existing py_binary
definitions for this new .py
file.
🔬 Minimal Reproduction
Here's a reproduction on my personal repo, lmk if it'd be easier to make a whole new repo:
I'm not having much luck with a simpler attempt at reproduction:
- Attempt to Reproduce gazelle issue michael-christen/rules_python#1
That is because fix: Gazelle bug with merging py_binary targets in per-file mode and partial update #2619 fixed this, going to prior commits, it was reproducible.
Note that this issue is a duplicate of Gazelle generation mode per file: Unexpected behavior if a binary is added to a folder containing a binary. #2627.
🔥 Exception or Error
No exception, just a silent overriding of behavior.
🌍 Your Environment
Operating System:
± lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
Output of bazel version
:
± bazel version
Bazelisk version: v1.24.1
INFO: Invocation ID: ef6a53a8-04a1-4f25-a901-b8283410ff9e
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Jan 01 00:00:00 1970 (0)
Build timestamp: Thu Jan 01 00:00:00 1970 (0)
Build timestamp as int: 0
bazel commit: bazelbuild/bazel@0ddcfd3
Rules_python version:
0.34.0
Anything else relevant?
I've seen this across a wide variety of repos and setups.
# gazelle:python_generation_mode file
is configured in BUILD
Metadata
Metadata
Assignees
Labels
No labels