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
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
macOS 12.3.1
Apple M1 Pro
What did you do?
I have a project where a few things are compiled conditionally (based on the tag). There are different files for when the tag is there and not, eg:
file.go # Compiled when +build !mytag
file_mytag.go # Compiled when +build mytag
Gazelle generates the BUILD files at the time of running:
bazel run //:gazelle
It's required that I pass the -build_tags=mytag to generate the build file so I can later on compile with --define gotags=mytag. I there a way I can get build files with conditional where I don't have to generate a different build file for different tags.
What did you expect to see?
Something that conditionally builds based on the tag provided later on by --define gotags=... like here.
What did you see instead?
No conditionals in build files, instead just static files based on the tag specified while generating them.
The text was updated successfully, but these errors were encountered:
patrickmscott
pushed a commit
to patrickmscott/bazel-gazelle
that referenced
this issue
Sep 27, 2024
Gazelle already iterates over all supported os/arch combos to include go
files. This is similar but expanded to custom tags. When adding a new
build tag, we create a copy with the tag set to true and append to the
original. This means that build tag evaluation will grow exponentially.
Fixesbazel-contrib#1262
What version of gazelle are you using?
v0.24.0
What version of rules_go are you using?
v0.29.0
What version of Bazel are you using?
5.1.1
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
macOS 12.3.1
Apple M1 Pro
What did you do?
I have a project where a few things are compiled conditionally (based on the tag). There are different files for when the tag is there and not, eg:
Gazelle generates the BUILD files at the time of running:
bazel run //:gazelle
It's required that I pass the
-build_tags=mytag
to generate the build file so I can later on compile with--define gotags=mytag
. I there a way I can get build files with conditional where I don't have to generate a different build file for different tags.What did you expect to see?
Something that conditionally builds based on the tag provided later on by
--define gotags=...
like here.What did you see instead?
No conditionals in build files, instead just static files based on the tag specified while generating them.
The text was updated successfully, but these errors were encountered: