| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
RELNOTES:
When using the dictionary literal syntax, it is now an error to have
duplicated keys (e.g. {'ab': 3, 'ab': 5}).
PiperOrigin-RevId: 167750614
|
|
|
|
|
|
|
|
| |
--incompatible_load_argument_is_label enabled (fixes #3560)
Closes #3562.
PiperOrigin-RevId: 167745885
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]:
Keyword-only syntax in a function definition is now forbidden
e.g. `def foo(a, *, b)` or `def foo(a, *b, c)`
PiperOrigin-RevId: 167741296
|
|
|
|
|
|
| |
AFAICT this is unused, remove before it becomes used.
PiperOrigin-RevId: 167616353
|
|
|
|
|
|
|
| |
Also distinguish between unspecified base arg and base 10, so "int(True, 10)" is now an error. This is an incompatible change, albeit a small one.
RELNOTES: None
PiperOrigin-RevId: 167616143
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 167574104
|
|
|
|
|
|
|
| |
Mutiple other cleanups in the parser, update code documentation.
RELNOTES: None.
PiperOrigin-RevId: 167501136
|
|
|
|
|
|
|
| |
RELNOTES[INC]:
Integer overflow (on signed 32 bit numbers) in BUILD/bzl files is an error.
PiperOrigin-RevId: 167486707
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 167300232
|
|
|
|
|
|
|
|
| |
Let's use the same parser. Dialect differences are checked in a separate
validation pass.
RELNOTES: None.
PiperOrigin-RevId: 167280201
|
|
|
|
|
| |
RELNOTES: none
PiperOrigin-RevId: 167263494
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 166857589
|
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]: `set` is deprecated in BUILD and .bzl files, please use `depset`
instead. Ordering names have also been changed, please use "default",
"postorder", "preorder", and "topological" instead of "stable", "compile",
"naive_link", and "link" correspondingly.
PiperOrigin-RevId: 166830004
|
|
|
|
|
|
|
|
|
|
|
| |
For instance, it makes more sense to visit the RHS of an assignment
first because this is evaluated first.
This also fixes a bug in the validator, which allowed definitions
like "a = a"
RELNOTES: None
PiperOrigin-RevId: 166709589
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 166704851
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]: Objects in Skylark are converted to strings in a more descriptive and
less harmful way (they don't leak information that shouldn't be accessed by
Skylark code, e.g. nondeterministic memory addresses of objects).
PiperOrigin-RevId: 166697907
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 166689144
|
|
|
|
|
|
|
|
|
| |
This allows to do an action after every statement in a block
(e.g. an else-block) without having to override all visit(...)
methods related to statements.
RELNOTES: None
PiperOrigin-RevId: 166483743
|
|
|
|
|
|
| |
incompatible_descriptive_string_representations flag
PiperOrigin-RevId: 166475260
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 166370036
|
|
|
|
|
|
| |
Print function prints debug messages, not warnings.
PiperOrigin-RevId: 166212471
|
|
|
|
|
|
|
|
| |
This is an internal refactoring necessary for the Skylark linter.
It does not change any behavior.
RELNOTES: None
PiperOrigin-RevId: 166199367
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 166149340
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 166058718
|
|
|
|
|
|
|
| |
RELNOTES:
When the lvalue of an augmented assignment is a list, we now throw an error
before evaluating the code (e.g. `a, b += 2, 3`).
PiperOrigin-RevId: 165906611
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 165600058
|
|
|
|
|
|
|
| |
This is a simple refactoring, no change in behavior.
RELNOTES: None.
PiperOrigin-RevId: 165572028
|
|
|
|
|
|
|
| |
We rarely need it, it's not useful to keep it in memory.
RELNOTES: None.
PiperOrigin-RevId: 165562119
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 165489091
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 165477209
|
|
|
|
|
| |
RELNOTES: Top-level `if` statements are now forbidden.
PiperOrigin-RevId: 165469101
|
|
|
|
|
|
|
|
| |
After this change, it will be easier to move the validate() methods to a
separate visitor.
RELNOTES: None.
PiperOrigin-RevId: 165467838
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 165434934
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 165422514
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 165419360
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 165177605
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 165159163
|
|
|
|
|
|
|
|
| |
This allows more complex expressions to be called, not just identifiers.
For example, "x[0]()" is not a syntax error anymore.
RELNOTES: None
PiperOrigin-RevId: 165157981
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 164981071
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 164893252
|
|
|
|
|
| |
RELNOTES: The `print` function now prints debug messages instead of warnings.
PiperOrigin-RevId: 164880003
|
|
|
|
|
|
|
| |
Reorder a few methods, change some mutators to take Mutability instead of Environment, make it clear that the casting methods return read-only maps (which may be views). Also make putAll/putAllUnsafe public with an appropriately scary javadocs.
RELNOTES: None
PiperOrigin-RevId: 164776346
|
|
|
|
|
|
|
| |
Ensure that the casted list is unmodifiable (both for mutability correctness and also type correctness), and clearly document this.
RELNOTES: None
PiperOrigin-RevId: 164739837
|
|
|
|
|
|
|
|
|
| |
Old ordering names ("stable", "compile", "naive_link", "link") are deprecated
and won't be available if --incompatible_disallow_set_constructor=true is set.
Use "default", "postorder", "preorder", and "topological" correspondingly
instead.
PiperOrigin-RevId: 164728439
|
|
|
|
|
|
|
| |
This method acts as an "escape hatch" for mutating a list regardless of Mutability. It should be avoided if at all possible.
RELNOTES: None
PiperOrigin-RevId: 164716286
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 164481927
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 164457611
|
|
|
|
|
|
|
| |
I.e., ('a', 'b') * 3 == ('a', 'b', 'a', 'b', 'a', 'b'), like lists.
RELNOTES: None
PiperOrigin-RevId: 164403099
|
|
|
|
|
|
|
|
|
| |
Previously, you could modify a frozen MutableList indirectly via its iterator(). This CL wraps the underlying list with a Collections.unmodifiableList when obtaining the iterator, and likewise for other methods that return views over Skylark data structures.
This also eliminates the SkylarkList#getContents method in favor of just using the SkylarkList object itself.
RELNOTES: None
PiperOrigin-RevId: 164402129
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On the subject of simpler toString output (i.e. "selector" vs.
"selector({dictionary contents here})", I'm not changing that here
because there are consistency concerns. BuildType.SelectorList.toString
is defined to match lib.syntax.SelectorList's Skylark serialization.
That follows a standard pattern defined here:
https://github.com/bazelbuild/bazel/blob/67bd6fc6354f2abbbc149fcd0120228b538842d3/src/main/java/com/google/devtools/build/lib/skylarkinterface/SkylarkValue.java#L37
which has concerns about deserialization. If you want to take this further
we can discuss with the Skylark devs.
PiperOrigin-RevId: 164311511
|