aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/skylark
Commit message (Collapse)AuthorAge
* Clean up string representations for providersGravatar vladmos2017-07-07
| | | | | | | | | If --incompatible_descriptive_string_representations is passed, providers and their instances are converted to strings using `str`, `repr` and `print` functions differently (without leaking the provider's name which isn't supposed to be visible). PiperOrigin-RevId: 161196343
* Clean up string representations for attr and attr.*Gravatar vladmos2017-07-07
| | | | | | | | | This change is a part of global string representations cleanup using the --incompatible_descriptive_string_representations flag, however the change to attr and attr.* is not affected by the flag because string representations of these objects used to contain nondeterministic information (memory addresses). PiperOrigin-RevId: 161192934
* Improve error message when calling a builtin function with wrong typeGravatar laurentlb2017-07-07
| | | | | | | Error message is simpler and doesn't show the type of all arguments. RELNOTES: None. PiperOrigin-RevId: 161187134
* Clean up string representations for select valuesGravatar vladmos2017-07-07
| | | | | | | | If --incompatible_descriptive_string_representations is passed, select values are converted to strings using `str`, `repr` and `print` functions differently: "select(...)" instead of "selector(...)". PiperOrigin-RevId: 161129809
* Clean up string representations for aspectsGravatar vladmos2017-07-07
| | | | | | | | If --incompatible_descriptive_string_representations is passed, aspects are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, without leaking information that shouldn't be accessible). PiperOrigin-RevId: 161116840
* Clean up string representations for functionsGravatar vladmos2017-07-07
| | | | | | | | | If --incompatible_descriptive_string_representations is passed, functions and rule classes are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, without leaking information that shouldn't be accessible). PiperOrigin-RevId: 161087777
* Remove the ToolchainConstructor class and change uses to be either aGravatar John Cater2017-07-06
| | | | | | | | | Label or a ToolchainInfo provider. Part of #2219. Change-Id: Ia09070717f54eea10e1ab0303253714b58768548 PiperOrigin-RevId: 160995546
* Clean up string representations for labelsGravatar vladmos2017-07-05
| | | | | | | | | | | If --incompatible_descriptive_string_representations is passed, labels are converted to strings using `repr` differently: `Label("//package:name")` instead of `"//package:name"` This CL doesn't affect representations of other object types but provides the necessary infrastructure for it. PiperOrigin-RevId: 160955284
* Allow strings as default values of labelsGravatar vladmos2017-07-05
| | | | | | | Strings now can be passed to the default parameter of attr.label, attr.label_list, and attr.label_keyed_string_dict. PiperOrigin-RevId: 160896987
* Cleanup for Java 8Gravatar laurentlb2017-07-05
| | | | PiperOrigin-RevId: 160832316
* Introduce --incompatible_new_actions_api flag.Gravatar dslomov2017-07-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 160831413
* Implement ctx.actions.expand_template.Gravatar dslomov2017-07-05
| | | | | | | | It also changes the return value of ctx.template_action to None, so a very minor breaking change. There are no internal usages at least. RELNOTES: None. PiperOrigin-RevId: 160825636
* More tests for ctx.actions.run/run_shellGravatar dslomov2017-07-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 160819807
* Migrate tests to ctx.actions.run/run_shell.Gravatar dslomov2017-07-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 160817326
* Introduce ctx.actions.write in place of ctx.file_action.Gravatar dslomov2017-06-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 160630261
* Implement ctx.actions.do_nothing instead of ctx.empty_actionGravatar dslomov2017-06-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 160621674
* Tests + cleanup + docs for ctx.actions.declare_{file,directory}Gravatar dslomov2017-06-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 160273273
* Add 'ctx.actions.declare_directory'Gravatar dslomov2017-06-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 160267763
* Add 'ctx.actions' and implement 'ctx.action.declare_file'.Gravatar dslomov2017-06-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 160264501
* Update testSpecialMandatoryProviderMissing to cover more casesGravatar vladmos2017-06-22
| | | | | | | | | The test didn't check for rules from the //external virtual package, that caused Bazel to be broken at some point: https://stackoverflow.com/questions/44398080/cc-grpc-library-for-bazel-0-5-1-fails-due-to-mandatory-files-to-run-provider-m/44671719 The original problem has been fixed in https://github.com/bazelbuild/bazel/commit/211a3ba2303c1df97383c810e17a031106c7271b. PiperOrigin-RevId: 159703445
* Rule functions should return None instead of internal Rule objectsGravatar vladmos2017-06-20
| | | | PiperOrigin-RevId: 159438112
* ctx.empty_action now allows depset as inputsGravatar laurentlb2017-06-16
| | | | | RELNOTES: None. PiperOrigin-RevId: 158977418
* ctx.action now allows depset as inputsGravatar laurentlb2017-06-14
| | | | | RELNOTES: None. PiperOrigin-RevId: 158973112
* Remove all imports of org.junit.Assert except for static imports of #fail().Gravatar lberki2017-06-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 157685150
* Make SelectorList.toString() user-friendly.Gravatar gregce2017-06-01
| | | | | | | | This also guarantees consistency between toString() calls to lib.syntax.SelectorList and lib.packages.BuildType.SelectorList. PiperOrigin-RevId: 157617509
* Fix aliases for users of label-keyed string dicts.Gravatar mstaib2017-06-01
| | | | | | | | | | | | | | | | | Aliases mess with the assumption that attributeValue.containsKey(target.getLabel()) for every target in the prerequisites of a LABEL_KEYED_STRING_DICT attribute. The solution is to use AliasProvider.getDependencyLabel(target) instead. This fixes it for all current users, including SkylarkRuleContext. This also adjusts config_setting flag_values and Android feature_flags to do intelligent things with aliases in their respective attributes. RELNOTES: None. PiperOrigin-RevId: 157594095
* Migrate Java tests to Truth.Gravatar lberki2017-05-30
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157446717
* Automated g4 rollback of commit c4134802dd15d6ef5cca6521f6bf6aac395ee2ad.Gravatar kchodorow2017-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Roll forward of directory name change *** Original change description *** Automated g4 rollback of commit 1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b. *** Reason for rollback *** Breaks //src/test/shell/integration:force_delete_output_test *** Original change description *** Symlink output directories to the correct directory name If the workspace directory is /path/to/my/proj and the name in the WORKSPACE file is "floop", this will symlink the output directories to output_base/execroot/floop instead of output_base/execroot/proj. More prep for #1262, fixes #1681. PiperOrigin-RevId: 156892980
* Fixes incorrectly-ordered arguments to calls to assertEqualsGravatar Googler2017-05-19
| | | | | | | | | | | | | | | [] This change has been automatically generated by an Error Prone check that detects incorrect argument ordering on calls to assertEquals-style methods. See [] Cleanup change automatically generated by javacflume/refactory Refactoring: third_party/java_src/error_prone/project/core/src/main/java/com/google/errorprone/bugpatterns/argumentselectiondefects:AssertEqualsArgumentOrderChecker_refactoring Tested: TAP --sample for global presubmit queue [] PiperOrigin-RevId: 156539781
* Add toolchains data to RuleClass and RuleContext.Gravatar John Cater2017-05-19
| | | | | | | | Also expose both sides to Skylark. Part of #2219. Change-Id: I4d749dd9981fe33f75310acb0ec3927cff6f28fe PiperOrigin-RevId: 156340638
* Do not access SkylarkProviders anywhere outside of ConfiguredTarget ↵Gravatar dslomov2017-05-16
| | | | | | | | | | | implementation. A first step towards applying the same memory optimizations we do for native provider representation to Skylark providers (declared and legacy). RELNOTES: None. PiperOrigin-RevId: 156111749
* Optimize TransitiveInfoMap memory consumption.Gravatar Googler2017-05-09
| | | | | | Instead of using ImmutableMap, we share the keys between all provider maps with an identical key set. PiperOrigin-RevId: 155432135
* Do not report errors when aspects try to attach to files.Gravatar dslomov2017-05-08
| | | | | | | | | | | Instead, silently ignore them in the same way we do for rules to which aspects are not applicable. In the future aspects will gain the ability to apply to, and propagate through, files. RELNOTES: None. PiperOrigin-RevId: 155369925
* Make SkyKey an interface, and start the migration of not creating SkyKey ↵Gravatar janakr2017-05-04
| | | | | | wrapper objects: for OwnedArtifacts, which are the most numerous during builds, and for Labels for TransitiveTraversalValues, which are the most numerous during queries. PiperOrigin-RevId: 154989520
* Do not put OutputGroupProvider into SkylarkProviders.Gravatar dslomov2017-05-03
| | | | | | | | | Almost every target has an OutputGroupProvider. Putting an ("output_groups", value) pair into SkylarkProviders creates an unneccessary map. This CL removes it. RELNOTES: None. PiperOrigin-RevId: 154940624
* Implement OutputGroupInfo provider.Gravatar dslomov2017-05-03
| | | | | | | Work towards #2894. RELNOTES: None. PiperOrigin-RevId: 154829065
* Fix tests to create WORKSPACE files for local repositories.Gravatar John Cater2017-04-24
| | | | | | | Part of #2841. Change-Id: I4d1e63aac6b5ed6beb9854b9b67d2899d8da4418 PiperOrigin-RevId: 153705466
* Rewrite repository lookup to return a failed value rather than throwGravatar ulfjack2017-04-20
| | | | | | | | | | | | | | | | | | | | | | | We need to lookup repositories as part of converting exec paths to artifacts, which in turn is needed for action cache lookups. These lookups should not cause a Skyframe exit, so we must not throw an exception here, unless the error makes it impossible to continue. Instead, we need to leave the decision whether to error out or not to the caller. Note that we may unnecessarily fetch a remote repository in order to do the action cache lookup, even if the action no longer depends on the input file, although this should only be possible for C++ compile actions. It's possible that there's another bug in the C++ compile action key computation that also contributes. This change also makes it so that the post-resolution action cache code ignores any errors wrt. repository lookup rather than throwing. If any of the paths could not be found, then the action cache lookup fails and we re-execute the corresponding action, which is exactly what should happen. Fixes #2759. PiperOrigin-RevId: 153696243
* Fix `in` operator for targetsGravatar vladmos2017-04-18
| | | | | | `DefaultInfo in target` should always return `true` for any target. PiperOrigin-RevId: 153166669
* Used 'DefaultInfo' instead of `ctx.default_provider`.Gravatar dslomov2017-04-12
| | | | | | | This follows our CamelCaseInfo naming conventions for providers. RELNOTES: None. PiperOrigin-RevId: 152832215
* Implement default providerGravatar vladmos2017-04-11
| | | | | | | Default providers can now be used not only to return standard providers values from a rule implementation function, but also to access these values provided by other rules. PiperOrigin-RevId: 152797193
* Better error messages for non-exported values.Gravatar dslomov2017-04-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 152793682
* Aspect propagation should not lose transitively-visible aspects.Gravatar dslomov2017-04-11
| | | | | | | | If aspect a3 sees aspect a2, and aspect a2 sees aspect a1, propagation of the aspect list [a1,a2,a3] should not lose any aspects. RELNOTES: None. PiperOrigin-RevId: 152786900
* Automated g4 rollback of commit 1d9e1ac90197b1d3d7b137ba3c1ada67bb9ba31b.Gravatar hlopko2017-04-04
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks //src/test/shell/integration:force_delete_output_test *** Original change description *** Symlink output directories to the correct directory name If the workspace directory is /path/to/my/proj and the name in the WORKSPACE file is "floop", this will symlink the output directories to output_base/execroot/floop instead of output_base/execroot/proj. More prep for #1262, fixes #1681. PiperOrigin-RevId: 152126545
* Add ctx.experimental_new_directory (undocumented) to create tree artifacts ↵Gravatar allevato2017-03-31
| | | | | | | | in Skylark. RELNOTES: None. PiperOrigin-RevId: 151744710
* Symlink output directories to the correct directory nameGravatar kchodorow2017-03-31
| | | | | | | | | | If the workspace directory is /path/to/my/proj and the name in the WORKSPACE file is "floop", this will symlink the output directories to output_base/execroot/floop instead of output_base/execroot/proj. More prep for #1262, fixes #1681. PiperOrigin-RevId: 151712384
* Resolve special provider names when checking for mandatory providersGravatar vladmos2017-03-29
| | | | | | | | | | If a rule requires a special provider that's (maybe) not provided explicitly but nevertheless available from a target, i.e. "files", the mandatory providers check should pass. Fixes #1490 PiperOrigin-RevId: 151571187
* Change print(artifact) to return "File" instead of "Artifact"Gravatar vladmos2017-03-29
| | | | | | | | | RELNOTES[INC]: Converting artifacts to strings and printing them now return "File" instead of "Artifact" to be consistent with the type name. Fixes #2715 PiperOrigin-RevId: 151563252
* Stop returning JavaSourceJarsProvider from java_libraryGravatar elenairina2017-03-29
| | | | | | since it's already returned via JavaProvider. PiperOrigin-RevId: 151550286
* Remove provider safety check and make all old ctx objects featurelessGravatar Vladimir Moskva2017-03-23
| | | | | | | | | | | | It's now allowed to return anything from a rule implementation function. If a ctx object is returned it becomes featureless and cannot be used from anywhere else (i.e. from an implementation function of another rule). Fixes #2319 -- PiperOrigin-RevId: 151015919 MOS_MIGRATED_REVID=151015919