aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/SkylarkSemanticsOptions.java
Commit message (Collapse)AuthorAge
* Add --internal_do_not_export_builtins, for testingGravatar brandjon2017-07-25
| | | | | | | | | This is a temporary flag that causes Extension objects to elide some built-in symbols, for the benefit of tests. Currently it only applies to the "native" builtin for Extensions created by SkylarkImportLookupFunction. A future Skylark language change will have the effect of excluding all builtin symbols from all Extension objects anyway, so this flag will eventually be subsumed by that incompatible change. RELNOTES: None PiperOrigin-RevId: 163016504
* Make the @Option annotation depend on the java version of the tagging enums.Gravatar ccalvarin2017-07-18
| | | | | | | The option filters proto dependency can be removed from the OptionsParser. This is in response to option parser users that want to avoid the bazel-internal proto file in their dependencies. RELNOTES: None. PiperOrigin-RevId: 162249778
* Doc typoGravatar brandjon2017-07-17
| | | | | RELNOTES: None PiperOrigin-RevId: 162135034
* New flag --incompatible_string_is_not_iterable to forbid iteration over strings.Gravatar laurentlb2017-07-13
| | | | | RELNOTES: None. PiperOrigin-RevId: 161706309
* Fold OptionUsageRestrictions into OptionDocumentationCategory and ↵Gravatar ccalvarin2017-07-11
| | | | | | | | | | OptionMetadataTags. These are similar, no need to have both fields. Removing the "DOCUMENTED" default, the absence of UNDOCUMENTED will be used instead. Since requiring a documentation category for undocumented options doesn't make sense, list that as one of the OptionDocumentationCategories, but list HIDDEN and INTERNAL as part of OptionMetadata. These options should list UNDOCUMENTED as their category. PiperOrigin-RevId: 161515674
* Clean up string representations for labelsGravatar vladmos2017-07-05
| | | | | | | | | | | 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
* New flag `--incompatible_checked_arithmetic` to use checked arithmetics.Gravatar laurentlb2017-07-05
| | | | | | | RELNOTES: Evaluation will soon use checked arithmetics and throw an error instead of overflow/underflow. PiperOrigin-RevId: 160834366
* Introduce --incompatible_new_actions_api flag.Gravatar dslomov2017-07-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 160831413
* Update the --incompatible_ flag requirements to use the metadata tag.Gravatar ccalvarin2017-06-28
| | | | | | Leave the category for now as the generated docs still do not use the new categorization. PiperOrigin-RevId: 160290297
* Add the default category and tag to all options.Gravatar ccalvarin2017-06-28
| | | | | | | | Move the default from the annotation to every mention. This makes the incompleteness explicit. Will add the defaults to test targets in a separate change. Once all dependencies are cleaned up, the Option annotation will no longer allow options without the documentationCategory or effectTag, to prevent new options being added without categories while we migrate to the new option categorization. PiperOrigin-RevId: 160281252
* Forbid duplicate keys in dictionary literalsGravatar laurentlb2017-06-26
| | | | | | | RELNOTES: When using the dictionary literal syntax, it is now an error to have duplicated keys (e.g. {'ab': 3, 'ab': 5}). PiperOrigin-RevId: 159945431
* Introduce --incompatible_depset_is_not_iterableGravatar laurentlb2017-06-21
| | | | | | | RELNOTES: Iterating on a `depset` object is deprecated. If you need an iterable, call the `.to_list()` method first. PiperOrigin-RevId: 159672887
* Introduce --incompatible_load_argument_is_label (1st argument of load must ↵Gravatar laurentlb2017-06-14
| | | | | | | | | be a label). RELNOTES: First argument of 'load' should be a label. Path syntax is deprecated (label should start with '//' or ':'). PiperOrigin-RevId: 158971314
* Introduce --incompatible_comprehension_variables_do_not_leakGravatar laurentlb2017-06-14
| | | | | | | | | | | | | When the flag is activated, variables in list comprehensions do not leak anymore. Even if a variable was defined before the loop, it's not accessible after the loop. This change allows us to detect any breakage and ensures that no user is accessing loop variables after the loop. This will make possible for us to change the behavior and follow Python 3 semantics in the future. RELNOTES: None. PiperOrigin-RevId: 158895514
* Introduce --incompatible_disallow_toplevel_if_statement to forbid top-level ↵Gravatar laurentlb2017-06-08
| | | | | | | | | | if statements. RELNOTES: In .bzl files, top-level `if` statements are deprecated and will be forbidden in the future. Move them in a function body instead (or use a conditional expression instead: `x if condition else y`). PiperOrigin-RevId: 158276986
* New flag --incompatible_bzl_disallow_load_after_statementGravatar laurentlb2017-05-10
| | | | | | | | | This disallows to have any statement in a .bzl file before a load() statement. RELNOTES: load() statements should be called at the top of .bzl files, before any other statement. This convention will be enforced in the future. PiperOrigin-RevId: 155636719
* Rename some --incompatible_* flags to be more specificGravatar brandjon2017-05-08
| | | | | | | | | This is possibly a nit, but we don't want to reuse flag names in the future, so it's a good idea to include what the flag *does* in the name as opposed to just the feature it affects, in case the same feature is changed multiple times. Updated javadoc for incompatible change system to say so. This rename is ok because these flags have only been submitted over the past couple days. RELNOTES: None PiperOrigin-RevId: 155371363
* Implement a flag to forbid the `+` operator for dictsGravatar vladmos2017-05-04
| | | | | Usage: --incompatible_dict_plus=true (the default value is false). PiperOrigin-RevId: 155094639
* Implement a flag for extend-like behavior of the `+=` operator for listsGravatar vladmos2017-05-04
| | | | | Usage: --incompatible_list_plus_equals=true (the default value is false). PiperOrigin-RevId: 155084916
* Add the flag --incompatible_keyword_only_syntax to forbid keyword-only syntax.Gravatar laurentlb2017-05-04
| | | | | | | | | | | | | | | | Keyword-only syntax is when a parameter happens after the `*` paramter, e.g. def foo(a, *, b): pass or: def foo(a, *b, c): pass The syntax is not compatible with Python 2 (it's supported only in Python 3), and breaking tooling based on Python2. RELNOTES: Keyword-only syntax in a function definition is deprecated (e.g. `def foo(a, *, b)` or `def foo(a, *b, c)`) and will be removed in the future. PiperOrigin-RevId: 155071704
* Implement a flag to deprecate old constructor for depsets (`set`)Gravatar vladmos2017-05-04
| | | | | Usage: --incompatible_depset_constructor=true (the default value is false). PiperOrigin-RevId: 154971526
* Make Skylark interpreter read Skylark command-line flagsGravatar brandjon2017-04-30
| | | | | | | | | | | This is the second of two CLs for making command line options able to affect the Skylark interpreter. For the main kinds of evaluation contexts -- package loading, .bzl loading, rule analysis, aspect analysis, and computed defaults -- the SkylarkSemanticsOptions object is retrieved from Skyframe and passed along to the Environment builder. For other contexts such as tests, default values of builtin functions, and standalone Skylark, flags are currently not processed. In the future, we may want to split into separate files the options that affect "pure" Skylark vs the options that affect Bazel-flavored Skylark. One possibility is to subclass SkylarkSemanticsOptions into SkylarkBazelSemanticsOptions, and go through an indirection in SkylarkUtils. We could also pass SkylarkSemanticsOptions to the parser, to support --incompatible_* changes that alter Skylark's syntax. I don't think that's needed at the moment. RELNOTES: None PiperOrigin-RevId: 154628391
* Store Skylark command-line flags in SkyframeGravatar brandjon2017-04-28
This is the first of two CLs for making command line options able to affect the Skylark interpreter. It introduces SkylarkSemanticsOptions, and stores it as a precomputed (injected) value in Skyframe. The next CL will read these options from Skyframe when constructing the Skylark environment. This CL affects the dataflow from command/test initialization to Skyframe. Some code paths, like those used for testing, use the default SkylarkSemanticsOptions and therefore won't be able to use (for example) --incompatible_* flags. The call sites to update were found by searching for uses of defaultVisibility and working upward from there. RELNOTES: None PiperOrigin-RevId: 154432058