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

$(execpath :filegroup) and $(rootpath :filegroup) give incorrect error messages #13494

Open
bcsgh opened this issue May 20, 2021 · 0 comments
Open
Labels
bad error messaging Issues where users get stuck because they don't understand what they did wrong P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: feature request

Comments

@bcsgh
Copy link

bcsgh commented May 20, 2021

Description of the problem / feature request:

using $(execpath :filegroup) and $(rootpath :filegroup) where :filegroup expands to more than one file correctly give an error, but the error text is incorrect in that is says

label '//:filegroup' in $(location) expression expands to more than one file, please use $(locations //:filegroup)

where as it should mention e.g. execpath and execpaths.

Feature requests: what underlying problem are you trying to solve with this feature?

This error message should be updated.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

filegroup(
  name = "filegroup",
  srcs = ["a", "b"],
)
genrule(
  name = "bogo",
  tools = [":filegroup"],
  cmd = "echo $(execpath :filegroup) $(rootpath :filegroup)"
  outs = ["X"],
)

What operating system are you running Bazel on?

Linux 20.04

What's the output of bazel info release?

$ bazel info release
release 4.0.0
@jin jin added bad error messaging Issues where users get stuck because they don't understand what they did wrong team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website untriaged labels May 20, 2021
@Wyverald Wyverald added P2 We'll consider working on this in future. (Assignee optional) and removed untriaged labels Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad error messaging Issues where users get stuck because they don't understand what they did wrong P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: feature request
Projects
None yet
Development

No branches or pull requests

4 participants