Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
incompatible_always_check_depset_elements: depset: depset(direct=...) constructor does not check element validity #10313
The depset(direct=...) constructor that we have been recently migrating users towards does not apply the same element validity checks as the legacy depset([...]) constructor. Consequently one can insert mutable items such as structs and tuples containing lists:
The fix is to apply the same checks as done by the legacy constructor, but this is a breaking change. The new check will thus be behind a flag called
Without the flag, depset([(x,)]) reports an error if and only if x is (or contains) a mutable value. With the flag, the expression succeeds even if x is (or contains) a mutable value. I could not see any difference between Blaze at tip and the previous release of Blaze, which is encouraging.