| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 207801155
|
|
|
|
|
|
|
|
| |
This uses SkylarkSemantics now instead of the C++ configuration. The flag is:
--experimental_cc_skylark_api_enabled_packages
RELNOTES:none
PiperOrigin-RevId: 207235431
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
range used to use MutableList which would eagerly allocate an array list with
all range elements, which is not efficient for very large ranges or when only
a small number of its elements are used.
This implementation uses a constant amount of RAM and computes a value for
each requested index.
For the following Skylark snippet:
```
def check_content(t):
if t == []:
return t
return False
def modulo(n):
return n % 797
N = 10000000
[check_content(i) for i in range(N)]
[check_content(i) for i in range(N)]
[modulo(i) for i in range(N)]
[modulo(i) for i in range(N)]
```
the total runtime goes from
```
$ time bazel-bin/src/main/java/com/google/devtools/skylark/Skylark test.bzl
bazel-bin/src/main/java/com/google/devtools/skylark/Skylark test.bzl 93.09s user 1.67s system 316% cpu 29.930 total
```
to
```
$ time bazel-bin/src/main/java/com/google/devtools/skylark/Skylark test.bzl
bazel-bin/src/main/java/com/google/devtools/skylark/Skylark test.bzl 31.45s user 0.86s system 179% cpu 17.974 total
```
which reflects the reduced system time (fewer allocations) and performance.
Closes #5240.
PiperOrigin-RevId: 204918577
|
|
|
|
|
|
|
| |
parameters of the skylark attr module.
RELNOTES: None.
PiperOrigin-RevId: 204797954
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Rolling forward https://github.com/bazelbuild/bazel/commit/c4e128e2c6d8cacaeba034d6a3195796d50f1745]
java_common.compile doesn't generate the output source jar when a source jar is
the only input for the compilation. This is wrong because the source jar can
include APT generated sources. It is also inconsistent with java_library and
leads to inconsistent Skylark rules where a declared output will not always have a
generating action.
This new behavior is guarded by a new flag --incompatible_generate_javacommon_source_jar.
RELNOTES: None.
PiperOrigin-RevId: 202648346
|
|
|
|
| |
PiperOrigin-RevId: 202400312
|
|
|
|
|
|
|
| |
functionality in WORKSPACE rules.
RELNOTES: None
PiperOrigin-RevId: 199332092
|
|
|
|
|
|
|
|
|
|
| |
Supporting tools in inputs introduces a slow linear scan. Such tools should be moved to the 'tools' attribute. If --incompatible_no_support_tools_in_action_inputs is set the inputs are scanned, but a helpful error message is issued to the user.
Eventually we will remove the slow scanning. Errors will surface in the execution phase instead of during analysis, and the resulting error messages will be less obvious.
RELNOTES: None
RELNOTES[INC]: With --incompatible_no_support_tools_in_action_inputs enabled, Skylark action inputs are no longer scanned for tools. Move any such inputs to the newly introduced 'tools' attribute.
PiperOrigin-RevId: 198996093
|
|
|
|
|
|
| |
RELNOTES:
Flag `--incompatible_disable_glob_tracking` is removed.
PiperOrigin-RevId: 196852718
|
|
|
|
|
|
|
|
| |
When set to true, old-style JavaInfo provider construction methods become an error.
RELNOTES[INC]: Add --incompatible_disallow_legacy_javainfo flag.
PiperOrigin-RevId: 195104452
|
|
|
|
|
|
|
|
| |
RELNOTES:
`FileType` is deprecated and will be removed soon.
Try the `--incompatible_disallow_filetype` flag to ensure your code
is forward-compatible.
PiperOrigin-RevId: 192758063
|
|
|
|
|
|
| |
RELNOTES:
Removed flag `--incompatible_disallow_toplevel_if_statement`.
PiperOrigin-RevId: 192621765
|
|
|
|
|
|
|
|
| |
RELNOTES:
The `/` operator is deprecated in favor of `//` (floor integer division).
Try the `--incompatible_disallow_slash_operator` flag to ensure your code
is forward-compatible.
PiperOrigin-RevId: 192430310
|
|
|
|
|
|
|
|
|
| |
option.
It was used for a migration, which is now done.
RELNOTES: None.
PiperOrigin-RevId: 192246659
|
|
|
|
|
|
|
|
|
|
|
| |
Args#add(value, *, arg, format)
Args#add_all(value, *, arg, map_each, format_each, before_each, omit_if_empty, uniquify)
Args#add_joined(value, *, arg, join_with, map_each, format_each, format_joined, omit_if_empty, uniquify)
The old Args#add remains backwards compatible, but we add a flag to disable this compatibility mode.
RELNOTES: None
PiperOrigin-RevId: 191804482
|
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]:
Variables PACKAGE_NAME and REPOSITORY_NAME are deprecated in favor of
functions `package_name()` and `repository_name()`.
https://docs.bazel.build/versions/master/skylark/lib/native.html#package_name
PiperOrigin-RevId: 190657188
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]: The --incompatible_disallow_uncalled_set_constructor flag is no
longer available, the `set` constructor` is completely removed from Skylark.
Use `depset` instead.
PiperOrigin-RevId: 190053331
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]: The flag --incompatible_show_all_print_messages is removed.
Messages generated by `print` statements from any package will be displayed as
DEBUG messages.
PiperOrigin-RevId: 190043451
|
|
|
|
|
|
|
| |
No relnotes, because deletion was already announced.
RELNOTES: None.
PiperOrigin-RevId: 189934041
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 188038131
|
|
|
|
|
|
|
|
|
| |
objc provider skylark fields.
This flag is not fully implemented -- there should also be a way to disable the provider getters using this flag, but, since @SkylarkCallable does not allow for evaluation of SkylarkSemantics, this is not yet possible.
RELNOTES: None.
PiperOrigin-RevId: 187542004
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The skylark implementation of git_repository is a drop-in replacement
for the native workspace rule. So deprecate the latter to avoid having
two implementations of the same. Also, the native rule pulls in quite
some dependencies.
RELNOTES: The native git_repository rule is deprecated. Use the
Skylark version available via load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
instead.
Change-Id: Id75d8e7b7377acd1092c4ba993f488be86c03fa0
PiperOrigin-RevId: 187466931
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 186470386
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the skylark implementation of http_archive provides all
the features available in the native http_archive and a few
more (patching), there is no need to have to rule implementations
doing the same thing. Hence deprecate the native one as part
of our plan of moving more functionality to skylark.
RELNOTES: The native http_archive rule is deprecated. Use the
Skylark version available via load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
instead.
Change-Id: I107c2f25f5a37c67f56b4362e7c9d9ade8428c16
PiperOrigin-RevId: 186314624
|
|
|
|
|
|
| |
RELNOTES:
Removed flags `--incompatible_checked_arithmetic`, `--incompatible_dict_literal_has_no_duplicates`, `--incompatible_disallow_keyword_only_args`, and ` --incompatible_comprehension_variables_do_not_leak`.
PiperOrigin-RevId: 185977740
|
|
|
|
|
|
|
| |
Also add a @VisibleForTesting accessor to SkyframeExecutor.
RELNOTES: None
PiperOrigin-RevId: 179875655
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 178760403
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]: The flag --incompatible_list_plus_equals_inplace is removed, its
default behavior is preserved. += on lists now always mutates the left hand
side.
PiperOrigin-RevId: 178359047
|
|
|
|
|
|
|
| |
RELNOTES:
Using `+`, `|` or `.union` on depsets is now deprecated. Please use the new
constructor instead (see https://docs.bazel.build/versions/master/skylark/depsets.html).
PiperOrigin-RevId: 178262338
|
|
|
|
|
|
|
| |
This avoids having to inline a bunch of default values when you only want to change one flag.
RELNOTES: None
PiperOrigin-RevId: 178148057
|
|
|
|
|
|
|
|
| |
RELNOTES: The deprecated builtin `set` is no longer allowed even from within
unexecuted code in bzl files. It's temporarily possible to use
--incompatible_disallow_uncalled_set_constructor=false if this change causes
incompatibility issues.
PiperOrigin-RevId: 178087669
|
|
|
|
|
|
|
| |
RELNOTES:
First argument of 'load' must be a label. Path syntax is removed.
(label should start with '//' or ':').
PiperOrigin-RevId: 177802628
|
|
|
|
|
|
|
| |
Debug messages (generated with Skylark's `print` function) used to be filtered out by the output filter: if such messages are generated during the analysis phase in a package different to the target package (e.g. if a user builds //foo:foo and the message is generated in a dependency //bar:bar), the message are not shown by default, which makes an erroneous impression that the code for //bar:bar hasn't been executed at all and interferes with debugging. Now the output filter doesn't affect debug messages at all.
RELNOTES: Debug messages generated by `print()` are not being filtered out by --output_filter anymore, it's recommended not to use them in production code.
PiperOrigin-RevId: 177431255
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `set` constructor used to be deprecated, but it was still possible to use
it by providing --incompatible_disallow_set_constructor=false.
It's still allowed to have `set` in parts of the code that are not executed, this will be deprecated later. You can check if your code is compatible with this future change by using the flag --incompatible_disallow_uncalled_set_constructor (currently the default is "false").
RELNOTES[INC]: The flag --incompatible_disallow_set_constructor is no longer
available, the deprecated `set` constructor is not available anymore.
PiperOrigin-RevId: 176491641
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `set` constructor used to be deprecated, but it was still possible to use
it by providing --incompatible_disallow_set_constructor=false.
It's still allowed to have `set` in parts of the code that are not executed, this will be deprecated later.
RELNOTES[INC]: The deprecated `set` constructor is removed, along with the
migration flag --incompatible_disallow_set_constructor. It is still temporarily
allowed to refer to `set` from within unexecuted code.
PiperOrigin-RevId: 176375859
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
If the 'set' function was used in a .bzl file but not called, --incompatible_disallow_set_constructor=True would allow the load of that .bzl file without error, but this change removes the 'set' function so loading that bzl file is an error.
Example failure: https://ci.bazel.io/blue/organizations/jenkins/Global%2FTensorFlow/detail/TensorFlow/245/pipeline/
*** Original change description ***
Remove the deprecated set constructor from Skylark
The `set` constructor used to be deprecated, but it was still possible to use
it by providing --incompatible_disallow_set_constructor=false.
RELNOTES[INC]: The flag --incompatible_disallow_set_constructor is no longer
available, the deprecated `set` constructor is not available anymore.
PiperOrigin-RevId: 173115983
|
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]: += on lists now mutates them. `list1 += list2` is now equivalent
to `list1.extend(list2)` and not equivalent to `list1 = list1 + list2` anymore.
Fixes #2350.
PiperOrigin-RevId: 172111899
|
|
|
|
|
|
|
|
|
|
| |
The `set` constructor used to be deprecated, but it was still possible to use
it by providing --incompatible_disallow_set_constructor=false.
RELNOTES[INC]: The flag --incompatible_disallow_set_constructor is no longer
available, the deprecated `set` constructor is not available anymore.
PiperOrigin-RevId: 171962361
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]: The flag --incompatible_descriptive_string_representations is no
longer available, old style string representations of objects are not supported
anymore.
PiperOrigin-RevId: 171952621
|
|
|
|
|
|
|
| |
Also remove the use of the @UsesOnlyCoreTypes annotation on SkylarkSemanticsOptions. It was only there to help mark that the options class was safe to put in Skyframe.
RELNOTES: None
PiperOrigin-RevId: 171248504
|
|
This is a first step toward making the core Skylark interpreter (the syntax/ directory) not depend on the options parser. Subsequent CLs will replace uses of SkylarkSemanticsOptions within the interpreter with uses of SkylarkSemantics, and move SkylarkSemanticsOptions to the packages/ directory alongside SkylarkSemanticsCodec.
SkylarkSemantics will also replace SkylarkSemanticsOptions as the value that gets passed through Skyframe. This is nice because SkylarkSemantics is strictly immutable, whereas options classes are only kinda-sorta-immutable.
The downside is significantly more redundancy when defining new options. But some of the work is saved by using AutoValue, and there are tests that protect us from dumb mechanical errors. The details are outlined in the javadoc for SkylarkSemanticsOptions and SkylarkSemanticsConsistencyTest.
RELNOTES: None
PiperOrigin-RevId: 171060034
|