aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/analysis
Commit message (Collapse)AuthorAge
* Introduce Root class.Gravatar tomlu2018-01-17
| | | | | | | | | | | This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759
* Remove ConfigurationTransitionProxy.NULLGravatar gregce2018-01-16
| | | | PiperOrigin-RevId: 182099803
* Rename Root to ArtifactRoot.Gravatar tomlu2018-01-16
| | | | | | This is slightly more descriptive, and we will potentially want to use the name Root for a broader concept shared between ArtifactRoot and RootedPath. PiperOrigin-RevId: 182082367
* Remove use of Root#asDerivedRoot where the derived root == exec root.Gravatar tomlu2018-01-15
| | | | | | | | This method violates the invariant that derived roots are never equal to the exec root. Only source roots can be equal to the exec root. Note that this method was only used in tests, so this CL should be completely safe as long as its tests pass. PiperOrigin-RevId: 181998483
* windows,tests: enable some tests on WindowsGravatar Laszlo Csomor2018-01-15
| | | | | | | | | | | | Add ":windows_tests" and ":all_windows_tests" rules to these packages, and include them in the parent packages. Fixes https://github.com/bazelbuild/bazel/issues/4127 See https://github.com/bazelbuild/bazel/issues/4292 Change-Id: I9c454ed21f47feb8e88e1c25b1e4fa216baa38f6 PiperOrigin-RevId: 181951525
* Adds FileSystem check to Path.CODEC.serialize.Gravatar shahan2018-01-12
| | | | PiperOrigin-RevId: 181797078
* Convert ActionLookupKey implementations to directly implement SkyKey, ↵Gravatar janakr2018-01-11
| | | | | | removing the layer of indirection of getting SkyKey out of ActionLookupKey, which uses more memory for no reason. PiperOrigin-RevId: 181658615
* Fold the Jvm configuration fragment into JavaConfiguration.Gravatar lberki2018-01-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 181579365
* Remove the unused --[no]experimental_disable_jvm command line option.Gravatar lberki2018-01-11
| | | | | | RELNOTES: The --[no]experimental_disable_jvm command line option is not supported anymore. PiperOrigin-RevId: 181575259
* Codec for BuildConfigurationValue.Gravatar shahan2018-01-10
| | | | PiperOrigin-RevId: 181545835
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2018-01-10
| | | | | | | | This is a rollforward -- the previous attempt was rolled back due to incorrectly adding test sources. In addition, the newly checked in tests do not work on Windows, and are thus disabled on the Windows platform. I suspect this is due to a bug in the compile-testing library. RELNOTES: None. PiperOrigin-RevId: 181482589
* Adds a CODEC for CppConfiguration.Gravatar shahan2018-01-10
| | | | | | | * Creates an enum for cpu transformer, which is easier to serialize than an opaque function. This also means moving FakeCPU to avoid introducing a circular dependency. * Adds a CODEC to Path using InjectingObjectCodec. PiperOrigin-RevId: 181445911
* Remove package loading from JvmConfigurationLoader .Gravatar lberki2018-01-10
| | | | | | | | | | | | | This should not cause a user-visible change: --{host_,}javabase was already required to point to a java_runtime_suite / java_runtime rule, the only change is that we now enforce it differently. If anything, this makes Bazel more lenient in that it now accepts Skylark rules that provide JavaRuntimeInfo, but I doubt anyone does that, since it does not work at HEAD. RELNOTES: None. PiperOrigin-RevId: 181444563
* Remove code that used to support --javabase=<absolute path>.Gravatar lberki2018-01-08
| | | | | | | | | This is the first step in removing package loading from JvmConfigurationLoader (I didn't want to add the rest into this change because it's technically possible to access ctx.fragments.jvm even though it contains no fields, so removing that is an incompatible change) and it's also possible that removing error reporting from JvmConfigurationLoader causes some subtle changes in behavior. Baby steps. Now that the hard part is done, there is no need to rush. RELNOTES: None. PiperOrigin-RevId: 181143978
* Automated rollback of commit 9e63684a58025d98bfe2f180d56ba7ece69545ae.Gravatar juliexxia2018-01-05
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Roll forward of commit 86b4532769c22cca2ed7068a60f3326beaad34af after fixing bad import. +small misc fixes suggested by critique *** Original change description *** Automated rollback of commit 86b4532769c22cca2ed7068a60f3326beaad34af. *** Reason for rollback *** Probably breaking //javatests/com/google/devtools/build/lib:Query2Tests *** Original change description *** Restructure how universeScope is used when testing configured query to mimick impending changes to the configured query interface (CL/179872445) which will pull build targets out of the query expression. Fill in testTopLevelTransitions on the way! PiperOrigin-RevId: 180930388
* Automated rollback of commit 86b4532769c22cca2ed7068a60f3326beaad34af.Gravatar juliexxia2018-01-04
| | | | | | | | | | | | | | *** Reason for rollback *** Probably breaking //javatests/com/google/devtools/build/lib:Query2Tests *** Original change description *** Restructure how universeScope is used when testing configured query to mimick impending changes to the configured query interface (CL/179872445) which will pull build targets out of the query expression. Fill in testTopLevelTransitions on the way! PiperOrigin-RevId: 180880350
* Restructure how universeScope is used when testing configured query to ↵Gravatar juliexxia2018-01-04
| | | | | | | | mimick impending changes to the configured query interface (CL/179872445) which will pull build targets out of the query expression. Fill in testTopLevelTransitions on the way! PiperOrigin-RevId: 180854150
* Move PatchTransition and kin to analysis.config.transitions.Gravatar gregce2018-01-04
| | | | | | | HostTransition can't be migrated yet because it depends on BuildConfiguration. PiperOrigin-RevId: 180842784
* Automated rollback of commit 46356dfa59428b665aa280ba4cbca6e449f73c5b.Gravatar laszlocsomor2018-01-02
| | | | | | | | | | | | | *** Reason for rollback *** causes github #4375 and #4373 *** Original change description *** Use an annotation preprocessor to validate SkylarkConfigurationField. RELNOTES: None. PiperOrigin-RevId: 180535458
* 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
* Replace Attribute.SplitTransition with config.transitions.SplitTransition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179948322
* Replace Attribute.Transition with config.transitions.Transition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179936355
* Remove final accessors of ConfigurationTransition.HOST.Gravatar gregce2017-12-21
| | | | | | | Also lean interfaces from Attribute.ConfigurationTransition to Attribute.Transition. PiperOrigin-RevId: 179846158
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179845261
* Consolidate instances of the --loading_phase_threads flag.Gravatar juliexxia2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179838936
* Change cfg(HOST) to cfg(HostTransition.INSTANCE).Gravatar gregce2017-12-21
| | | | | | Preparatory step for removing ConfigurationTransition.HOST. PiperOrigin-RevId: 179838374
* Remove ConfigurationTransition.HOST references from lib.packages.Gravatar gregce2017-12-20
| | | | | | | | | | | | | | | | | | | | This removes the main barrier to making host transitions routine patch transitions. Today you signify a host transition by calling Attribute.Builder.cfg(ConfigurationTransition.HOST). Blaze's configuration machinery auto-converts this to HostTransition.INSTANCE, which is a patch transition. This change provides the groundwork for removing ConfigurationTransition.HOST and removing the special conversion logic. This also paves the way for better API support for multiple host configurations. Also change some cfg(HOST) rule references to cfg(HostTransition.INSTANCE). PiperOrigin-RevId: 179754619
* Get rid of LabelAndConfiguration class: ConfiguredTargetKey contains the ↵Gravatar janakr2017-12-20
| | | | | | same information and is more useful, since it's practically a SkyKey. PiperOrigin-RevId: 179727105
* Remove references to some internal tooling.Gravatar ajmichael2017-12-20
| | | | | RELNOTES: None PiperOrigin-RevId: 179722149
* Automated rollback of commit 2f10da0db062e023b1f0f8222f8545467b29ae4e.Gravatar schmitt2017-12-19
| | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks skylark rules using $ in action cmd line. *** Original change description *** Change CommandHelper to use TemplateExpander directly This is a partial rollback of https://github.com/bazelbuild/bazel/commit/e8d32b7c922f65539b74357711d5ad6b70934115, only the CommandHelper change. Progress on #2475. PiperOrigin-RevId: 179607027
* Add local_ios toolchain to the MOCK_CROSSTOOLGravatar cparsons2017-12-19
| | | | | | | MOCK_CROSSTOOL already contained a definition for ios_x86_64 to "local_ios", but the definition of this toolchain was mistakenly omitted. RELNOTES: None. PiperOrigin-RevId: 179590135
* Ensure that the target package in the <instrumentation> tag of the ↵Gravatar jingwen2017-12-19
| | | | | | | | | | | | instrumentation android_binary's AndroidManifest.xml references the correct package name of the instrumented android_binary. During an instrumentation test, ART will use the targetPackage specified in the instrumentation APK's AndroidManifest to determine the application to be instrumented. We can perform this check in Bazel at execution time, before the apps are loaded onto the device. See android_instrumentation_test_integration_test.sh for the e2e example. GITHUB: https://github.com/bazelbuild/bazel/issues/903 RELNOTES: None. PiperOrigin-RevId: 179564246
* Automated rollback of commit 82e68b75304438c96ff878a0c2b8d18b42002486.Gravatar aehlig2017-12-19
| | | | | | | | | | | | | | Fixes #4322, #4306. *** Reason for rollback *** Introduces a deadlock (see https://github.com/bazelbuild/bazel/issues/4322) *** Original change description *** Make FileSystem operate on LocalPath instead of Path. PiperOrigin-RevId: 179549866
* Consolidate instances of the --keep_going flag.Gravatar juliexxia2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179468685
* Change CommandHelper to use TemplateExpander directlyGravatar ulfjack2017-12-18
| | | | | | | | This is a partial rollback of https://github.com/bazelbuild/bazel/commit/e8d32b7c922f65539b74357711d5ad6b70934115, only the CommandHelper change. Progress on #2475. PiperOrigin-RevId: 179413908
* Make FileSystem operate on LocalPath instead of Path.Gravatar tomlu2017-12-14
| | | | PiperOrigin-RevId: 179082062
* Rename OutputGroupProvider -> OutputGroupInfo.Gravatar dslomov2017-12-14
| | | | | RELNOTES: None PiperOrigin-RevId: 179046403
* Implement --(no)expand_test_suites flag.Gravatar dslomov2017-12-13
| | | | | | | | | --noexpand_test_suites flag will suppress expansion of test_suite targets into constituent tests, so that command-line aspects can analyze test_suite targets. RELNOTES: Added --(no)expand_test_suites flag. PiperOrigin-RevId: 178892829
* Add --implicit_deps custom filtering to configuredtargetqueryenvironment.Gravatar juliexxia2017-12-08
| | | | | | This implementation requires adding an interned list of LabelAndConfiguration objects to each RuleConfiguredTarget ('implicit' is an attribute describer, not a dep describer so filtering needs to happen while attribute information still exists). PiperOrigin-RevId: 178411882
* Add tests for circular target dependencies resolved by configuration.Gravatar mstaib2017-12-07
| | | | | | | | | | | | | | | | | It's possible for a change in the configuration to result in multiple visits to a particular target, but as long as each visit has a unique configuration (relative to other visits to that target) and the cycle is eventually broken (i.e., one of the targets in the cycle does not depend on the next target in the cycle if the configuration satisfies some property), this is perfectly buildable. Or, in other words, it's okay to have a cycle in the target graph as long as it is not also a cycle in the _configured_ target graph. This test is to confirm this property. RELNOTES: None. PiperOrigin-RevId: 178303838
* Depend on //tools/jdk:host_jdk for the host javabase instead of the default JDK.Gravatar lberki2017-12-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 178074510
* Automated rollback of commit d0f06a6e4b61adc39bf5e1cfbae39501a89dc8e3.Gravatar nharmata2017-12-05
| | | | | RELNOTES: None PiperOrigin-RevId: 177965330
* Set default value of incompatible_load_argument_is_label to true.Gravatar laurentlb2017-12-04
| | | | | | | RELNOTES: First argument of 'load' must be a label. Path syntax is removed. (label should start with '//' or ':'). PiperOrigin-RevId: 177802628
* Fix missing print statements in output functionsGravatar vladmos2017-12-02
| | | | PiperOrigin-RevId: 177708823
* Do not filter debug messagesGravatar vladmos2017-11-30
| | | | | | | Debug messages (generated with Skylark's `print` function) used to be filtered out by the output filter: if such messages are generated during the analysis phase in a package different to the target package (e.g. if a user builds //foo:foo and the message is generated in a dependency //bar:bar), the message are not shown by default, which makes an erroneous impression that the code for //bar:bar hasn't been executed at all and interferes with debugging. Now the output filter doesn't affect debug messages at all. RELNOTES: Debug messages generated by `print()` are not being filtered out by --output_filter anymore, it's recommended not to use them in production code. PiperOrigin-RevId: 177431255
* Add ActionKeyContext to Action#getKey.Gravatar tomlu2017-11-29
| | | | | | | This key context can be used by actions to share partial key computations, for instance when computing MD5s for nested sets. RELNOTES: None PiperOrigin-RevId: 177359607
* MockRule-ify some more tests.Gravatar gregce2017-11-29
| | | | PiperOrigin-RevId: 177339358
* Remove the concept of a mandatory input which is allowed to be missing.Gravatar Googler2017-11-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 177332323
* Convert TestAspects to MockRule.Gravatar gregce2017-11-29
| | | | | | It'd be nice to go further and break out a bunch of this code into more generally useful places (especially for callers that don't care about aspects). But that's a big mess and beyond the scope of what I'm aiming for here. PiperOrigin-RevId: 177307854
* MockRule enhancements.Gravatar gregce2017-11-29
| | | | | | | | - Support custom ancestors and rule implementations. - Refactor defaults into MockRuleDefaults. - More thorough documentation. PiperOrigin-RevId: 177303642