aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleClassFunctions.java
Commit message (Collapse)AuthorAge
* test-wrapper: add empty impl + Bazel flagGravatar Laszlo Csomor2018-08-14
| | | | | | | | | | | | | | | | | | | | | | | This commit adds: - the skeleton implementation of the Windows native test wrapper - a depenency on the native test wrapper from test rules, through the new $test_wrapper rule attribute - the --windows_native_test_wrapper Bazel flag, which is currently a no-op See https://github.com/bazelbuild/bazel/issues/5508 Change-Id: I8df95c8ce8bab53c51c257698ec95416065a836e Closes #5854. Change-Id: I2ffc78bceec5dd867af775b5878f105fa87c3dba PiperOrigin-RevId: 208650699
* Add a flag to split test.xml generation into a separate SpawnGravatar ulfjack2018-07-27
| | | | | | | | | | At this time, this is only implemented for the StandaloneTestStrategy. This solves a race condition on Posix-like systems, where we cannot guarantee that the pipes are actually fully flushed to disk when the test process exits, and this can cause the test.xml to be empty, which makes it hard to debug issues. (The test.log files do not show up in normal CI systems, only the test.xml files.) Progress on #4608. PiperOrigin-RevId: 206292179
* Create Bazel coverage report action.Gravatar elenairina2018-07-06
| | | | | | | Fixes #5246 RELNOTES: None. PiperOrigin-RevId: 203453340
* Remove old (dead) SkylarkSignature-binding code from some classes.Gravatar cparsons2018-06-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 202386363
* Automated refactor of Label.parseAbsolute() to always pass a repository mappingGravatar dannark2018-06-27
| | | | | RELNOTES: None PiperOrigin-RevId: 202360925
* Initial check-in of skydoc rewrite.Gravatar cparsons2018-06-26
| | | | | | | | | | | | | | This skydoc rewrite uses an actual skylark interpreter with a faked build API (implementing the actual build API that Bazel uses). There's a lot left to do here, this is a barebones start. For example, this does not yet handle: - load() statements - non-global build API elements (e.g. apple_common) - output of any rule information other than attribute names - markdown output format RELNOTES: None. PiperOrigin-RevId: 202187207
* Remove Label.parseAbsolute(string, boolean). The goal is to get rid of all ↵Gravatar dannark2018-06-22
| | | | | | | label methods that don't explicitly pass a repository mapping. RELNOTES: None PiperOrigin-RevId: 201717665
* Audit usages of Label.getRelative and update to Label.getRelativeWithRemappingGravatar dannark2018-06-21
| | | | | RELNOTES: None PiperOrigin-RevId: 201617188
* Migrate DefaultInfo and its provider to skylarkbuildapiGravatar cparsons2018-06-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 201544076
* Migrate Actions provider to skylarkbuildapiGravatar cparsons2018-06-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 201367075
* Make variable providers coming from the toolchains attribute shouldn't beGravatar jcater2018-06-19
| | | | | | | checked for restricted_to and compatible_with constraints, because they are part of the execution, not providing new dependencies. PiperOrigin-RevId: 201196891
* Clean up uses of SkylarkList<String> and ast in toolchains parameters.Gravatar John Cater2018-06-18
| | | | | | | | | Change-Id: I3655868d34dd98f5cde084a61995dfae8e4b94c0 Closes #5374. Change-Id: I3655868d34dd98f5cde084a61995dfae8e4b94c0 PiperOrigin-RevId: 201032126
* Remove LIPO supportGravatar hlopko2018-06-15
| | | | | RELNOTES: Support for LIPO has been fully removed. PiperOrigin-RevId: 200724578
* Allow Skylark rules to specify whether targets can add execution platform ↵Gravatar John Cater2018-06-14
| | | | | | | | | constraints. Closes #5341. Change-Id: Ib74e59fec48102469a5039e045e3f3d0e0d86d8c PiperOrigin-RevId: 200526448
* Enable per-target execution for genrule, sh_*, and *_test.Gravatar jcater2018-06-13
| | | | PiperOrigin-RevId: 200410988
* Add LabelLateBoundDefault to :coverage_report_generator attributeGravatar dbabkin2018-06-07
| | | | | RELNOTES:none PiperOrigin-RevId: 199619691
* Add LabelLateBoundDefault to :coverage_support attributeGravatar dbabkin2018-06-07
| | | | | RELNOTES:none PiperOrigin-RevId: 199604462
* Automated rollback of commit 1b041c86147098451bffc94d2602aea26ee16e06.Gravatar juliexxia2018-06-05
| | | | | | | | | | | | | *** Reason for rollback *** http://b/109733929 This CL breaks Blaze_CorpTest which must pass for Blaze's nightly candidate to form *** Original change description *** Add LabelLateBoundDefault to :coverage_support attribute RELNOTES:none PiperOrigin-RevId: 199352111
* Automated rollback of commit 52c4d05d1bfd54ea901e9926be7b262dd45e34de.Gravatar dbabkin2018-06-05
| | | | | | | | | | | | | *** Reason for rollback *** http://b/109733929 *** Original change description *** Add LabelLateBoundDefault to :coverage_report_generator attribute RELNOTES:none PiperOrigin-RevId: 199308190
* Add LabelLateBoundDefault to :coverage_report_generator attributeGravatar dbabkin2018-06-05
| | | | | RELNOTES:none PiperOrigin-RevId: 199280443
* Add LabelLateBoundDefault to :coverage_support attributeGravatar dbabkin2018-06-05
| | | | | RELNOTES:none PiperOrigin-RevId: 199256705
* Let Skylark rules take part in MakeVariableExpandingRule expansions using theGravatar jcater2018-06-04
| | | | | | toolchains attribute. PiperOrigin-RevId: 199133235
* Migrate OutputGroupInfo to skylarkbuildapiGravatar cparsons2018-05-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 197949354
* Migrate struct() to skylarkbuildapiGravatar cparsons2018-05-24
| | | | | RELNOTES: None. PiperOrigin-RevId: 197915097
* RELNOTES: Update the skylark DefaultInfo documentation to spell out ↵Gravatar Googler2018-05-17
| | | | | | runfiles, data_runfiles and default_runfiles PiperOrigin-RevId: 197017350
* Migrate almost all Skylark global modules to skylarkbuildapiGravatar cparsons2018-05-07
| | | | | | | There are still a few global @SkylarkSignature-annotated top-level objects that need to be migrated in SkylarkRuleClassFunctions, but this migrates everything else. RELNOTES: None. PiperOrigin-RevId: 195652038
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 194985157
* Use a new pattern for builtin Provider objects with @SkylarkCallable.Gravatar cparsons2018-05-01
| | | | | | | | This deprecates the old NativeProvider pattern. The new pattern is demonstrated using AppleStaticLibraryInfo. RELNOTES: None. PiperOrigin-RevId: 194956883
* Allow skylark rule definitions to advertise providers that targets of the ↵Gravatar cparsons2018-04-27
| | | | | | | | | | | rule must propagate This allows native aspects which specifically require advertised providers to be applied to skylark rules. Implementation to allow aspects to explicitly declare provider requirements will come later. RELNOTES: Skylark rule definitions may advertise providers that targets of the rule must propagate. PiperOrigin-RevId: 194581466
* Migrate most of SkylarkRuleClassFunctions to use @SkylarkCallableGravatar cparsons2018-04-17
| | | | | | | The only things that remain are Provider subclasses, as they require special treatment. (Namely, they are referencable at the top level as a Provider and not a function.) RELNOTES: None. PiperOrigin-RevId: 193249523
* Create @SkylarkConstructor annotation, to annotate certain global-namespace ↵Gravatar cparsons2018-04-16
| | | | | | | | | | @SkylarkCallable methods as representing constructors of other skylark types. This change also demonstrates the new pattern on the global Label() constructor. As an added bonus, it fixes documentation of that constructor. The old documentation used to read "Label.Label(...)" and the new documentation reads "Label(...)". RELNOTES: None. PiperOrigin-RevId: 193109338
* Create @SkylarkGlobalLibrary annotation, allowing classes/interfaces with ↵Gravatar cparsons2018-04-16
| | | | | | | | | global skylark functions to use @SkylarkCallable instead of @SkylarkSignature. Also migrate skylark's global "rule" function to @SkylarkCallable, thus demonstrating the new feature. RELNOTES: None. PiperOrigin-RevId: 193085313
* Introduce `--incompatible_disallow_filetype` to remove the `FileType` function.Gravatar laurentlb2018-04-13
| | | | | | | | RELNOTES: `FileType` is deprecated and will be removed soon. Try the `--incompatible_disallow_filetype` flag to ensure your code is forward-compatible. PiperOrigin-RevId: 192758063
* Migrate Info's skylark methods to @SkylarkCallableGravatar cparsons2018-04-10
| | | | | RELNOTES: None PiperOrigin-RevId: 192337555
* Replaces JavaSerializableCodec with DynamicCodec as the defaultGravatar shahan2018-04-04
| | | | | | | | | * Skylark serialization was previously dropping location in error, which this fixes. * Deletes a lot of codecs with fidelity issues (DynamicCodec has full fidelity). * Deletes EnumRuntimeCodec which can now be replaced with the superior EnumCodec. * This should eventually allow us to delete Serializable from all Blaze. The remaining blocker is NoSuchPackageExceptionCodec. PiperOrigin-RevId: 191603929
* Make RuleClass serializable and remove Environment from it, since it was ↵Gravatar janakr2018-03-30
| | | | | | | | only being used for the transitive hash code and transitive label of its globals, which can be passed in explicitly. Assert along the way that the transitive label of its globals is always non-null. That is currently the case, although there seems to be no hard invariant of the system that it is true. Might as well tighten it now. PiperOrigin-RevId: 191103310
* Make a bunch more stuff serializable, especially anonymous classes and ↵Gravatar janakr2018-03-26
| | | | | | lambdas. Give a bit more information in JavaSerializableCodec when serialization fails on an anonymous class or lambda. PiperOrigin-RevId: 190472245
* Add more documentation for rule.outputsGravatar brandjon2018-03-20
| | | | | | | | | We want to simplify/remove this API, but let's document it in the meantime. Also fix harmless bug that annoyed me. It used rawTemplate instead of formatStr when there are no placeholders. This would theoretically fail to properly escape % symbols, except that the code path luckily short-circuits later on if there are no placeholders. RELNOTES: PiperOrigin-RevId: 189760809
* Tag Attribute, SkylarkDefinedAspect and some other Skylark classes withGravatar mjhalupka2018-03-12
| | | | | | | | | @AutoCodec. Remove Environment from SkylarkDefinedAspect. Add a note to BuiltInFunction that we shouldn't need to serialize it because all instances should be constant. PiperOrigin-RevId: 188763259
* Fix broken links and formattingGravatar brandjon2018-03-10
| | | | | RELNOTES: None PiperOrigin-RevId: 188625855
* Fix incomplete documentation changeGravatar brandjon2018-03-06
| | | | | | | | | This finishes a partial change erroneously submitted as part of https://github.com/bazelbuild/bazel/commit/864ac520951821bd197a02490d2b04f6246be7fa. The full outputs map behavior is still not fully described because its implementation is too complex. That requires a separate discussion. RELNOTES: None PiperOrigin-RevId: 188049028
* Revamp docs for ctx.outputsGravatar brandjon2018-03-02
| | | | | | | Explain the deprecation of ctx.outputs.executable. RELNOTES: None PiperOrigin-RevId: 187640408
* Revamp discussion of executable/test rulesGravatar brandjon2018-03-02
| | | | | | | Rewrite that part of rules.md and update rule() docs. Also clarify the Action object's docs to put it in context. RELNOTES: None PiperOrigin-RevId: 187636896
* Migrate a few trivial uses of @SkylarkSignature to use @SkylarkCallable insteadGravatar cparsons2018-03-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 187531006
* Revamp docs for default outputs / output groupsGravatar brandjon2018-02-26
| | | | | | | | | | | - collapsed these into one section - removed the term "implicit outputs" - add explanation for what these are first, then how to control them - update docs for DefaultInfo - also update docs for test/executable args of rule() RELNOTES: None PiperOrigin-RevId: 187026641
* Remove hard-wired basenames for the test setup and the coverage collection ↵Gravatar lberki2018-02-09
| | | | | | | | | script. Accomplished by creating an explicit attribute for both of them on test actions. RELNOTES: None. PiperOrigin-RevId: 185132460
* Remove Skylark ConfigurationTransition.DATA references.Gravatar gregce2018-01-29
| | | | PiperOrigin-RevId: 183733621
* Allow late bound defaults in skylark aspectsGravatar cparsons2018-01-04
| | | | | RELNOTES: None. PiperOrigin-RevId: 180849649
* Replace Attribute.ConfigurationTransition with ↵Gravatar gregce2017-12-28
| | | | | | | | | | | | | | | | config.transitions.ConfigurationTransitionProxy. The "proxy" part is to dissuade people from writing: void myfunc(ConfigurationTransition transition) signatures casually. Maybe that's actually a better name than "Transition". But I'd rather rename Transition to ConfigurationTransition in its own change if we want to do that. PiperOrigin-RevId: 180285321
* Rename some ClassObject/Provider-related methodsGravatar brandjon2017-12-28
| | | | | | | The terminology "field" is preferred over "key" for the components of a struct or struct-like object. RELNOTES: None PiperOrigin-RevId: 180269374