aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
Commit message (Collapse)AuthorAge
* Fix a bunch of typosGravatar Jon Brandvein2016-11-10
| | | | | -- MOS_MIGRATED_REVID=138757881
* Implemented default providerGravatar Vladimir Moskva2016-11-09
| | | | | -- MOS_MIGRATED_REVID=138625702
* Add SkylarkAspect to SkylarkRuleContext for aspectsGravatar Dmitry Lomov2016-11-09
| | | | | -- MOS_MIGRATED_REVID=138556910
* Rollback of commit b91fac3b1f0f5142a906aa12280de936f29fb607.Gravatar Luis Fernando Pino Duque2016-11-09
| | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks several tests under //devtools/ide/eclipse/aspects as shown by the nightly []: [] *** Original change description *** Restrict google_glob_information to eclipse_aspect. '--legacy_expose_globs' flag has no effect now. -- MOS_MIGRATED_REVID=138517258
* Restrict google_glob_information to eclipse_aspect.Gravatar Dmitry Lomov2016-11-08
| | | | | | | '--legacy_expose_globs' flag has no effect now. -- MOS_MIGRATED_REVID=138410651
* Automated [] rollback of commit 8d36a34ee02ad0fd07d713b8c8ee273ff30d2fb9.Gravatar Jon Brandvein2016-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixed depended-on broken CL *** Original change description *** Automated [] rollback of commit f341bc4f6e918b6a41c1536c111bbf24f14f967b. *** Reason for rollback *** Depends on c/135226123 which depends on commit 9c25afe750a937b2152c21a93effc8b9ba82c27b, which needs to be rolled back. *** Original change description *** Add ctx.get_actions(), for inspecting the actions created by the current rule. This returns an ActionsProvider. In the case where the rule does not emit any more actions afterwards, the provider is equivalent to the one that gets passed on to the rule's dependencies. This may be u... *** ROLLBACK_OF=135781162 -- MOS_MIGRATED_REVID=135833495
* [Roll-forward] Rollback of commit dd299dbc61be51112534a4698f7cf2deee43053b.Gravatar Jon Brandvein2016-10-12
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixed underlying broken CL that was depended on *** Original change description *** Automated [] rollback of commit e025939e71b179ae0f6bd09ef3af474f49b853a2. *** Reason for rollback *** Depends on commit 9c25afe750a937b2152c21a93effc8b9ba82c27b, which needs to be rolled back. *** Original change description *** Add API for individual actions This exposes action inputs, outputs, argv, content, and substitutions (if applicable). -- MOS_MIGRATED_REVID=135821603
* Rollback of commit e025939e71b179ae0f6bd09ef3af474f49b853a2.Gravatar Ulf Adams2016-10-11
| | | | | | | | | | | | | | | *** Reason for rollback *** Depends on commit 9c25afe750a937b2152c21a93effc8b9ba82c27b, which needs to be rolled back. *** Original change description *** Add API for individual actions This exposes action inputs, outputs, argv, content, and substitutions (if applicable). -- MOS_MIGRATED_REVID=135783964
* Rollback of commit f341bc4f6e918b6a41c1536c111bbf24f14f967b.Gravatar Ulf Adams2016-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Depends on c/135226123 which depends on commit 9c25afe750a937b2152c21a93effc8b9ba82c27b, which needs to be rolled back. *** Original change description *** Add ctx.get_actions(), for inspecting the actions created by the current rule. This returns an ActionsProvider. In the case where the rule does not emit any more actions afterwards, the provider is equivalent to the one that gets passed on to the rule's dependencies. This may be useful for unit testing analysis-time helper functions that take in ctx and have the side-effect of creating actions. In this use case, the testing rule should be marked _skylark_testable=True, and its implementation f... *** -- MOS_MIGRATED_REVID=135781162
* Add bin_dir and genfiles_dir to ctxGravatar Kristina Chodorow2016-10-11
| | | | | -- MOS_MIGRATED_REVID=135689610
* Add ctx.get_actions(), for inspecting the actions created by the current rule.Gravatar Jon Brandvein2016-10-07
| | | | | | | | | | | | | | This returns an ActionsProvider. In the case where the rule does not emit any more actions afterwards, the provider is equivalent to the one that gets passed on to the rule's dependencies. This may be useful for unit testing analysis-time helper functions that take in ctx and have the side-effect of creating actions. In this use case, the testing rule should be marked _skylark_testable=True, and its implementation function should call the helper and then inspect the result of get_actions(). -- MOS_MIGRATED_REVID=135353411
* Add API for individual actionsGravatar Jon Brandvein2016-10-05
| | | | | | | This exposes action inputs, outputs, argv, content, and substitutions (if applicable). -- MOS_MIGRATED_REVID=135226123
* Add an actions provider for testing Skylark rules.Gravatar Jon Brandvein2016-09-30
| | | | | | | The new provider gathers actions generated by any Skylark-based RuleConfiguredTarget, so long as the rule definition has _skylark_test=True set. For the moment this flag is under the user's control, but the intention is that it will be set by a test runner. -- MOS_MIGRATED_REVID=134687396
* Add an "is main repo" field to RootsGravatar Kristina Chodorow2016-09-09
| | | | | | | This is part of prepping for #1262. -- MOS_MIGRATED_REVID=132553178
* Better API for creating immutable Skylark lists.Gravatar Dmitry Lomov2016-09-06
| | | | | -- MOS_MIGRATED_REVID=132226460
* Allow Skyframe graph lookups and value retrievals to throw InterruptedException.Gravatar Janak Ramakrishnan2016-08-16
| | | | | | | The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer. -- MOS_MIGRATED_REVID=130327770
* Add the repository name as a parameter to the output path functionsGravatar Kristina Chodorow2016-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't do anything yet, it's in preparation for the execroot rearranging change. The execroot will have one bazel-out per repo, so it'll look like: execroot/ repo1/ bazel-out/ local-fastbuild/ bin/ repo2/ bazel-out/ local-fastbuild/ bin/ genfiles/ repo3/ bazel-out/ local-fastbuild/ testlogs/ and so on. Thus, any output path (getBinDirectory() & friends) needs to know what the repo name is. This changes so many places in the code I thought it would be good to do separately, then just flip the functionality in the execroot-rearranging commit. While I was poking around, I changed all of the refs I could from getPackageRelativeArtifact() to getBin/GenfilesArtifact(), so that 1) rule implementation don't have to know as much about roots and 2) they'll be more isolated from other output dir changes. `bazel info` and similar just return roots for the main repository. The only "change" is passing around a target label in the Java rules. Continues work on #1262. -- MOS_MIGRATED_REVID=129985336
* Allow ImplicitOutputsFunctions to be overriden on Rule creation.Gravatar Michajlo Matijkiw2016-08-10
| | | | | -- MOS_MIGRATED_REVID=129787305
* Add SkylarkClassObjectConstructor - a future return value of "provider" ↵Gravatar Dmitry Lomov2016-08-09
| | | | | | | function. -- MOS_MIGRATED_REVID=129726780
* Make SkylarkClassObject "Bazel-specific".Gravatar Dmitry Lomov2016-08-05
| | | | | | | This in preparation to DeclaredProviders implementation. -- MOS_MIGRATED_REVID=129420617
* LABEL attribute with split transitions should always be lists of TargetsGravatar Dmitry Lomov2016-07-04
| | | | | | | in Skylark rule context. -- MOS_MIGRATED_REVID=126405174
* Reorganize Skylark Reference documentation.Gravatar Dmitry Lomov2016-06-29
| | | | | -- MOS_MIGRATED_REVID=126081020
* Delete the legacy global function 'provider'.Gravatar Laurent Le Brun2016-06-03
| | | | | | | | | RELNOTES: global function 'provider' is removed from .bzl files. Providers can only be accessed through fields in a 'target' object. -- MOS_MIGRATED_REVID=123956571
* Skylark aspects should always output to bin directory.Gravatar Dmitry Lomov2016-04-22
| | | | | -- MOS_MIGRATED_REVID=120539216
* Skylark docs: fix ctx.file and ctx.files.Gravatar Laszlo Csomor2016-04-07
| | | | | | | | | | | | | | | They were using "<ATTR>" which was parsed as a HTML tag. ctx.file appeared as: It is a shortcut for: list(ctx.attr..files)[0] ctx.files appeared as: It is a shortcut for: [f for t in ctx.attr. for f in t.files] -- MOS_MIGRATED_REVID=119149347
* Expose feature list in SkylarkRuleContext.Gravatar Dmitry Lomov2016-03-17
| | | | | -- MOS_MIGRATED_REVID=117277091
* Rollback of commit b8101f57681f292a9ec312a9cbbc84ac4ec0668d.Gravatar Dmitry Lomov2016-03-04
| | | | | | | | | | | | | *** Reason for rollback *** Broke depot: [] *** Original change description *** Skylark aspects should always output to bin directory. -- MOS_MIGRATED_REVID=116264598
* Add documentation for fragments type, and add the four fragments (apple, ↵Gravatar Dave MacLachlan2016-03-02
| | | | | | | cpp, java, jvm) to the documentation. -- MOS_MIGRATED_REVID=116092594
* Fix the excepton when Skylark rule has 2 executable attributes pointing to ↵Gravatar Dmitry Lomov2016-02-29
| | | | | | | | | | | the same artifact. This fix is that we pick the random executable. Filed #987 for a better fix (the current behavior just crashes the build randomly and the real fix is involved). -- MOS_MIGRATED_REVID=115835198
* Skylark aspects should always output to bin directory.Gravatar Dmitry Lomov2016-02-28
| | | | | -- MOS_MIGRATED_REVID=115659763
* Expose ``build_file_path`` to Skylark rules.Gravatar Dmitry Lomov2016-02-22
| | | | | | | | Also adds neccessary support to Skylark implementation of IDE info aspect. -- MOS_MIGRATED_REVID=115084383
* Reinstate mutable maps, again.Gravatar Francois-Rene Rideau2016-02-17
| | | | | -- MOS_MIGRATED_REVID=114860576
* Expose AppleConfiguration to skylark as fragment "apple", along with a ↵Gravatar Chris Parsons2016-02-15
| | | | | | | callable method apple_host_system_env to return environment variables needed for various commands on apple hosts. -- MOS_MIGRATED_REVID=114550659
* 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
* Doc typo: avaliable -> availableGravatar Laurent Le Brun2016-01-13
| | | | | -- MOS_MIGRATED_REVID=111946969
* Provide rule class name to aspects.Gravatar Dmitry Lomov2016-01-11
| | | | | -- MOS_MIGRATED_REVID=111866202
* 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 aspect attributes and expose them to aspect implementation function.Gravatar Dmitry Lomov2015-12-16
| | | | | -- MOS_MIGRATED_REVID=110356954
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Fix skylark aspect issues.Gravatar Dmitry Lomov2015-12-08
| | | | | -- MOS_MIGRATED_REVID=109690378
* 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
* 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
* Removed new_file_suffix().Gravatar Florian Weikert2015-09-25
| | | | | -- MOS_MIGRATED_REVID=103926575
* 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
* 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
* Prevented catching/wrapping of InterruptedExceptions, especially in ↵Gravatar Florian Weikert2015-09-14
| | | | | | | BaseFunction. -- MOS_MIGRATED_REVID=102988766