aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/analysis
Commit message (Collapse)AuthorAge
* Migrate Java tests to Truth.Gravatar lberki2017-05-30
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157446717
* Migrate tests to Truth.Gravatar lberki2017-05-29
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157378037
* Make platform providers creatable from Skylark.Gravatar John Cater2017-05-26
| | | | | | | This will allow custom rules to interact more fully with the platform system. Change-Id: I22dd2efab55b1c6e6129b1ba99fb5f0aa9c2d6b2 PiperOrigin-RevId: 157145828
* Use nested sets for configured target runfiles instead of flattened lists.Gravatar Googler2017-05-26
| | | | | RELNOTES: None PiperOrigin-RevId: 157124371
* 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
* Add a #hashCode() method to WorkspaceStatusAction implementations as is ↵Gravatar lberki2017-05-23
| | | | | | | | | | | advisable when overriding #equals(). Intricacies within Skyframe prevented us from adding this method before, but whatever those were are not a problem anymore. This was empirically proven by making the change, looking at the set of tests that failed when I last tried this, then finding that they don't fail. The reason for the original failures will stay obscured by the mists of time forever. RELNOTES: None. PiperOrigin-RevId: 156835875
* Fix aspect processing when same dep appears in 2 attributes.Gravatar kaipi2017-05-22
| | | | | | If a target appeared in 2 different attributes, it is not processed twice, even if different aspects were applied to the different attributes. In that case, only one of the aspects is applied. This commit fixes this by checking which aspects have been applied to the target, instead of checking if the target was already processed. PiperOrigin-RevId: 156738275
* PiperOrigin-RevId: 156331430Gravatar nharmata2017-05-19
|
* Adds ToolchainConstructor interface and implementations.Gravatar John Cater2017-05-19
| | | | | | | | | | ToolchainConstructor is used to create instances of ToolchainInfo, for toolchain-aware rule sets. Part of #2219. Change-Id: Iae4e519b156910cc28704b3ca5b11e57dd561107 PiperOrigin-RevId: 156303854
* Automated g4 rollback of commit b71e99b1f3746103e5d6802eebc24096b3494959.Gravatar mstaib2017-05-17
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Causes crash bug in certain circumstances. *** Original change description *** Implement dynamically configured LIPO builds. Quick overview: - provide a dynamic interface for getting the artifact owner configuration - provide a (dynamic) RuleTransitionFactory LIPO_ON_DEMAND to replace the (static) RuleClass.Configurator LIPO_ON_DEMAND. Eventually we'll remove the rule class configurator interface entirely. This doesn't actually turn dynamic LIPO on. So the direct effect of this change should be a no-op. The flip will come in a followup change. For now, dynamic... PiperOrigin-RevId: 156180015
* 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
* Remove methods from CommandLine, making it a simple argument list interface.Gravatar Googler2017-05-15
| | | | | | | * isShellCommand is now passed directly to SpawnAction * Getting the associated params file action was a test-only thing. We can pull this out of the action graph instead. PiperOrigin-RevId: 156060366
* Automated g4 rollback of commit 6879d7ceff0e118fdecb0cabe5134979030b7cb8.Gravatar Googler2017-05-11
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixes memory issue that caused this CL to be rolled back. *** Original change description *** Automated g4 rollback of commit cbbb423663b154d82e3dfa5e9a56839583987999. *** Reason for rollback *** Need to roll this back as part of http://b/38171368 *** Original change description *** RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to use select statements. PiperOrigin-RevId: 155651879
* Automated g4 rollback of commit cbbb423663b154d82e3dfa5e9a56839583987999.Gravatar Googler2017-05-10
| | | | | | | | | | | *** Reason for rollback *** Need to roll this back as part of http://b/38171368 *** Original change description *** RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to use select statements. PiperOrigin-RevId: 155547813
* RELNOTES: Effectively remove sysroot from CppConfiguration and allow it to ↵Gravatar Googler2017-05-09
| | | | | | use select statements. PiperOrigin-RevId: 155480011
* 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
* Add missing hashCode() methodGravatar cushon2017-05-09
| | | | PiperOrigin-RevId: 155429568
* Add dynamic config support for top-level configuration hooks.Gravatar gregce2017-05-05
| | | | PiperOrigin-RevId: 155223580
* Automated g4 rollback of commit 9dec9a09d1e4d27e7cff73c440195a32d3b90752.Gravatar plf2017-05-05
| | | | PiperOrigin-RevId: 155194438
* Implement dynamically configured LIPO builds.Gravatar gregce2017-05-04
| | | | | | | | | | | | | | | Quick overview: - provide a dynamic interface for getting the artifact owner configuration - provide a (dynamic) RuleTransitionFactory LIPO_ON_DEMAND to replace the (static) RuleClass.Configurator LIPO_ON_DEMAND. Eventually we'll remove the rule class configurator interface entirely. This doesn't actually turn dynamic LIPO on. So the direct effect of this change should be a no-op. The flip will come in a followup change. For now, dynamic LIPO can be triggered with --experimental_dynamic_configs=notrim. PiperOrigin-RevId: 155096056
* Introduce BazelPackageLoader.Gravatar nharmata2017-05-04
| | | | | | | | | This is a standalone library for loading packages. It is intended to be used by clients outside of Bazel (for now, Kythe). Perform BazelPackageLoader#loadPackage in the testing hook used in all of Bazel's unit tests and integration tests. This gives us very good test coverage for BazelPackageLoader. RELNOTES: None PiperOrigin-RevId: 155004070
* BuildOptions cleanup:Gravatar gregce2017-05-04
| | | | | | | | | | | | | | | | | | | | | 1) Remove obsolete originalOptions field. This was originally added to support "parent" transitions, which supported config1 -> config2 -> config1 transitions by having config2 store config1's options. The purpose of this feature was to support LIPO (which has a DATA -> TARGET transition). But https://github.com/bazelbuild/bazel/commit/ff29c0b39cf936a2699b05edd54f483f1a037d93 makes this unnecessary. 2) Support the "disable actions" feature of the LIPO context collector configuration. Putting this in BuildOptions make this dynamic config-compatible. This change intentionally doesn't add disableOptions to BuildOptions.equals() or BuildOptions.hashCode(). It'd be great to do that. But that has semantic consequences. And we've run into really tricky bugs in the past with dynamic configurations and BuildOptions.equals / BuildConfiguration.equals. So it's best to experiment with that in its own change. PiperOrigin-RevId: 154999718
* Don't let latebound split attributes leave the host configuration.Gravatar gregce2017-05-04
| | | | | | | This fixes a bug that put them out of sync from how all other attributes manage the host configuration. PiperOrigin-RevId: 154992583
* Implement OutputGroupInfo provider.Gravatar dslomov2017-05-03
| | | | | | | Work towards #2894. RELNOTES: None. PiperOrigin-RevId: 154829065
* Move platform providers to a new package to break cyclic dependencies.Gravatar John Cater2017-05-02
| | | | | | | Part of #2219. Change-Id: I87c7bc9fbfb38d3dbdf193b46247901d0f2a838d PiperOrigin-RevId: 154719063
* Make Skylark interpreter read Skylark command-line flagsGravatar brandjon2017-04-30
| | | | | | | | | | | This is the second of two CLs for making command line options able to affect the Skylark interpreter. For the main kinds of evaluation contexts -- package loading, .bzl loading, rule analysis, aspect analysis, and computed defaults -- the SkylarkSemanticsOptions object is retrieved from Skyframe and passed along to the Environment builder. For other contexts such as tests, default values of builtin functions, and standalone Skylark, flags are currently not processed. In the future, we may want to split into separate files the options that affect "pure" Skylark vs the options that affect Bazel-flavored Skylark. One possibility is to subclass SkylarkSemanticsOptions into SkylarkBazelSemanticsOptions, and go through an indirection in SkylarkUtils. We could also pass SkylarkSemanticsOptions to the parser, to support --incompatible_* changes that alter Skylark's syntax. I don't think that's needed at the moment. RELNOTES: None PiperOrigin-RevId: 154628391
* Store Skylark command-line flags in SkyframeGravatar brandjon2017-04-28
| | | | | | | | | This is the first of two CLs for making command line options able to affect the Skylark interpreter. It introduces SkylarkSemanticsOptions, and stores it as a precomputed (injected) value in Skyframe. The next CL will read these options from Skyframe when constructing the Skylark environment. This CL affects the dataflow from command/test initialization to Skyframe. Some code paths, like those used for testing, use the default SkylarkSemanticsOptions and therefore won't be able to use (for example) --incompatible_* flags. The call sites to update were found by searching for uses of defaultVisibility and working upward from there. RELNOTES: None PiperOrigin-RevId: 154432058
* Refactor ActionTester to pass BitSet to factoriesGravatar hlopko2017-04-26
| | | | | | | | | When discussing readability review for unknown commit we realized that ActionTester api is not super readable and we could improve it using BitSet. This cl does just that. RELNOTES: None. PiperOrigin-RevId: 154289241
* Remove AppleCrosstoolSplitTransition.Gravatar cpeyser2017-04-26
| | | | PiperOrigin-RevId: 154232604
* Native aspects can opt-in to apply to files.Gravatar dslomov2017-04-25
| | | | | | | Only works for top-level targets. RELNOTES: None. PiperOrigin-RevId: 154176914
* Fix tests to create WORKSPACE files for local repositories.Gravatar John Cater2017-04-24
| | | | | | | Part of #2841. Change-Id: I4d1e63aac6b5ed6beb9854b9b67d2899d8da4418 PiperOrigin-RevId: 153705466
* Add repository override optionGravatar kchodorow2017-04-20
| | | | | | | | | | | RELNOTES: Adds a --override_repository option that takes a repository name and path. This forces Bazel to use the directory at that path for the repository. Example usage: `--override_repository=foo=/home/user/gitroot/foo`. Fixes #1266 PiperOrigin-RevId: 153599291
* Fix crash on graph cycle in configuration loadingGravatar gregce2017-04-19
| | | | PiperOrigin-RevId: 153473961
* Split out option usage restriction from option category.Gravatar ccalvarin2017-04-18
| | | | | | | | | These are two different concepts. Do not remove category overload compatibility in this CL, to keep this change limited to converting the current uses of category. With some flyby formatting fixes on affected OptionsBases. RELNOTES: None. PiperOrigin-RevId: 153390002
* Remove the overloading of option category to cover documentation level.Gravatar ccalvarin2017-04-18
| | | | | | | | This prevents having to parse the category, and allows the category to potentially be used in the future for information about all options, included undocumented, hidden, or internal options. Also rename DocumentationLevel to OptionUsageRestrictions, since INTERNAL was not really documentation related. PiperOrigin-RevId: 153367769
* Expose Bazel's Android data binding support to users.Gravatar gregce2017-04-18
| | | | | | | | | | | | The logic is already in Bazel but wasn't available to build rules. This change makes it available, but still requires data binding's {build|run}time libraries to be checked into appropriate depot spots for everything to work. Followup changes will make those libraries easily available. Issue: #2694 PiperOrigin-RevId: 153359861
* Automated g4 rollback of commit 045104899738594d85f9ab9b0b9ccbde320b8055.Gravatar jfield2017-04-18
| | | | | | | | | | | | | *** Reason for rollback *** Breaks internal tests that use nonstandard crosstools *** Original change description *** Make C++ archiving use action_configs instead of hardcoded flags RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag. PiperOrigin-RevId: 153344597
* Make C++ archiving use action_configs instead of hardcoded flagsGravatar hlopko2017-04-13
| | | | | RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag. PiperOrigin-RevId: 153046587
* Do not add a build id to C++ binaries by default.Gravatar lberki2017-04-13
| | | | | | | Fixes #2805. RELNOTES: None. PiperOrigin-RevId: 153039178
* Delete Preprocessor.Factory.SupplierGravatar laurentlb2017-04-12
| | | | | RELNOTES: None. PiperOrigin-RevId: 152882585
* Remove remnants of apkbuilder from Android tests.Gravatar ajmichael2017-04-11
| | | | | | | They are unused now that --use_singlejar_apkbuilder is the default. RELNOTES: None PiperOrigin-RevId: 152746425
* Open source tests for android_device.Gravatar ajmichael2017-04-10
| | | | | RELNOTES: None PiperOrigin-RevId: 152561328
* Open source LocalSpawnRunnerGravatar ulfjack2017-04-07
| | | | | | | | | The LocalSpawnRunner is a non-sandboxed local execution implementation, which will replace the current StandaloneSpawnStrategy. The code has been around for a long time and has seen a lot of bugfixes. It also supports local prefetching, which is required for Google. I have a follow-up change to make it support Windows, so it's not a drop-in replacement for StandaloneSpawnStrategy yet. PiperOrigin-RevId: 152486973
* Move the chmod call from SkyframeActionExecutor to ActionMetadataHandlerGravatar ulfjack2017-04-07
| | | | | | | | | | | | | | | | | | | This relies on the explicit state transition in MetadataHandler to decide whether the chmod call is necessary (we must never call chmod if the action was not executed). This is a prerequisite for #1525. If we want to use ctime for detecting file content changes (which is more reliable than just mtime), then we must call chmod before stat, since chmod affects ctime. Before this change, we were caching the stat in ActionMetadataHandler, but calling chmod after action execution in SkyframeActionExecutor, which is the wrong order of calls. However, we must be able to stat in ActionMetadataHandler for cases where a single action runs multiple Spawns where one spawn's output is a subsequent spawn's input. Remove MetadataHandler.isInjected, which is no longer used anywhere. PiperOrigin-RevId: 152387133
* Move ConfigSetting into rules/config.Gravatar mstaib2017-04-06
| | | | | | | | | | | | | | | ConfigSetting was previously in analysis/config, where it was slightly out of place (as it is a rule, not an integral part of the analysis backend). This is also necessary to integrate it with ConfigFeatureFlag, as otherwise this would be a circular dependency (analysis/config <-> rules/config). ConfigFeatureFlagRule itself has been moved into ConfigRuleClasses, where it can use the ConfigBaseRule and the nonconfigurable reason from the other configuration rules. RELNOTES: None. PiperOrigin-RevId: 152275823
* Generalize ConfigSetting's special options handling.Gravatar mstaib2017-04-05
| | | | | | | | | | | | | | | | Currently ConfigSetting is treated specially; TransitiveTargetFunction identifies it by name, then runs a special function on it. This change makes ConfigSetting use a new options reference function in RuleClass, which TransitiveTargetFunction will evaluate over the rule and use with the options-to-fragments map to figure out which fragments are needed. Although this is still a hack and not really a new feature on RuleClass, this avoids a dependency on ConfigSettingRule from TransitiveTargetFunction, which is necessary for ConfigSettingRule to be moved to rules/config. RELNOTES: None. PiperOrigin-RevId: 152156905
* Refactor all ctor callsites of PathFragment to instead call a static ↵Gravatar nharmata2017-04-05
| | | | | | | | | | | | 'create' method. This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment). This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations. RELNOTES: None PiperOrigin-RevId: 152145768
* Remove jack support and make jack/jill attributes of android_sdk optional.Gravatar ajmichael2017-04-04
| | | | | | | | | Closes https://github.com/bazelbuild/bazel/issues/1391. RELNOTES: Removed --experimental_use_jack_for_dexing and libname.jack output of android_library. PiperOrigin-RevId: 152131075
* 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
* Move BuildConfiguration option data access to a new class.Gravatar mstaib2017-04-03
| | | | | | | | | | | | | | | | | ConfigSetting is being moved to rules/config, and that means that it no longer has its special package-private access to BuildConfiguration. The solution: a new TransitiveOptionDetails class which cuts down on clutter in BuildConfiguration and is publicly accessible. However, we don't really want anyone accessing BuildConfiguration's TransitiveOptionsDetails - only config-related rules should ever need it. As a result, BuildConfigurationOptionDetails provides public access to BuildConfiguration's TransitiveOptionDetails, but is limited via Blaze visibility to only configuration rules. RELNOTES: None. PiperOrigin-RevId: 151828068