| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Fixes #3714
RELNOTES: None.
PiperOrigin-RevId: 169382686
|
|
|
|
|
|
| |
This is a trivial change with a large file footprint.
PiperOrigin-RevId: 169169864
|
|
|
|
|
|
|
| |
Exempt RuleConfiguredTarget in this change because that's liable to touch
a billion files.
PiperOrigin-RevId: 168929827
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]:
--incompatible_comprehension_variables_do_not_leak defaults to "true."
Iteration variable becomes inaccessible after a list/dict comprehension.
PiperOrigin-RevId: 167876119
|
|
|
|
|
|
|
|
| |
--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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Mutiple other cleanups in the parser, update code documentation.
RELNOTES: None.
PiperOrigin-RevId: 167501136
|
|
|
|
|
|
|
|
|
|
|
| |
testFunctionDictArgumentsAreImmutable
These tests don't actually check mutability of objects but behavior of += on
them. Input arguments of functions are in fact mutable unless they've been
created in another mutability scope. There are already other tests that
actually check immutability of objects from another mutability scope.
PiperOrigin-RevId: 167295711
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
incompatible_descriptive_string_representations flag
PiperOrigin-RevId: 166475260
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Prerequisite to implementing shape-declaration and shape-sharing
for declared providers, and cleaning up NativeInfo interface.
RELNOTES: None.
PiperOrigin-RevId: 166057070
|
|
|
|
|
|
|
| |
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: 165489091
|
|
|
|
|
| |
RELNOTES: Top-level `if` statements are now forbidden.
PiperOrigin-RevId: 165469101
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 165434934
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 165422514
|
|
|
|
|
|
|
|
| |
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: The `print` function now prints debug messages instead of warnings.
PiperOrigin-RevId: 164880003
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 164481927
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Also throw IllegalArgumentException instead of AssertionError.
A follow-up CL will look to eliminate the SkylarkMutable#checkMutable(Location, Environment) override in favor of checkMutable(Location, Mutability). This will make it easier to manipulate Skylark values in specialized contexts aside from normal evaluation.
RELNOTES: None
PiperOrigin-RevId: 163978262
|
|
|
|
|
|
|
| |
I.e., use an accessor for type inference. The EMPTY field will be made private in a future CL.
RELNOTES: None
PiperOrigin-RevId: 163843569
|
|
|
|
|
|
|
|
| |
Follows
https://docs.google.com/document/d/1aAIVWvHPERDz2cv_PCFGwr8dvh5FcAkENFoRsNS4clk/.
RELNOTES: None.
PiperOrigin-RevId: 163728291
|
|
|
|
|
|
|
| |
Also fix minor bug where a[b] += c would evaluate b twice.
RELNOTES: None
PiperOrigin-RevId: 163103618
|
|
|
|
|
|
|
|
| |
Don't call the `toString` method on unknown objects as it potentially
breaks hermeticity and determinism. Use a generic string like
"<unknown object package.ClassName>" instead.
PiperOrigin-RevId: 161970449
|
|
|
|
|
|
|
| |
Also refactor FAIL_FAST_HANDLER to throw something more specific than IllegalArgumentException. This bug was masked because the test assertion that would've caught it considered IllegalArgumentException to be an expected error, the same as EvalException.
RELNOTES: None
PiperOrigin-RevId: 161809957
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 161706309
|
|
|
|
|
|
| |
*** Reason for rollback ***
PiperOrigin-RevId: 161567104
|
|
|
|
|
|
|
|
|
| |
- changed field names and a couple accessors to consistently use full words ("statement" instead of "stmt")
- applied several local analyzers (from IntelliJ) to remove redundant modifiers, unnecessary explicit types (yay Java 8), etc.
RELNOTES: None
PiperOrigin-RevId: 161551096
|
|
|
|
|
|
|
|
| |
Don't call the `toString` method on unknown objects as it potentially
breaks hermeticity and determinism. Use a generic string like
"<unknown object package.ClassName>" instead.
PiperOrigin-RevId: 161544828
|
|
|
|
|
|
|
|
|
|
| |
Simplify the code by providing the default implementation of
`SkylarkValue$isImmutable` that always returns false. All objects are
considered mutable unless their `isImmutable` method is overridden.
This change doesn't affect the current behavior.
PiperOrigin-RevId: 161422029
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 161395570
|
|
|
|
|
|
|
| |
Error message is simpler and doesn't show the type of all arguments.
RELNOTES: None.
PiperOrigin-RevId: 161187134
|
|
|
|
|
|
|
|
| |
This is an incompatible change, but it's an obvious bug.
RELNOTES[INC]: Fixed a bug whereby multiple load() statements could appear on the same line
PiperOrigin-RevId: 161070399
|
|
|
|
|
|
|
|
|
|
|
|
| |
In other words, we now forbid these:
[] = []
() = ()
_, [] = f()
RELNOTES[INC]:
lvalues must have define at least one variable (i.e. we forbid `[] = f()`).
PiperOrigin-RevId: 160981283
|
|
|
|
|
|
|
|
|
|
|
| |
If --incompatible_descriptive_string_representations is passed, labels are converted
to strings using `repr` differently: `Label("//package:name")` instead of
`"//package:name"`
This CL doesn't affect representations of other object types but provides the
necessary infrastructure for it.
PiperOrigin-RevId: 160955284
|
|
|
|
|
|
|
| |
RELNOTES[INC]:
`load` is now a language keyword, it cannot be used as an identifier
PiperOrigin-RevId: 160944121
|
|
|
|
|
|
|
| |
Strings now can be passed to the default parameter of attr.label,
attr.label_list, and attr.label_keyed_string_dict.
PiperOrigin-RevId: 160896987
|
|
|
|
|
|
| |
RELNOTES[INC]: Using tabulation for identation is now fobidden in .bzl files
PiperOrigin-RevId: 160888064
|
|
|
|
|
|
|
| |
RELNOTES:
Evaluation will soon use checked arithmetics and throw an error instead of
overflow/underflow.
PiperOrigin-RevId: 160834366
|