aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/skylark/backward-compatibility.md
diff options
context:
space:
mode:
Diffstat (limited to 'site/docs/skylark/backward-compatibility.md')
-rw-r--r--site/docs/skylark/backward-compatibility.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/site/docs/skylark/backward-compatibility.md b/site/docs/skylark/backward-compatibility.md
index 61eabd1098..4a67bf4d2b 100644
--- a/site/docs/skylark/backward-compatibility.md
+++ b/site/docs/skylark/backward-compatibility.md
@@ -30,6 +30,7 @@ To check if your code will be compatible with future releases you can:
The following are the backward incompatible changes that are implemented and
guarded behind flags in the current release:
+* [Set constructor](#set-constructor)
* [Keyword-only arguments](#keyword-only-arguments)
* [Mutating `+=`](#mutating)
* [Dictionary concatenation](#dictionary-concatenation)
@@ -43,6 +44,22 @@ guarded behind flags in the current release:
* [New actions API](#new-actions-api)
* [Checked arithmetic](#checked-arithmetic)
+### Set constructor
+
+To maintain a clear distinction between the specialized [`depset`](depsets.md)
+data structure and Python's native `set` datatype (which does not currently
+exist in Skylark), the `set` constructor has been superseded by `depset`. It is
+no longer allowed to run code that calls the old `set` constructor.
+
+However, for a limited time, it will not be an error to reference the `set`
+constructor from code that is not executed (e.g. a function that is never
+called). Enable this flag to confirm that your code does not still refer to the
+old `set` constructor from unexecuted code.
+
+* Flag: `--incompatible_disallow_uncalled_set_constructor`
+* Default: `false`
+
+
### Keyword-only arguments
Keyword-only parameters are parameters that can be called only using their name.