{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/5355","repository_url":"https://api.github.com/repos/bazelbuild/bazel","labels_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5355/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5355/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5355/events","html_url":"https://github.com/bazelbuild/bazel/issues/5355","id":330831414,"node_id":"MDU6SXNzdWUzMzA4MzE0MTQ=","number":5355,"title":"Add support for allow_single_file attribute to label_list and label_keyed_string_dict","user":{"login":"ash2k","id":126021,"node_id":"MDQ6VXNlcjEyNjAyMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/126021?v=4","gravatar_id":"","url":"https://api.github.com/users/ash2k","html_url":"https://github.com/ash2k","followers_url":"https://api.github.com/users/ash2k/followers","following_url":"https://api.github.com/users/ash2k/following{/other_user}","gists_url":"https://api.github.com/users/ash2k/gists{/gist_id}","starred_url":"https://api.github.com/users/ash2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ash2k/subscriptions","organizations_url":"https://api.github.com/users/ash2k/orgs","repos_url":"https://api.github.com/users/ash2k/repos","events_url":"https://api.github.com/users/ash2k/events{/privacy}","received_events_url":"https://api.github.com/users/ash2k/received_events","type":"User","site_admin":false},"labels":[{"id":287828494,"node_id":"MDU6TGFiZWwyODc4Mjg0OTQ=","url":"https://api.github.com/repos/bazelbuild/bazel/labels/category:%20extensibility%20%3E%20skylark","name":"category: extensibility > skylark","color":"d4c5f9","default":false},{"id":106503261,"node_id":"MDU6TGFiZWwxMDY1MDMyNjE=","url":"https://api.github.com/repos/bazelbuild/bazel/labels/type:%20feature%20request","name":"type: feature request","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":{"login":"laurentlb","id":485572,"node_id":"MDQ6VXNlcjQ4NTU3Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/485572?v=4","gravatar_id":"","url":"https://api.github.com/users/laurentlb","html_url":"https://github.com/laurentlb","followers_url":"https://api.github.com/users/laurentlb/followers","following_url":"https://api.github.com/users/laurentlb/following{/other_user}","gists_url":"https://api.github.com/users/laurentlb/gists{/gist_id}","starred_url":"https://api.github.com/users/laurentlb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurentlb/subscriptions","organizations_url":"https://api.github.com/users/laurentlb/orgs","repos_url":"https://api.github.com/users/laurentlb/repos","events_url":"https://api.github.com/users/laurentlb/events{/privacy}","received_events_url":"https://api.github.com/users/laurentlb/received_events","type":"User","site_admin":false},"assignees":[{"login":"laurentlb","id":485572,"node_id":"MDQ6VXNlcjQ4NTU3Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/485572?v=4","gravatar_id":"","url":"https://api.github.com/users/laurentlb","html_url":"https://github.com/laurentlb","followers_url":"https://api.github.com/users/laurentlb/followers","following_url":"https://api.github.com/users/laurentlb/following{/other_user}","gists_url":"https://api.github.com/users/laurentlb/gists{/gist_id}","starred_url":"https://api.github.com/users/laurentlb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurentlb/subscriptions","organizations_url":"https://api.github.com/users/laurentlb/orgs","repos_url":"https://api.github.com/users/laurentlb/repos","events_url":"https://api.github.com/users/laurentlb/events{/privacy}","received_events_url":"https://api.github.com/users/laurentlb/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-06-08T23:41:48Z","updated_at":"2018-07-11T10:28:37Z","closed_at":null,"author_association":"NONE","body":"### Description of the problem / feature request:\r\n\r\n[`attr.label()`](https://docs.bazel.build/versions/master/skylark/lib/attr.html#label) supports `allow_single_file` attribute which is very convenient. For some reason [`attr.label_keyed_string_dict()`](https://docs.bazel.build/versions/master/skylark/lib/attr.html#label_keyed_string_dict) and [`attr.label_list()`](https://docs.bazel.build/versions/master/skylark/lib/attr.html#label_list) do not although all of them support `allow_files`.\r\n\r\nI think it would be useful and consistent to have support for `allow_single_file` attribute in the later two.\r\n\r\n### Feature requests: what underlying problem are you trying to solve with this feature?\r\n\r\nIn some private codebase I use `label_keyed_string_dict` and I have to assert that the value resolves to a single file and `fail()` if not. Would be nice to remove this manual check."},"comment":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/comments/404121958","html_url":"https://github.com/bazelbuild/bazel/issues/5355#issuecomment-404121958","issue_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5355","id":404121958,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDEyMTk1OA==","user":{"login":"ash2k","id":126021,"node_id":"MDQ6VXNlcjEyNjAyMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/126021?v=4","gravatar_id":"","url":"https://api.github.com/users/ash2k","html_url":"https://github.com/ash2k","followers_url":"https://api.github.com/users/ash2k/followers","following_url":"https://api.github.com/users/ash2k/following{/other_user}","gists_url":"https://api.github.com/users/ash2k/gists{/gist_id}","starred_url":"https://api.github.com/users/ash2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ash2k/subscriptions","organizations_url":"https://api.github.com/users/ash2k/orgs","repos_url":"https://api.github.com/users/ash2k/repos","events_url":"https://api.github.com/users/ash2k/events{/privacy}","received_events_url":"https://api.github.com/users/ash2k/received_events","type":"User","site_admin":false},"created_at":"2018-07-11T10:28:37Z","updated_at":"2018-07-11T10:28:37Z","author_association":"NONE","body":"I'd like to extend this feature request to also include the `executable` parameter. It is supported by `label` attribute type but not by `label_keyed_string_dict` and `label_list`. They all support `providers` and `cfg` but `executable` is missing.\r\n\r\nI tried to use [`FilesToRunProvider`](https://docs.bazel.build/versions/master/skylark/lib/FilesToRunProvider.html) in the `providers` parameter (thinking that maybe that way I can/am supposed to block non-executable labels) but Bazel does not like it and says `name 'FilesToRunProvider' is not defined`. I think this is either a bug (the symbol should be \"exported\" and be usable somehow) or this thing is not a provider actually. In that case the documentation should be fixed (but why is it called `...Provider` then?). Am I missing something?\r\n\r\nMy use case: I'd like to be able to `bazel run` multiple targets and I wrote [a rule to do that](https://github.com/atlassian/bazel-tools/tree/master/multirun). It accepts a `label_list` but I cannot use the `executable` bit on it. So I have to check that each specified target is executable manually which is not ideal.\r\n\r\np.s. I'm wondering why not make all \"label\" attributes consistent and have the same set of \"filtering\" parameters?"}}
{"actor":{"display_login":"ash2k"}}