aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/rules
Commit message (Collapse)AuthorAge
* Init absent action configs for CppCompile actionsGravatar hlopko2017-04-27
| | | | | | | | | | So far only link actions were initialized in CppLinkActionConfigs. This cl changes this class to also initialize CppCompile actions. This is needed for our ongoing work removing hard-coded flags from Bazel and moving them into Crosstool. RELNOTES: None. PiperOrigin-RevId: 154397672
* Automated g4 rollback of commit d5ee3b5397135eebd4b5d5b6bd4a4444093c4df8.Gravatar kchodorow2017-04-26
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** The go rules have tons of transitive dependencies that are not declared in their "local" WORKSPACE files, so this broke lots of projects on ci.bazel.build I'll fix up the go rules, update all of _their_ reverse-dep projects, and resubmit. *** Original change description *** Repositories can only be accessed in projects that define them in their WORKSPACE file This is prep for #1943 - hierarchical workspace loading. RELNOTES[INC]: Remote repositories must define any remote repositories they themselves use (e.g., if @x//:foo depends on @y//:bar, @y must be defined in @x's WORKSPACE file). PiperOrigin-RevId: 154321845
* Automated g4 rollback of commit bcd23553f38f54fd4846aa507c827a4ee40cfab4.Gravatar ajmichael2017-04-26
| | | | | | | *** Reason for rollback *** RELNOTES: None PiperOrigin-RevId: 154315543
* Repositories can only be accessed in projects that define them in their ↵Gravatar kchodorow2017-04-26
| | | | | | | | | | | | WORKSPACE file This is prep for #1943 - hierarchical workspace loading. RELNOTES[INC]: Remote repositories must define any remote repositories they themselves use (e.g., if @x//:foo depends on @y//:bar, @y must be defined in @x's WORKSPACE file). PiperOrigin-RevId: 154295762
* 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
* proto_library: Pass exec path to protoc. Fixes #2265Gravatar Jakob Buchgraber2017-04-26
| | | | | | | | When passing the paths of the proto files to protoc we need to use the exec path in order to also have correct paths for generated files. Change-Id: Id85b959829a0b159d30814314af631a90a4bd296 PiperOrigin-RevId: 154272610
* Add check to LocalRepositoryFunction that the path contains a WORKSPACEGravatar John Cater2017-04-25
| | | | | | | | | | | file. Fixes #2841. RELNOTES: Every local_repository now requires a WORKSPACE file. Change-Id: I11d50b852796b8f919b1a61c8c9b59cb78c5b724 PiperOrigin-RevId: 154179215
* Deprecate --experimental_android_use_singlejar_for_multidex.Gravatar ajmichael2017-04-25
| | | | | | | Also remove the $zip attribute of android_binary and android_test. RELNOTES: --experimental_android_use_singlejar_for_multidex is now a no-op and will eventually be removed. PiperOrigin-RevId: 154111305
* Add a undocumented way to define a platform that is autodetected fromGravatar John Cater2017-04-24
| | | | | | | | | the host. Also add a single instance of that platform for standard usage. Change-Id: I0e7a8eb3a44099076540c8d955fc0c0c70447583 PiperOrigin-RevId: 153878880
* Refactor PlatformInfo.Builder to detect and report invalid configurations.Gravatar John Cater2017-04-24
| | | | | Change-Id: Ib2bbd1b35985c4ec2d1e411aea4b32af7433a426 PiperOrigin-RevId: 153856560
* AutoValue and SkylarkClassObject interact badly, so remove that.Gravatar John Cater2017-04-24
| | | | | | | | | | | Because SkylarkClassObject declares equals, hashCode, and toString, AutoValue doesn't bother creating those, but since these classes didn't pass any data back to SkylarkClassObject, the defined methods don't work properly. This shows up as all instances of a class having the same hashCode and being equals() to each other. Change-Id: I50734f04369231cd2141dd368b04a3f0997a7d18 PiperOrigin-RevId: 153735995
* Fix tests to create WORKSPACE files for local repositories.Gravatar John Cater2017-04-24
| | | | | | | Part of #2841. Change-Id: I4d1e63aac6b5ed6beb9854b9b67d2899d8da4418 PiperOrigin-RevId: 153705466
* Prepare dynamic LIPO transitions.Gravatar gregce2017-04-20
| | | | | | | | Add a dynamic equivalent for LIPO_COLLECTOR transition. Rename LipoDataTransition (which handles DATA transition) to DisableLipoTransition. A future change will add a corresponding EnableLipoTransition (which will model TARGET_CONFIG_FOR_LIPO). PiperOrigin-RevId: 153611898
* 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
* RELNOTES: NoneGravatar ajmichael2017-04-19
| | | | PiperOrigin-RevId: 153545346
* 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
* Automated g4 rollback of commit e1d692e486a2f838c3c894fd9de693fabd6685ed.Gravatar schmitt2017-04-18
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** broken tests *** Original change description *** Init absent action configs for CppCompile actions So far only link actions were initialized in CppLinkActionConfigs. This cl changes this class to also initialize CppCompile actions. This is needed for our ongoing work removing hard-coded flags from Bazel and moving them into Crosstool. RELNOTES: None. PiperOrigin-RevId: 153366563
* 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 e7c730ba64d1c34ac7049f4165a33dc1329d0019.Gravatar jfield2017-04-18
| | | | | | | | | | | | | | | *** Reason for rollback *** breaks tests *** Original change description *** Extract --sysroot flag from bazel and move it into crosstool This is an encore of https://github.com/bazelbuild/bazel/commit/6127358c1799d8d83cebbd499edac89f869df41b . RELNOTES: None. PiperOrigin-RevId: 153351147
* 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
* Expose the native libs of the android_binary rule to skylark.Gravatar Googler2017-04-18
| | | | | RELNOTES: none PiperOrigin-RevId: 153223511
* In android_library targets, R.class files should not be runtime dependenciesGravatar Googler2017-04-18
| | | | | | | | | | | | | | | | | | android_binary targets have their own R.java files (built from merging dependencies and any resources that belong directly to the target). As such, they don't need inherited R.java files at runtime. Taking these out makes for smaller APKs and less inheritance from the target's dependencies. Add a flag to control this behavior. Have it default to continue to include R.class files as runtime dependencies so we can control rollout of this behavior. Add tests of android_binary to ensure the JAR is filtered out as appropriate, and of android_robolectrictest to ensure that those tests still have access to the JARs. RELNOTES: none PiperOrigin-RevId: 153177074
* 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
* Add feature_flags attribute to Android binary rules.Gravatar mstaib2017-04-13
| | | | | | | | | | | This is the first actual user of the config_feature_flag rule, able to actually set its value (and thus give a point to using it!) This feature is not fully launched yet, but it is usable in any build containing this change. RELNOTES: None. PiperOrigin-RevId: 152948153
* Extract --sysroot flag from bazel and move it into crosstoolGravatar hlopko2017-04-12
| | | | | | | This is an encore of https://github.com/bazelbuild/bazel/commit/6127358c1799d8d83cebbd499edac89f869df41b . RELNOTES: None. PiperOrigin-RevId: 152803621
* 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 AndroidBinaryMultidexTest.Gravatar ajmichael2017-04-11
| | | | | | | This includes tests for the feature in https://github.com/bazelbuild/bazel/issues/1936. RELNOTES: None PiperOrigin-RevId: 152734391
* Avoid copying existing immutable collectionsGravatar cushon2017-04-11
| | | | PiperOrigin-RevId: 152714468
* Do not wrap dynamic libraries with --whole-archive blockGravatar hlopko2017-04-10
| | | | | | | It doesn't make sense, and is ignored anyway. RELNOTES: None. PiperOrigin-RevId: 152667088
* Open source tests for android_device.Gravatar ajmichael2017-04-10
| | | | | RELNOTES: None PiperOrigin-RevId: 152561328
* Add flag_values attribute to config_setting.Gravatar mstaib2017-04-10
| | | | | | | | | | | | | This gives the ability to select on config_feature_flags. They still have not been publicly documented, because there's no way to set them. But, progress. config_setting still needs to have either values or flag_values; it cannot have both be empty. However, values is no longer mandatory, nor must it be nonempty (as long as flag_values is set nonempty). RELNOTES: None. PiperOrigin-RevId: 152515036
* Remove getAaptSupportsMainDexCreation from AndroidSdkProvider.Gravatar ajmichael2017-04-07
| | | | | | | All android_sdk rules are required to have the apksigner binary, which was not included in the build tools until version 24.0.3. So this check is no longer necessary. Instead, we check in AndroidSdkRepositoryFunction. RELNOTES: None PiperOrigin-RevId: 152498753
* Adding toolchain provider and function to Skylark.Gravatar John Cater2017-04-07
| | | | | Change-Id: Ied06efd4bc68f604975b1e8e3fc70817a577d563 PiperOrigin-RevId: 152412538
* Update incremental dexing helper flag defaultsGravatar kmb2017-04-06
| | | | | | RELNOTES: none PiperOrigin-RevId: 152340847
* Add missing @Test annotations to JUnit 4 tests, reduce the visibility of ↵Gravatar Googler2017-04-06
| | | | | | | | | | | | test helper methods to prevent them from being confused for tests, or add @Ignore to purposely disabled tests. This paves the way for unknown commit, which will cause Blaze to complain when methods that look like test methods are not annotated with @Test. For more details and FAQs please see:[] Tested: TAP --sample for global presubmit queue [] PiperOrigin-RevId: 152309039
* 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
* Expose platform-related providers to Skylark.Gravatar John Cater2017-04-06
| | | | | Change-Id: I7615d3e6e33e0c48f18b2506a135f45ce3705a38 PiperOrigin-RevId: 152256914
* 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
* Rename the ToolchainProvider to a more accurate name (and free up the name ↵Gravatar jcater2017-04-03
| | | | | | | | for the new ToolchainProvider). Change-Id: I3537e1ed924c598707759c4a7040d5ba00de559c PiperOrigin-RevId: 151853764
* Add flag to compress all Java resources before bundling them into the APK.Gravatar ajmichael2017-04-03
| | | | | | | RELNOTES: Add --experimental_android_compress_java_resources flag to store java resources as compressed inside the APK. PiperOrigin-RevId: 151825809
* Strict proto deps: handle direct protos in external repositories.Gravatar carmi2017-03-31
| | | | | | RELNOTES: None PiperOrigin-RevId: 151786403
* Build android_binary APKs with Singlejar by default.Gravatar ajmichael2017-03-31
| | | | | | | | | This will improve android_binary build times and allow Bazel to remove a dependency on our forked version of the deprecated ApkBuilderMain. RELNOTES: None PiperOrigin-RevId: 151749709
* Add the config_feature_flag rule.Gravatar mstaib2017-03-31
| | | | | | | | | | | | | | This rule allows users to define flags as part of the Bazel configuration. These flags will be select-able through a new attribute on config_setting, and settable through transitions within certain special rules. This rule is currently not supported by any other rules, not even config_setting, and its values cannot be set; accordingly, it's not very useful yet. RELNOTES: None. PiperOrigin-RevId: 151746523
* Automated g4 rollback of commit 05300b5945286f6063afbf1d16c9c8e5621c4828.Gravatar jmmv2017-03-31
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks inclusion of C++ system headers. *** Original change description *** Extract --sysroot flag from blaze and move it into crosstool RELNOTES: None. PiperOrigin-RevId: 151742077
* Move ResourceFilter into AndroidConfigurationGravatar Googler2017-03-31
| | | | | | | | | Once the ResourceFilter object is in AndroidConfiguration, we can start tweaking it using dynamic configuration (next review). RELNOTES: none PiperOrigin-RevId: 151737284
* Remove RuleContext from ResourceFilter stateGravatar Googler2017-03-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RuleContext object is not available when creating dynamic configuration transitions. Removing it from ResourceFilter's state allows us to work with ResourceFilter objects while creating those transitions. If we didn't do this, we'd need to seperate the rest of ResourceFilter's state into a seperate class so that we could work with it as part of doing dynamic configurations. In the next reviews, I'll start actually creating dynamic configurations based on ResourceFilter state. Also, create a withAttrsFrom method that can be used in dynamic configuration transitions, and generally migrate methods that work with attributes from RuleContext to AttributeMap when practical. To support these changes: No longer keep the parsed lists of FolderConfiguration and Density objects as fields of the ResourceFilter, instead, write functions that get them when needed. We want to have access to a RuleContext when we initialize them to avoid errors, and we don't have one in the withAttrsFrom method which will be called as part of transitioning with dynamic configurations. We no longer have those parsed lists to represent whether the object filters during execution or analysis, so replace them with a seperate enum field for filter behavior. Include a FILTER_IN_ANALYSIS_WITH_DYNAMIC_CONFIGURATION option, even though it won't fully be used until the dynamic configuration transition is taken advantage of in the next few reviews. RELNOTES: none PiperOrigin-RevId: 151715400
* Extract --sysroot flag from blaze and move it into crosstoolGravatar hlopko2017-03-31
| | | | | | RELNOTES: None. PiperOrigin-RevId: 151688820
* Partial rollback of commit 5e1a420f1b385382a2df5359faf3ae773aa8d61e.Gravatar Googler2017-03-31
| | | | | | | | | | *** Reason for rollback *** Breaks tests that expected previous id generation order. RELNOTES: None. PiperOrigin-RevId: 151638886
* Init absent action configs for CppCompile actionsGravatar hlopko2017-03-29
| | | | | | | | | | | So far only link actions were initialized in CppLinkActionConfigs. This cl changes this class to also initialize CppCompile actions. This is needed for our ongoing work removing hard-coded flags from Bazel and moving them into Crosstool. RELNOTES: None. PiperOrigin-RevId: 151575045