aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/syntax/ValidationTest.java
Commit message (Collapse)AuthorAge
* Throw a static error when lvalue of an augmented assignment is a list.Gravatar laurentlb2017-08-21
| | | | | | | 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
* Make `incompatible_disallow_toplevel_if_statement` default to true.Gravatar laurentlb2017-08-17
| | | | | RELNOTES: Top-level `if` statements are now forbidden. PiperOrigin-RevId: 165469101
* Better names for declared providers-related classes.Gravatar dslomov2017-08-01
| | | | | | | | Follows https://docs.google.com/document/d/1aAIVWvHPERDz2cv_PCFGwr8dvh5FcAkENFoRsNS4clk/. RELNOTES: None. PiperOrigin-RevId: 163728291
* 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
* Migrate Java tests to Truth.Gravatar lberki2017-05-30
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157446717
* 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
* Use skylark-preferred quote char for string literalGravatar Michajlo Matijkiw2017-02-23
| | | | | | | | | | We currently have no need to discern between strings quoted with ' or ". While it could be nice for something one day (and may have been in the past), it's yagni now. Removing the distinction simplifies string concatenation. -- PiperOrigin-RevId: 148273400 MOS_MIGRATED_REVID=148273400
* Add 'did you mean' suggestion when accessing an undefined variable.Gravatar Laurent Le Brun2017-01-03
| | | | | | -- PiperOrigin-RevId: 143373605 MOS_MIGRATED_REVID=143373605
* Add `depset` as an alias to `set` in SkylarkGravatar Vladimir Moskva2016-12-27
| | | | | | | | | | 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
* Change error message to reflect broader syntax for assignmentsGravatar Jon Brandvein2016-11-10
| | | | | -- MOS_MIGRATED_REVID=138700111
* Cleanup in the parserGravatar Laurent Le Brun2016-10-26
| | | | | | | | | | - 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
* Refactor getParentWithSkylarkModule() into SkylarkInterfaceUtilsGravatar Jon Brandvein2016-10-13
| | | | | -- MOS_MIGRATED_REVID=135956016
* More flexible LValue syntaxGravatar Vladimir Moskva2016-08-23
| | | | | -- MOS_MIGRATED_REVID=131056178
* Make SkylarkClassObject "Bazel-specific".Gravatar Dmitry Lomov2016-08-05
| | | | | | | This in preparation to DeclaredProviders implementation. -- MOS_MIGRATED_REVID=129420617
* Reinstate mutable maps, again.Gravatar Francois-Rene Rideau2016-02-17
| | | | | -- MOS_MIGRATED_REVID=114860576
* Rollback of commit f941d56acfad5f8c819c81b494f806ea74ea7fd8.Gravatar Carmi Grushko2016-02-02
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks many targets, see [] *** Original change description *** Reinstate mutable SkylarkDict Add <String, Object> annotation to optionMap invocation in SkylarkAttr, to make JDK 1.7 happy. Give the visible name "aspect" to class SkylarkAspect. -- MOS_MIGRATED_REVID=113543873
* Reinstate mutable SkylarkDictGravatar Francois-Rene Rideau2016-02-01
| | | | | | | | | | Add <String, Object> annotation to optionMap invocation in SkylarkAttr, to make JDK 1.7 happy. Give the visible name "aspect" to class SkylarkAspect. -- MOS_MIGRATED_REVID=113394826
* Rollback of commit c0a8c58b9230a1f5d76269eb7dc6b11e18f19686.Gravatar Damien Martin-Guillerez2016-01-29
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Break Java 1.7 builds of Bazel. See http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/327/console Test: git clone ... && git revert c0a8c58 && export JAVA_VERSION=1.7 && export BAZEL_COMPILE_TARGET=compile && bash -c "source scripts/ci/build.sh; bazel_build" *** Original change description *** Make Skylark dicts mutable Represent Skylark dict using a new subclass SkylarkDict<K, V> of Map<K, V>. Back it with a TreeMap to provide a deterministic iteration order. Also make SkylarkList generic in its element type <E>. Have Artifact implement Comparable<Object> so it can be used as TreeMap key. -- MOS_MIGRATED_REVID=113359718
* Make Skylark dicts mutableGravatar Francois-Rene Rideau2016-01-29
| | | | | | | | | | Represent Skylark dict using a new subclass SkylarkDict<K, V> of Map<K, V>. Back it with a TreeMap to provide a deterministic iteration order. Also make SkylarkList generic in its element type <E>. Have Artifact implement Comparable<Object> so it can be used as TreeMap key. -- MOS_MIGRATED_REVID=113277489
* Enable label-based Skylark loading. In particular, such labels may reference ↵Gravatar John Field2015-12-22
| | | | | | | | | | | | | | | | | | | files in external repositories. In addition: - Cleaned up and refactored some tests to reflect the new loading behavior. Deferred to future CLs: - Updating Bazel Skylark documentation to reflect the new load form. - Enabling command-line loading of Aspects via labels. RELNOTES: Skylark load statements may now reference .bzl files via build labels, in addition to paths. In particular, such labels can be used to reference Skylark files in external repositories; e.g., load("@my_external_repo//some_pkg:some_file.bzl", ...). Path-based loads are now deprecated and may be disabled in the future. Caveats: Skylark files currently do not respect package visibility; i.e., all Skylark files are effectively public. Also, loads may not reference the special //external package. -- MOS_MIGRATED_REVID=110786452
* Move annotation classes used for referencing framework Java classes from ↵Gravatar John Field2015-12-16
| | | | | | | | | | | | | | Skylark into their own package. This allows, e.g., classes in the syntax package to access classes in the cmdline package without creating circular dependencies. While we're here: - Removed a couple of unused BUILD deps flagged in []. - Updated SkylarkRuleImplementationFunctionsTest to remove non-ASCII characters and clarify the intent of the test. -- MOS_MIGRATED_REVID=110360763
* Change assertNoEvents to assertNoWarningsOrErrors with corresponding semantics.Gravatar Ulf Adams2015-10-27
| | | | | | | | The plan is to make EventCollectionApparatus collect all events, so the assert methods all need to specify the subset that they apply to. -- MOS_MIGRATED_REVID=106291708
* Assert the specific type of event, not just the existence of any event.Gravatar Ulf Adams2015-10-22
| | | | | | | | Also remove a bunch of custom uses of EventCollector, and use the (already existing) EventCollectionApparatus instead. -- MOS_MIGRATED_REVID=106047665
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Open source some skylark tests.Gravatar Han-Wen Nienhuys2015-09-22
-- MOS_MIGRATED_REVID=103652672