aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java
Commit message (Collapse)AuthorAge
* Expose runfiles symlink functionality in SkylarkGravatar Googler2016-03-11
| | | | | | | | | | | | | | | | | | | | | The Skylark rule context object has a runfiles method. This adds two optional parameters to that method, "symlinks" and "root_symlinks", that expose functionality from the underlying Runfiles java class. With this functionality, one can construct links in the runfiles tree where the source and destination of the link have different names and/or relative directories. This might be useful for things like AppEngine rules where a file in a subdirectory of the source tree needs to appear in the root directory of the runfiles tree. If either new parameter is used, the runfiles is subject to stricter validity checking. This checking propagates to other runfiles that depend on it. RELNOTES: Added "root_symlinks" and "symlinks" parameters to Skylark runfiles() method. -- MOS_MIGRATED_REVID=116879064
* Reinstate mutable maps, again.Gravatar Francois-Rene Rideau2016-02-17
| | | | | -- MOS_MIGRATED_REVID=114860576
* Style fix: rename some args which had unusual suffixesGravatar Chris Parsons2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114464409
* Allow propagation of execution requirements to the ctx.resolve_command ↵Gravatar Chris Parsons2016-02-11
| | | | | | | | | function. In the case of the requires-darwin tag, /bin/bash will be used instead of an alternative, which matches the current genrule implementation. -- MOS_MIGRATED_REVID=114360408
* 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
* 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
* Add runfiles for HOST executables for actions without commands tooGravatar Brian Silverman2015-11-02
| | | | | | | | | | | | 6c51059e0a04d4170d10bfedbd9553b498cf28e7 adds the runfiles for HOST executables listed as inputs to SpawnActions with a command, but it seems reasonable to be able to execute those with non-command SpawnActions (ie shell scripts) too. -- Change-Id: I33b0fe3936afa87c69046350a53ee1485f2beab3 Reviewed-on: https://bazel-review.googlesource.com/#/c/2260/ MOS_MIGRATED_REVID=106845702
* Document and test how rules can run without the sandbox.Gravatar Brian Silverman2015-11-02
| | | | | | | | | | The only documentation about usable tags values was in a weird place, along with duplicated information about flaky tests. -- Change-Id: Ib98a0a5c582890512161ecf9f5d89c8e78d9ad68 Reviewed-on: https://bazel-review.googlesource.com/#/c/2220 MOS_MIGRATED_REVID=106832660
* Improve documentation for resolve_commandGravatar Francois-Rene Rideau2015-10-21
| | | | | -- MOS_MIGRATED_REVID=105875176
* 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
* Remove command_helper, use resolve_command insteadGravatar Francois-Rene Rideau2015-10-15
| | | | | | | Eliminate side-effect in command_line_srcs and hide the internal class. -- MOS_MIGRATED_REVID=105480701
* Description redacted.Gravatar Francois-Rene Rideau2015-10-08
| | | | | -- MOS_MIGRATED_REVID=104886879
* 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
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - Label parsing can be simplified - lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change. -- MOS_MIGRATED_REVID=103527877
* Separate build-specific types and types inherent to Skylark.Gravatar Lukacs Berki2015-09-21
| | | | | -- MOS_MIGRATED_REVID=103374106
* 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
* Fix $(location //external:some_tool) expansion for genrules.Gravatar Brian Silverman2015-08-28
| | | | | | | | | | | | Previously, targets in "tools" of genrules could only be expanded in $(location)s as the target of the bind. This is another part of fully fixing #90. -- Change-Id: I91444fbfe551b651c46811014639f08f779c70aa Reviewed-on: https://bazel-review.googlesource.com/#/c/1750/ MOS_MIGRATED_REVID=101760690
* Set the workspace suffix for runfilesGravatar Kristina Chodorow2015-08-13
| | | | | | | This CL covers the "easy" cases. Followup CLs will take care of couple dozen remaining gnarly ones. -- MOS_MIGRATED_REVID=100479410
* UTF-8 encoded template substitution values are now properly displayed.Gravatar Florian Weikert2015-08-12
| | | | | -- MOS_MIGRATED_REVID=100410176
* When using a SpawnAction with command, the action automatically adds the ↵Gravatar Florian Weikert2015-08-12
| | | | | | | | | runfiles of inputs that are a) executable and b) in host configuration. This is necessary because "command" could lead to the execution of a binary that might rely on one or more runfiles. However, SpawnAction didn't know about these runfiles, which meant that they were not copied to the runfiles area, thus leading to an error. -- MOS_MIGRATED_REVID=100361726
* Skylark: Implemented ctx.empty_action() to create actions that neither ↵Gravatar Florian Weikert2015-07-17
| | | | | | | execute a command nor produce any output, but that are useful for inserting "extra actions". -- MOS_MIGRATED_REVID=98481888
* Skylark: Implemented ctx.expand_location() which expands the location(s) of ↵Gravatar Florian Weikert2015-07-10
| | | | | | | the target file(s) of labels -- MOS_MIGRATED_REVID=97949264
* Rollback of commit 3e66823d81b6432953f8fa4105a82c3fe605239e.Gravatar Laurent Le Brun2015-05-27
| | | | | | | | | | | | | *** Reason for rollback *** Breaks Bazel / iOS projects ([]) *** Original change description *** Always set Runfiles suffix in runfiles Skylark function -- MOS_MIGRATED_REVID=94554564
* Skylark: Improve documentation related to Shell commands.Gravatar Laurent Le Brun2015-05-21
| | | | | -- MOS_MIGRATED_REVID=94023360
* Always set Runfiles suffix in runfiles Skylark functionGravatar Ross Light2015-05-18
| | | | | -- MOS_MIGRATED_REVID=93893620
* Skylark: Add an empty argument after bash -c 'arg'.Gravatar Laurent Le Brun2015-05-15
| | | | | | | | bash treats the argument after the command as $0. This is confusing. -- MOS_MIGRATED_REVID=93521828
* Skylark doc for action.mnemonicGravatar Laurent Le Brun2015-05-15
| | | | | -- MOS_MIGRATED_REVID=93517552
* Use BuiltinFunction for all builtinsGravatar Francois-Rene Rideau2015-04-22
| | | | | | | | Replace the uses of AbstractFunction, MixedModeFunction, SkylarkFunction and SimpleSkylarkFunction by BuiltinFunction. -- MOS_MIGRATED_REVID=91763158
* Migrate SkylarkBuiltin annotations to SkylarkSignature instead.Gravatar Francois-Rene Rideau2015-04-21
| | | | | -- MOS_MIGRATED_REVID=91603959
* Eliminate SkylarkType.toMap() in favor of ImmutableMap.copyOf() and simplify Gravatar Lukacs Berki2015-04-14
| | | | | | | SkylarkType.castMap() a little. -- MOS_MIGRATED_REVID=90988088
* Skylark: Remove obsolete function ctx.var().Gravatar Laurent Le Brun2015-04-03
| | | | | | | Use ctx.var dict instead. -- MOS_MIGRATED_REVID=90155461
* Skylark: Mark command_helper as experimental.Gravatar Laurent Le Brun2015-04-01
| | | | | | | | This class is poorly documented and the API is not well thought. We cannot remove it now (because it is used) though. -- MOS_MIGRATED_REVID=90070889
* Kill command_line in ctx.actionGravatar Laurent Le Brun2015-03-31
| | | | | | | | It appears to be unused, undocumented and untested. We can reintroduce the feature later if needed (probably with a different design). -- MOS_MIGRATED_REVID=89958970
* Skylark: Improve documentationGravatar Laurent Le Brun2015-03-31
| | | | | -- MOS_MIGRATED_REVID=89957248
* Skylark: minor documentation cleanups.Gravatar Googler2015-03-23
| | | | | -- MOS_MIGRATED_REVID=89123209
* Move cast* utilities to SkylarkTypeGravatar Francois-Rene Rideau2015-03-20
| | | | | | | | Move castList, castMap, toMap utilities away from SkylarkFunction to SkylarkType where the cast utility already has been moved. -- MOS_MIGRATED_REVID=89042835
* Skylark: Make ctx.var a dictionary.Gravatar Laurent Le Brun2015-03-13
| | | | | | | | ctx.var(x) is kept for compatibility and should be removed after next release. -- MOS_MIGRATED_REVID=88438195
* Lots of comments, clarification and correction in Skylark docs.Gravatar Laszlo Csomor2015-02-16
| | | | | -- MOS_MIGRATED_REVID=86436572
* Cosmetic changes moved out of []Gravatar Francois-Rene Rideau2015-02-11
| | | | | | | | These shouldn't affect the semantic of the program in any significant way, but will hush the linter and other such metaprograms. -- MOS_MIGRATED_REVID=86089271
* Skylark: fixing a crash. It occurred when the files field of the struct ↵Gravatar Googler2015-02-09
| | | | | | | returned by the rule implementation function doesn't have the correct generic type. Error messages are unified. -- MOS_MIGRATED_REVID=85874511
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957