-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
incompatible_depset_is_not_iterable: Make depset not iterable #5816
Comments
What is missing for migration: migration docs, length of migration window. After these are done, please add "migration-ready" label |
With this change tests pass even if --incompatible_depset_is_not_iterable is used. Bazel issue: bazelbuild/bazel#5816
With this change tests pass even if --incompatible_depset_is_not_iterable is used. Bazel issue: bazelbuild/bazel#5816
With `--incompatible_depset_is_not_iterable` depset is no longer iterable. Remove tests that assumed it is. Bazel issue: bazelbuild/bazel#5816
With `--incompatible_depset_is_not_iterable` depset is no longer iterable. Remove tests that assumed it is. Bazel issue: bazelbuild/bazel#5816
Hi, how would you coerce a depset to a flat list without using calling |
The recommendation is to avoid flattening a depset in Starlark at all costs -- depsets can be passed to action creation directly (via actions.run) |
I'm curious then as to what the recommended syntax would be for checking if a label exists in a depset, i.e what would formerly be |
From https://docs.bazel.build/versions/master/skylark/lib/depset.html :
You cannot check if a label exists in a depset without flattening it. |
Status update. Flag flip still blocked by:
|
@laurentlb My impression was, that it is fixed in all our transitive dependencies and in our own build tool chain. Can you point me to a log, specific to this breakage? |
Thanks. I see it now:
I filed: [1]. |
Progress towards #5816 RELNOTES: None. PiperOrigin-RevId: 249341642
RELNOTES[INC]: Depsets can't be iterated over unless they're converted to lists using the .to_list() method. Use --incompatible_depset_is_not_iterable=false to temporarily restore the previous behaviour. #5816 PiperOrigin-RevId: 251249558
Progress towards bazelbuild#5816 RELNOTES: None. PiperOrigin-RevId: 249341642
RELNOTES[INC]: Depsets can't be iterated over unless they're converted to lists using the .to_list() method. Use --incompatible_depset_is_not_iterable=false to temporarily restore the previous behaviour. bazelbuild#5816 PiperOrigin-RevId: 251249558
RELNOTES[INC]: Depsets can't be iterated over unless they're converted to lists using the .to_list() method. Use --incompatible_depset_is_not_iterable=false to temporarily restore the previous behaviour. bazelbuild#5816 PiperOrigin-RevId: 251249558
This broke rules_scala (no Travis link, since I realized this after updating it for two other incompatible flags, which also broke). How was this flag flipped then? (The story (still developing) is under bazelbuild/rules_scala#793; I hope that this was the last flag I have to fix up...) |
It was discussed by email, but for the record: we test Bazel on BuildKite on many projects. It looks like rules_scala is not fully tested on BuildKite (some tests are disabled), which can hide some issues. |
#5816 RELNOTES: None. PiperOrigin-RevId: 280688754
Remove this flag from the .bazelrc. Bazel no longer supports this flag, see bazelbuild/bazel#5816
Hello to anyone who sees this issue report, I would be so happy if someone can help. The whole info of this error is: My bazel version is 2.0.0 installed by binary .sh file, and sys version is Ubuntu 16.04. |
The flag Can you remove it? It looks like it comes from If the flag was really needed (i.e. you get errors related to depset iteration), you may have to fix the code before using Bazel 2.0. This should work with Bazel 1.2 though. |
bazelbuild/bazel#5816 RELNOTES: None. PiperOrigin-RevId: 280688754
Progress towards bazelbuild/bazel#5816 RELNOTES: None. PiperOrigin-RevId: 249341642
With `--incompatible_depset_is_not_iterable` depset is no longer iterable. Remove tests that assumed it is. Bazel issue: bazelbuild/bazel#5816
This is a tracking issue for offering a migration solution for
--incompatible_depset_is_not_iterable
This flag would enforce that depset is no longer treatable as an iterable. Thus, len(depset()) would throw an error.
This is useful in it prevents users from using this gravely-inefficient construct (expansion of depsets should be avoidable at all costs, as they are incredibly expensive operations)
The text was updated successfully, but these errors were encountered: