aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/MethodLibrary.java
Commit message (Collapse)AuthorAge
* implement list.insert for skylark ruleGravatar Yue Gan2016-04-07
| | | | | | | RELNOTES: implement list.insert for skylark rule -- MOS_MIGRATED_REVID=119243427
* Skylark: improved documentation and error messages of getattr() and ↵Gravatar Florian Weikert2016-03-08
| | | | | | | | | hasattr() when being called with the name of an existing method. While hasattr(obj, 'existing method') continues to return true, getattr(obj, 'existing method') always throws an exception (with a more detailed message than before), regardless of whether a default value was specified or not. -- MOS_MIGRATED_REVID=116613716
* Global cleanup change.Gravatar Googler2016-03-08
| | | | | -- MOS_MIGRATED_REVID=116569594
* Skylark: implement dict.updateGravatar Laurent Le Brun2016-03-08
| | | | | -- MOS_MIGRATED_REVID=116553978
* Implement pop(), popitem() and setdefault() for dictGravatar Francois-Rene Rideau2016-02-19
| | | | | -- MOS_MIGRATED_REVID=114966513
* 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
* Make SkylarkList a List.Gravatar Francois-Rene Rideau2016-01-22
| | | | | | | | | | | | | | | SkylarkList now implements the List interfaces, except that its mutating methods throw an UnsupportedOperationException, just like ImmutableList does. To actually mutate a SkylarkList, you need to pass a Location and a suitable Environment object with a matching Mutability while it is still active. Introduce SkylarkMutable and SkylarkMutable.MutableCollection to better handle mutable data structures. Remove some functions in EvalUtils made obsolete by this and previous changes regarding Skylark lists. -- MOS_MIGRATED_REVID=112768457
* Add list.append and list.extend to the documentationGravatar Laurent Le Brun2016-01-07
| | | | | -- MOS_MIGRATED_REVID=111600744
* Make unsafe list methods non-publicGravatar Laurent Le Brun2015-12-28
| | | | | -- MOS_MIGRATED_REVID=110838816
* Reduce differences between Skylark and Build evaluationGravatar Laurent Le Brun2015-12-28
| | | | | | | Add some functions to Build, allow method calls. -- MOS_MIGRATED_REVID=110835163
* Add list.popGravatar Laurent Le Brun2015-12-22
| | | | | -- MOS_MIGRATED_REVID=110778743
* Skylark: Slice operations now accept a step argument.Gravatar Florian Weikert2015-12-17
| | | | | -- MOS_MIGRATED_REVID=110446625
* Rollback of commit 21fbbd6a32b95ba746f09dae1eaeaccf675cd5b3.Gravatar Florian Weikert2015-12-17
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** The original CL broke our CI because Bazel used an old version of Guava (18.0 instead of 19.0). We fixed this problem, so we can roll forward the original change. *** Original change description *** Automated [] rollback of []. *** Reason for rollback *** Broke the build: http://ci.bazel.io/job/Bazel/262/ *** Original change description *** Skylark: implemented more string functions (isalnum, isdigit, etc). -- MOS_MIGRATED_REVID=110439750
* Rollback of commit d03485f1361ff825a976512959438321442c7c98.Gravatar Kristina Chodorow2015-12-16
| | | | | | | | | | | | | *** Reason for rollback *** Broke the build: http://ci.bazel.io/job/Bazel/262/ *** Original change description *** Skylark: implemented more string functions (isalnum, isdigit, etc). -- MOS_MIGRATED_REVID=110383960
* 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
* Implement list.remove functionGravatar Laurent Le Brun2015-12-16
| | | | | -- MOS_MIGRATED_REVID=110356439
* Skylark: implemented all() and any()Gravatar Florian Weikert2015-12-16
| | | | | -- MOS_MIGRATED_REVID=110348607
* Skylark: implemented more string functions (isalnum, isdigit, etc).Gravatar Florian Weikert2015-12-16
| | | | | -- MOS_MIGRATED_REVID=110261986
* Skylark: implemented reversed()Gravatar Florian Weikert2015-12-15
| | | | | -- MOS_MIGRATED_REVID=110141376
* Skylark: implemented min() and max().Gravatar Florian Weikert2015-12-13
| | | | | -- MOS_MIGRATED_REVID=110025690
* Skylark: implemented str.splitlines()Gravatar Florian Weikert2015-12-11
| | | | | -- MOS_MIGRATED_REVID=109942021
* Workaround javac 1.7 bugGravatar Dmitry Lomov2015-11-19
| | | | | -- MOS_MIGRATED_REVID=108243881
* Add list.index methodGravatar Laurent Le Brun2015-11-10
| | | | | -- MOS_MIGRATED_REVID=107379557
* Add Skylark support for string_list_dictGravatar Francois-Rene Rideau2015-10-30
| | | | | | | Convert to Skylark values when destructuring a sequence or map. -- MOS_MIGRATED_REVID=106591523
* Add some strip/rstrip/lstrip testsGravatar Googler2015-10-21
| | | | | | | and fix the bugs that showed up as a result. -- MOS_MIGRATED_REVID=105896905
* Unify Skylark and BUILD listsGravatar Francois-Rene Rideau2015-10-20
| | | | | | | | Use SkylarkList everywhere rather than either List or GlobList. Keep a GlobList underneath a MutableList, where applicable. -- MOS_MIGRATED_REVID=105864035
* Minor improvements to set documentation.Gravatar Laurent Le Brun2015-10-16
| | | | | -- MOS_MIGRATED_REVID=105591091
* Skylark: Add lstrip and rstrip functions.Gravatar Laurent Le Brun2015-10-15
| | | | | -- MOS_MIGRATED_REVID=105498175
* Update "print" documentation (we discourage its use).Gravatar Laurent Le Brun2015-10-09
| | | | | -- MOS_MIGRATED_REVID=104954735
* 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
* Implemented copy constructor for Skylark dictionaries: new_dict = dict(old_dict)Gravatar Florian Weikert2015-09-25
| | | | | -- MOS_MIGRATED_REVID=103932279
* Separate build-specific types and types inherent to Skylark.Gravatar Lukacs Berki2015-09-21
| | | | | -- MOS_MIGRATED_REVID=103374106
* Refactor SkylarkList to allow MutableListGravatar Francois-Rene Rideau2015-09-21
| | | | | | | | Make SkylarkList no longer read-only to match Python and the BUILD language. Instead, subject it to a Mutability object inherited from the Environment. -- MOS_MIGRATED_REVID=103332973
* Fix typos in "Packages" description and MethodLibrary docGravatar Mark Schaller2015-09-14
| | | | | -- MOS_MIGRATED_REVID=102991839
* Prevented catching/wrapping of InterruptedExceptions, especially in ↵Gravatar Florian Weikert2015-09-14
| | | | | | | BaseFunction. -- MOS_MIGRATED_REVID=102988766
* Refactor Skylark Environment-sGravatar Francois-Rene Rideau2015-09-11
| | | | | | | | | | | | | | | | | | | | Make Environment-s freezable: Introduce a class Mutability as a revokable capability to mutate objects in an Environment. For now, only Environment-s carry this capability. Make sure that every Mutability is revoked in the same function that create... This reinstates a change that previously rolled-back because it broke the serializability of SkylarkLookupValue. Bad news: serializing it succeeds for the wrong reason, because a SkylarkEnvironment was stored as a result (now an Environment.Extension) that was Serializable but inherited its bindings from an Environment (now an Environment.BaseExtension) which wasn't Serializable. Apparently, Java doesn't try to serialize the bindings then (or at least doesn't error out when it fails), because these bindings map variable names to pretty arbitrary objects, and a lot of those we find in practice aren't Serializable. Thus the current code passes the same tests as the previous code, but obviously the serialization is just as ineffective as it used to be. -- MOS_MIGRATED_REVID=102776694
* Rollback of commit 5a94e59f02833f9142bad9203acd72626b089535.Gravatar Janak Ramakrishnan2015-09-08
| | | | | | | | | *** Reason for rollback *** Breaks serialization of SkyValues. -- MOS_MIGRATED_REVID=102457225
* Refactor Skylark Environment-sGravatar Francois-Rene Rideau2015-09-08
| | | | | | | | | | | | | | | | | Make Environment-s freezable: Introduce a class Mutability as a revokable capability to mutate objects in an Environment. For now, only Environment-s carry this capability. Make sure that every Mutability is revoked in the same function that creates it, so no Environment is left open for modification after being created and exported; exceptions for tests, the shell and initialization contexts. Unify Environment, SkylarkEnvironment and EvaluationContext into Environment. Have a notion of Frame for the bindings + parent + mutability. Replace the updateAndPropagate mechanism by a dynamicFrame. Simplify ValidationEnvironment, that is now always deduced from the Environment. -- MOS_MIGRATED_REVID=102363438
* Implement a Python 2 compatible isalpha function for Skylark strings.Gravatar Googler2015-09-03
| | | | | -- MOS_MIGRATED_REVID=102263878
* Move global objects to RuntimeGravatar Francois-Rene Rideau2015-08-31
| | | | | | | | Move away global constants and global namespaces out of Environment and into a new file Runtime. -- MOS_MIGRATED_REVID=101940218
* Add string.capitalize()Gravatar Laurent Le Brun2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101575207
* Rename isSkylarkEnabled to isSkylarkGravatar Francois-Rene Rideau2015-08-26
| | | | | -- MOS_MIGRATED_REVID=101518833
* The sorted function now accepts sets and dictionaries inputs.Gravatar Laurent Le Brun2015-08-24
| | | | | -- MOS_MIGRATED_REVID=101208507
* Improve documentation in MethodLibraryGravatar Laurent Le Brun2015-08-20
| | | | | -- MOS_MIGRATED_REVID=101014733
* Split Skylark Library into multiple pages, one per module. Add collapsibleGravatar David Chen2015-08-18
| | | | | | | | submenus to sidebar, and expand and highlight the link for the current page. Collapse sidebar on mobile and expose button for toggling sidebar. -- MOS_MIGRATED_REVID=100836792
* Define operator[] in the same way in BUILD and in bzl filesGravatar Laurent Le Brun2015-08-12
| | | | | -- MOS_MIGRATED_REVID=100400400