Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gazelle reports "could not merge expression" when using select statements in hdrs or srcs #1735

Open
hofbi opened this issue Feb 15, 2024 · 1 comment

Comments

@hofbi
Copy link

hofbi commented Feb 15, 2024

What version of gazelle are you using?

bazel_dep(name = "gazelle", version = "0.35.0")

What version of rules_go are you using?

bazel_dep(name = "rules_go", version = "0.46.0")

What version of Bazel are you using?

7.0.2

Does this issue reproduce with the latest releases of all the above?

Yes, thats what we use

What operating system and processor architecture are you using?

Ubuntu 20.04 x86

What did you do?

  1. I use a select statement in hdrs or srcs with @platforms//os:XXX as key
  2. For some platforms such as @platforms//os:windows, @platforms//os:linux, @platforms//os:iosthe merge works fine, while for others such as @platforms//os:qnx or @platforms//os:osx this results in a could not merge expression error

What did you expect to see?

The same behavior as for the other platforms

What did you see instead?

could not merge expression error

@hofbi
Copy link
Author

hofbi commented Feb 15, 2024

Maybe

var KnownPlatforms = []Platform{
is a good starting point, since it looks like the issue happens for all platforms not part of this list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant