| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
--
PiperOrigin-RevId: 144194956
MOS_MIGRATED_REVID=144194956
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
== Before this change ==
Previously, if a and b are sets, then a + b created a new set c whose direct and transitive elements were all those of a, and with b appended as an additional transitive element. If on the other hand b is a list instead of a set, then its contents were appended as additional direct elements of c. In both cases, you can think of c as a copy of a that also knows about b.
This copying of a's elements into c can lead to accumulation when you do it repeatedly, e.g. x += y in a loop. Each union can take O(n) time so you get O(n^2) time overall. Nested set union is supposed to be O(1) time per operation and O(n) time overall.
It also leads to surprising iteration orders. If you do a + b + c + d (left-associative), where each one is a set, then when you do a post-order traversal you get the elements of b, c, d, and a, in that order. This is because b, c, and d each get appended as transitive children of the copies of a.
== After this change ==
If a and b are sets, then a + b returns a new set c with a and b as its two transitive children. If b is a list, then c has a as its only transitive child and b's elements as its only direct elements. This is straightforward, O(1), and avoids the problem with the confusing order.
It is implemented by removing the items/transitiveItems fields and just relying on NestedSetBuilder.
RELNOTES[INC]: (Skylark) Set union is now O(1). As a side-effect, the iteration order of sets produced by union has changed. "print(set([1]) + set([2]) + set([3]))" will now give back the order 1, 2, 3 instead of 2, 3, 1.
--
PiperOrigin-RevId: 143972165
MOS_MIGRATED_REVID=143972165
|
|
|
|
|
|
|
|
| |
In case of conflict, show the location of the original rule.
--
PiperOrigin-RevId: 143541281
MOS_MIGRATED_REVID=143541281
|
|
|
|
|
|
|
|
| |
--
Change-Id: I9ec3209a69ba5a51943b334f278ba93d67d4f9f4
Reviewed-on: https://cr.bazel.build/8090
PiperOrigin-RevId: 143470915
MOS_MIGRATED_REVID=143470915
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
strip(), lstrip(), and rstrip() now accept a None argument as a synonym for
the no-arg version. The characters that are considered as whitespace (to be
removed by default in the no-arg form) are now the same as in Python 3.6.
RELNOTES[INC]: The string methods strip(), lstrip(), and rstrip() now
by default remove the same whitespace characters as Python 3 does, and accept
None as an argument.
--
PiperOrigin-RevId: 143388250
MOS_MIGRATED_REVID=143388250
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 143381556
MOS_MIGRATED_REVID=143381556
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 143380643
MOS_MIGRATED_REVID=143380643
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 143373605
MOS_MIGRATED_REVID=143373605
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 143204724
MOS_MIGRATED_REVID=143204724
|
|
|
|
|
|
|
|
|
| |
`str(depset(...))` should return "set(...)" for now as some of the existing
code may rely on it.
--
PiperOrigin-RevId: 143014369
MOS_MIGRATED_REVID=143014369
|
|
|
|
|
|
|
|
|
|
| |
Renamed all occurrences of `set` to `depset`, added a `set` object constructor for (temporary) backward compatibility. `type(depset())` still temporarily returns "set", that will be changed in the future.
RELNOTES: The `set` constructor is deprecated in favor of `depset`
--
PiperOrigin-RevId: 142851587
MOS_MIGRATED_REVID=142851587
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 142438943
MOS_MIGRATED_REVID=142438943
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- list * int
- int * list
RELNOTES[NEW]: Skylark: you can now multiply a list by an integer to get the concatenation of N copies of this list, e.g. [a,b] * 3 = [a,b,a,b,a,b]
--
Change-Id: I2068ad30e11df26dc7b4b8c41e51f85db56f0390
Reviewed-on: https://github.com/bazelbuild/bazel/pull/1524
PiperOrigin-RevId: 142140726
MOS_MIGRATED_REVID=142140726
|
|
|
|
|
|
|
|
| |
This method coerces any collection to a Skylark tuple, analogous to list() or set().
--
PiperOrigin-RevId: 141779268
MOS_MIGRATED_REVID=141779268
|
|
|
|
|
|
|
|
|
| |
RELNOTES: Skylark dicts internally don't rely on keys order anymore and accept
any hashable values (i.e. structs with immutable values) as keys. Iteration order of dictionaries is no longer specified.
--
PiperOrigin-RevId: 141055080
MOS_MIGRATED_REVID=141055080
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Broke //src/test/shell/bazel:external_skylark_load_test
See http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/370/console, for example.
*** Original change description ***
Remove callerLabel from Environment.
It is a Bazel-specific information.
--
MOS_MIGRATED_REVID=140742037
|
|
|
|
|
|
|
| |
It is a Bazel-specific information.
--
MOS_MIGRATED_REVID=140719791
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
--
MOS_MIGRATED_REVID=140687884
|
|
|
|
|
|
|
|
| |
RELNOTES: Skylark dicts internally don't rely on keys order anymore and accept
any hashable values (i.e. structs with immutable values) as keys. Iteration order of dictionaries is no longer specified.
--
MOS_MIGRATED_REVID=140591710
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=140371603
|
|
|
|
|
|
|
|
|
| |
Depot cleanup is in unknown commit.
RELNOTES[INC]: Callback functions in Skylark no longer support the cfg parameter. This is a cleanup and only affects the signatures of callbacks, since the parameter hasn't been set since September 2016.
--
MOS_MIGRATED_REVID=140356006
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=140121290
|
|
|
|
|
|
|
|
|
|
|
| |
that makes an appropriate call to Interners.InternerBuilder#concurrencyLevel.
For current readers of this CL, I used this class everywhere in the Blaze codebase.
For future readers of this CL, this class should be used to create an Interner in the Blaze codebase.
--
MOS_MIGRATED_REVID=140063271
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=140040343
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=140037282
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=139926067
|
|
|
|
|
|
|
|
| |
RELNOTES: Skylark dicts internally don't rely on keys order anymore and accept
any hashable values (i.e. structs with immutable values) as keys.
--
MOS_MIGRATED_REVID=139914704
|
|
|
|
|
|
|
| |
Next step will be to move Environment.Phase to SkylarkUtils.BazelInfo
--
MOS_MIGRATED_REVID=139902745
|
|
|
|
|
|
|
|
| |
"type", "set" and "select" should not be part of the standalone Skylark
library.
--
MOS_MIGRATED_REVID=139578095
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=139573590
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
refactoring: enabling potential fast digest computation of more than one digest function type.
Usage: bazel --host_jvm_args="-Dbazel.DigestFunction=SHA1" build ...
Ugliness: using a system property (a static non-final variable), because the better way to do it (a flag) would result in a much, much larger refactoring.
More ugliness: I have updated the minimal amount of tests. A lot of tests are still relying on the default value of MD5. Ideally, they need to be updated as well.
--
MOS_MIGRATED_REVID=139490836
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a crash when the starting point of a negative slice is larger than
the list length.
In addition, there was an incorrect result when the ending point of a negative
slice is less than the list's length times -1. It would wrongly exclude the
first element.
RELNOTES: Fix slicing bug where "abc"[:-4:-1] would give wrong answer
--
MOS_MIGRATED_REVID=138878716
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=138757881
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=138700111
|
|
|
|
|
|
|
| |
RELNOTES: Comparing sets (`if set1 < set2:`) is not allowed anymore in Skylark because it didn't work correctly anyway.
--
MOS_MIGRATED_REVID=138408411
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=138387292
|
|
|
|
|
|
|
| |
Add doc for the "read only" error message.
--
MOS_MIGRATED_REVID=138194709
|
|
|
|
|
|
|
| |
This CL also contains a small refactoring that should make the introduction of list-int-mulitplication easier.
--
MOS_MIGRATED_REVID=137938998
|
|
|
|
|
|
|
|
|
| |
If `f` is an object with an attribute `x` which is callable, it's valid now to
call `f.x()` directly (caused a "no function called x" error before because .x
is a attribute, not a method).
--
MOS_MIGRATED_REVID=137698425
|
|
|
|
|
|
|
| |
RELNOTES: getattr()'s 3-arg form no longer raises an error when the retrieved field is a built-in method.
--
MOS_MIGRATED_REVID=137390666
|
|
|
|
|
|
|
|
|
| |
Other fields will follow (is_skylark, phase, callerLabel).
The goal is to make Environment (and more generally Skylark) less dependent
on Bazel.
--
MOS_MIGRATED_REVID=137386248
|
|
|
|
|
|
|
| |
function calls.
--
MOS_MIGRATED_REVID=137303042
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=137272887
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=137266170
|
|
|
|
|
|
|
|
|
|
| |
- Move break/continue check from ValidationEnvironment to the Parser
- Remove some differences between BUILD / Skylark parsing mode
- Fix location off-by-one error in the break/continue tokens
- Remove duplicated error message ('for loops are not allowed on top-level')
--
MOS_MIGRATED_REVID=137259929
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only visible difference for users is that a few more functions are
available in BUILD files. That's fine, this difference was not even
documented.
RELNOTES:
A few functions are added to BUILD files for consistency (hash, dir,
hasattr, getattr) with .bzl files, although they are not very useful.
--
MOS_MIGRATED_REVID=136151633
|
|
|
|
|
|
|
| |
We don't actually need a map.
--
MOS_MIGRATED_REVID=136040005
|
|
|
|
|
|
|
|
|
|
| |
Use StringLiteral instead of String+Location. This improves consistency.
getRawImports() now returns StringLiterals, which makes possible to show
location in error messages.
--
MOS_MIGRATED_REVID=136019586
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=135956016
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Fixed underlying broken CL that was depended on
*** Original change description ***
Automated [] rollback of commit e025939e71b179ae0f6bd09ef3af474f49b853a2.
*** Reason for rollback ***
Depends on commit 9c25afe750a937b2152c21a93effc8b9ba82c27b, which needs to be rolled back.
*** Original change description ***
Add API for individual actions
This exposes action inputs, outputs, argv, content, and substitutions (if applicable).
--
MOS_MIGRATED_REVID=135821603
|