aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Delete ios_application, ios_extension(_binary), objc_binary.Gravatar allevato2017-09-21
| | | | PiperOrigin-RevId: 169428146
* Add ability to write param files to disk.Gravatar tomlu2017-09-21
| | | | PiperOrigin-RevId: 169418286
* Remove commented-out code that was accidentally checked in.Gravatar cpeyser2017-09-21
| | | | PiperOrigin-RevId: 169414076
* Only load the whitelist for Android targets if they use feature flags.Gravatar mstaib2017-09-21
| | | | | | | | | | | | | | Currently, every Android-related top-level target will use the feature flag whitelist, regardless of whether it has any feature flags. This change makes it so that these targets only load the whitelist if they need it. In the process, it moves the value of the whitelist from the attribute definition method to outside of it. Because it's a builder, this is only a minor change to each callsite. RELNOTES: None. PiperOrigin-RevId: 169405621
* Drop 32-bit architectures from builds with ios_mimimum_os > 11.0.Gravatar cparsons2017-09-21
| | | | | | | This change misses the corner case of builds which are entirely 32-bit (as opposed to mixed 32&64 bit) due to no legitimate place to report the error of such a build; execution will fail for such builds at the action level. RELNOTES: None. PiperOrigin-RevId: 169397354
* Passing Bazel metadata in gRPC headers.Gravatar olaola2017-09-21
| | | | | | TESTED=unit tests RELNOTES: none PiperOrigin-RevId: 169395919
* Remove accidental print statement.Gravatar cpeyser2017-09-20
| | | | PiperOrigin-RevId: 169386655
* Check parameter types for methods when multiple types are allowed.Gravatar dslomov2017-09-20
| | | | | | Fixes #3714 RELNOTES: None. PiperOrigin-RevId: 169382686
* Revert output groups name of cc_libraryGravatar pcloudy2017-09-20
| | | | | | | | Static libraries: cc_archive -> archive Dynamic libraries: cc_dynamic_library -> dynamic_library RELNOTES: None PiperOrigin-RevId: 169374373
* Windows: Make dynamic libraries available to binary at runtimeGravatar Yun Peng2017-09-20
| | | | | | | | | | | When copy_dynamic_libraries_to_binary is enabled, we copy the shared libraries required by the binary to the binary's directory. Bazel will throw errors if there are confilct actions generating the same artifacts. Change-Id: I09a5a599ca0ec7a67efd49d5aa89481450fa4e90 PiperOrigin-RevId: 169364498
* Colorize Clang diagnostic output when building for Apple platforms.Gravatar Googler2017-09-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 169334039
* Move ConfiguredTargetFunction dynamic config selection to its own class.Gravatar gregce2017-09-20
| | | | | | | | Also clarify the interfaces *TransitionResolver* - which determines what transition to apply to an input configuration and *ConfigurationResolver* - which determines the output configuration from that transition. PiperOrigin-RevId: 169311986
* Always pass resource filters to aaptGravatar Googler2017-09-20
| | | | | | | | | | | | | | | | | It turns out that the code to filter in analysis, based on android_ide_common, isn't as strict as aapt is. In particular, given a language filter (like 'en'), aapt rejects language and region resources (like 'en-rUS') but android_ide_common does not. We could try to just patch this behavior, but it's probably indicative of larger inconsistancies between android_ide_common and aapt. As a result, always pass resource filters to aapt. In most cases, if we already filtered in analysis, few if any resources will be filtered out by aapt, so we'll still keep most of the performance gains we expected from filtering in analysis. RELNOTES: none PiperOrigin-RevId: 169254335
* Introduce --enabled_toolchain_types, which when set to the cpp toolchain ↵Gravatar cpeyser2017-09-20
| | | | | | causes the cc_toolchain dependency of cc targets to be selected using the platforms/toolchains constraint solving system. PiperOrigin-RevId: 169250621
* Include library R classes in runtime classpath for library but not binaryGravatar Googler2017-09-20
| | | | | | | | | | In general, R classes for Android libraries are used for compilation of those libraries and then thrown away. They are replaced by the R classes from the binary. Removing the unused android_library R classes will make binaries smaller. RELNOTES: none PiperOrigin-RevId: 169244068
* CI,windows: create test_suites for Windows testsGravatar L?szl? Csomor2017-09-19
| | | | | | | | | | | | | | | Add recursive test_suite rules for all tests that ci.bazel.io runs for Windows, and set the top-level test_suite as the CI test target. Doing so shortens the command line and works around https://github.com/bazelbuild/bazel/issues/3742 I verified that the old set of tests are the same as the new set. Change-Id: Id8d5da3f0c03c9b8969a9f8e1e9a3096888365aa PiperOrigin-RevId: 169242858
* LateBoundDefault: enforce access to a single fragment (or none).Gravatar mstaib2017-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, there is no way to enforce that LateBoundDefaults only access the fragments that they declare. This means that LateBoundDefaults can fail to declare fragments at all, or declare the wrong ones, and still have no troubles. But when trimming, these fragments must be declared, because otherwise they will not necessarily be available. This change refactors LateBoundDefault to declare a single fragment type, not a set. All existing LateBoundDefaults use sets with a single element or no elements at all for their set of fragment classes, so this does not limit anything being done currently. To account for LateBoundDefaults which do not use configuration at all, typically those which only want to access the configured attribute map, it is possible for Void to be the fragment class which is requested. To account for LateBoundDefaults which need to access methods of the BuildConfiguration instance itself, it is possible for BuildConfiguration to be the fragment class which is requested; however, this is unsafe, so it is only a temporary state until a way to do this without also giving access to all of the fragments can be added. Drive-by refactoring: LateBoundDefaults' values are now typed. All actual production LateBoundDefaults were Label or List<Label> typed, through the LateBoundLabel and LateBoundLabelList subclasses. These subclasses have been removed, and LateBoundDefault has two type parameters, one for the type of its input, and one for the type of its output. RELNOTES: None. PiperOrigin-RevId: 169242278
* Treat parsed option values differently by option type.Gravatar ccalvarin2017-09-19
| | | | | | | | | | | | | | | | There is a vexingly large world of possible option types, each with its own quirks of how it interfaces with new inputs as they come in: values can be - overridden (default) - concatenated (allowMultiple) - flattened (allowMultiple that accepts list inputs) - disappear into additional flag inputs (expansion flags) Or some combination of the above, in the case of flags with implicit dependencies and wrapper options. Begin removing the error-prone treatment of all option types with conditional branches. This model of the different options will make it much easier to isolate the option-type specific logic with the command-line parsing logic. Flags that affect other flags (implicit requirements, expansions, and wrappers) will be migrated in a later change. This CL does not change flag parsing semantics, just migrates the current parsing logic to the new class structure. RELNOTES: None. PiperOrigin-RevId: 169239182
* Implement support for Skylark param files.Gravatar tomlu2017-09-19
| | | | PiperOrigin-RevId: 169234249
* Do not duplicate build variables, reuse variables from cc toolchainGravatar hlopko2017-09-19
| | | | | | | | | | | Before this cl each linking and compilation action would contain a full copy of all build variables. However, some build variables can be reused, for the memory consumption benefit. With this cl, we contruct a Variables instance in the CcToolchain, and make it a parent of all per-linking and per-compilation variables. RELNOTES: None. PiperOrigin-RevId: 169233756
* Add files that were droped by our export processGravatar dmarting2017-09-19
| | | | | | | | | Those files are not linked anywhere and where removed by the export process either by accident or for better support from IntelliJ. According to ij.bazel.build a non linked target will not be analyzed so it should be safe. PiperOrigin-RevId: 169229654
* Expose full compile time jars in SkylarkGravatar elenairina2017-09-19
| | | | | | | | | | | There are several use cases for using full compile time jars instead of ijars (scala macros cannot use ijar, kotlin dependencies, etc). This change allows creating a provider with or without creating interface jars for compile time, exposing the right full/interface jars on target[JavaInfo].compile_jars and target[JavaInfo].full_compile_jars. For more details see https://github.com/bazelbuild/bazel/issues/3528. Fixes #3528 RELNOTES: java_common.create_provider is now supported with creating ijars by default. This introduces incompatibilities for existing users. Please set use_ijar=False if you don't want to use ijars. PiperOrigin-RevId: 169222793
* Move RuleConfiguredTarget to lib.analysis.configuredtargets.Gravatar gregce2017-09-19
| | | | | | This is a trivial change with a large file footprint. PiperOrigin-RevId: 169169864
* ConstraintsTest: use the new mock rule interfaceGravatar gregce2017-09-19
| | | | PiperOrigin-RevId: 169163737
* Uploading failed action outputs to the remote cache, because even if the ↵Gravatar olaola2017-09-19
| | | | | | | | | tests fails, we still want to be able to download the logs and other outputs from CAS. This fixes a bug introduced by https://github.com/bazelbuild/bazel/commit/562fcf9f5dfd14daea718f77da95b43b1400689b. To reproduce: run a failing test vs a BES service, the test log would not be uploaded. TESTED=unit tests PiperOrigin-RevId: 169143428
* Move some more tests from the legacy case to the crosstool case.Gravatar cpeyser2017-09-19
| | | | PiperOrigin-RevId: 169116918
* Make desugar tests assume android-24.Gravatar ajmichael2017-09-19
| | | | | | | | | | | Previously, they assumed android-25 but Bazel CI does not have android-25 installed. In practice, these tests do not care which version is used so we should use //tools/android:defaults_jar which selects the jar based on the configuration. However, that target does not produce the jar as a runfile, it is only useful currently for neverlink compilation. RELNOTES: None PiperOrigin-RevId: 169104539
* Move a test from the legacy case to the crosstool case.Gravatar cpeyser2017-09-19
| | | | PiperOrigin-RevId: 169101689
* Move some tests from legacy to crosstool case.Gravatar cpeyser2017-09-18
| | | | PiperOrigin-RevId: 169087881
* Change param file arg string to a format string instead of a prefix string.Gravatar tomlu2017-09-18
| | | | | | Makes it easier to do Skylark param file support which uses a format string. PiperOrigin-RevId: 169019600
* Project reorg: move *ConfiguredTarget to new configuredtargets/ pathGravatar gregce2017-09-18
| | | | | | | Exempt RuleConfiguredTarget in this change because that's liable to touch a billion files. PiperOrigin-RevId: 168929827
* Fix PlatformInfo to correctly report all duplicate constraints, not just the ↵Gravatar John Cater2017-09-18
| | | | | | | first. Change-Id: I3d78418d2c51d09e3862fbab1854ae73a0b3253c PiperOrigin-RevId: 168889865
* Add expectThrows to MoreAsserts until we can use JUnit 4.13.Gravatar jcater2017-09-18
| | | | PiperOrigin-RevId: 168883984
* Annotate legacy objc rulesGravatar cparsons2017-09-18
| | | | | RELNOTES: None PiperOrigin-RevId: 168862724
* PiperOrigin-RevId: 168854156Gravatar carmi2017-09-18
|
* Throw away the confusing UnparsedOptionValueDescription name.Gravatar ccalvarin2017-09-18
| | | | | | | | | | | | | | We get UnparsedValues after ... parsing the options. So that doesn't make sense. What was meant was that it wasn't converted to the final value. In an effort to make this distinction more clear, this change will make the terminology more consistent. The `--foo=bar` step is "parsing" and the `bar -> Object` step is "converting" (it is, in fact, done by Converters). RELNOTES: None. PiperOrigin-RevId: 168852847
* Shard AndroidLibraryTest.Gravatar ajmichael2017-09-18
| | | | | | | But not for Bazel because of #3719 RELNOTES: None PiperOrigin-RevId: 168836686
* Toolchain type labels for c++ are filegroups instead of toolchain_type.Gravatar cpeyser2017-09-18
| | | | PiperOrigin-RevId: 168835640
* Automated rollback of commit f26e8694ae78599b3e2004e3360eaf3443fa53a6.Gravatar hlopko2017-09-18
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks clang_tidy. *** Original change description *** Introduce -c source_file -o output_file build variables Prior to this cl CompileCommandLine would (almost) unconditionally emit -c and -o flags. This cl removes this logic and relies on crosstool to emit these flags. This is another small step towards platform independent C++ rules. Memory use is not affected, since the build variables used by this cl are already exposed, this cl just forces crosstools to use it. RELNOTES: None. PiperOrigin-RevId: 168834576
* Bazel now can build dynamic library from cc_libraryGravatar Yun Peng2017-09-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Working towards: https://github.com/bazelbuild/bazel/issues/3311 When building dynamic library on Windows, Bazel builds an import library and a DLL. Bazel provides a feature called windows_export_all_symbols, if this feature is enabled(and no_windows_export_all_symbols is not) for a cc_library, then Bazel parses object files of that cc_library to generate a DEF file that will be used during linking time to export symbols from DLL. This feature can be specified at crosstool, package, target and command line level. A few differences from Unix platforms: 1. We don't build the shared library on Windows by default, users have to specifiy --output_groups=dynamic_library for building dynamic libraries. This output group is also available on other platforms. 2. By default, cc_test is dynamically linked on Unix, but it will be statically linked on Windows by default. (meaning the default value of linkstatic in cc_test is 1 on Windows, and 0 on other platforms) 3. For global data symbols, __declspec(dllimport) must still be used in source files. Remaining issues: 1. Extensions for import library and DLL are not correct yet. 2. DLLs are not guaranteed to be available during runtime yet. 3. Diamond problem If a cc_library A is specified as linkstatic=0, then no dynamic library will be built for it, so if another cc_library B depends on it, A will be statically linked into B, and if a cc_binary C depends on B, A will also be statically linked into C and B will be dynamically linked to C. This is wrong because A is duplicated in both B and C. It is essentially a diamond problem describled in C++ Transitive Library. (https://docs.google.com/document/d/1-tv0_79zGyBoDmaP_pYWaBVUwHUteLpAs90_rUl-VY8/edit?usp=sharing) Hopefully, we can avoid this by using cc_shared_library rule in future. Change-Id: I23640d4caf8afe65d60b1522af6368536d7a8408 PiperOrigin-RevId: 168829958
* Automated rollback of commit ca216f5eb4b1f1892219db0f578495bbbdbaa875.Gravatar philwo2017-09-15
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Bazel building itself on FreeBSD, also #3739. *** Original change description *** Introduce empty "toolchain_category" rule for labels that will be used as categories of toolchains for the purpose of toolchain selection. Up to now, we've used the native toolchain_type rule for this purpose. That rule depends on a number of configuration fragments that supply build variables - we don't want toolchains to need to depend on those fragments as well. E.g. toolchain_type depends on JvmConfiguration, but we would like toolchains to work with --experimental_disable_jvm. PiperOrigin-RevId: 168810566
* Automatic code cleanup.Gravatar cushon2017-09-15
| | | | PiperOrigin-RevId: 168802886
* Support multiple command lines / params files in SpawnAction.Gravatar tomlu2017-09-15
| | | | | | This is necessary for the upcoming Skylark implementation of param files. PiperOrigin-RevId: 168744486
* Add serialization support to BlazeDirectories (and .hashCode() and .equals() ↵Gravatar janakr2017-09-15
| | | | | | | | support into the bargain). Equality checking isn't that important since there's only one instance per Blaze server, but it keeps serialization semantics reasonable. PiperOrigin-RevId: 168735669
* Use top-level targets' configurations for convenience symlinks.Gravatar mstaib2017-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new flag, --use_top_level_targets_for_symlinks. Configuration-specific convenience symlinks (i.e., (prefix)bin, (prefix)genfiles, (prefix)testlogs) previously pointed at the one top-level target configuration. If there were multiple top-level target configurations, which could only happen when --experimental_multi_cpu was used, then no symlinks would be created, though they would not be deleted either. With the flag on, the output directories of the configurations actually used by the top-level targets (after rule class transitions etc.) are compared. If all targets with non-null configurations have the same configuration (or, more specifically, if all targets with non-null configurations have configurations with the same output directory), then a symlink is created pointing at it. Otherwise, the symlink is deleted, to avoid confusion with stale symlinks from old builds. Known changes in behavior WITHOUT the flag turned on: * In the --experimental_multi_cpu case, non-configuration-specific convenience symlinks (i.e., (prefix)(workspace) and (prefix)out) will always be created, even though they previously wouldn't have been created at all in this case. (should be harmless) * In the --experimental_multi_cpu case, configuration-specific convenience symlinks will be created if all configs have the same output directory. (should be safe, or specifically, should never happen because multi-cpu would necessarily change the output path, but shouldn't hurt anything even if it did) * In the --experimental_multi_cpu case, configuration-based convenience symlinks will be deleted if some configs have a different output directory. (slightly more noticeable since that will be every build using experimental_multi_cpu, but then, it is experimental) RELNOTES: None. PiperOrigin-RevId: 168720843
* Remove warning about multiple options in copts.Gravatar Joe Finney2017-09-15
| | | | | | | | | Fixes #3526 Closes #3725. Change-Id: Ice068542e574661f9dff199f88a1e56fea191de3 PiperOrigin-RevId: 168720424
* Remove unused late-bound attributes for target and execution platforms.Gravatar jcater2017-09-15
| | | | PiperOrigin-RevId: 168703757
* Move some legacy-only tests to the crosstool tests.Gravatar cpeyser2017-09-14
| | | | PiperOrigin-RevId: 168692738
* Only compute hostname once per server lifetimeGravatar hlopko2017-09-14
| | | | | | | | | | | | NetUtil.getShortHostName can take seconds on mac and on windows (like, 20!), since it performs reverse dns lookup. We already cached hostname for the BazelWorkspaceStatusModule, let's cache it for entire bazel server. Also make sure that users of the method understand it's cached. Fixes #3586. RELNOTES: None. PiperOrigin-RevId: 168691615
* Implemented a check for implicitly-exported deps in android_library, and ↵Gravatar jingwen2017-09-14
| | | | | | | | | raise a warning/error depending on --experimental_allow_android_library_deps_without_srcs (defaulted to true for a warning). Previously, users of generated android_library rules with this specific attribute combination do not see the warning message because the message comes from a Skylark macro. Once this is in, users having such a rule (even in their transitive, generated dependencies) will see the warning message. RELNOTES: Deprecated: Using the android_library.deps attribute to implicitly export targets to dependent rules. If your code is using this feature, Bazel will raise a warning. To fix, please use android_library.exports to explicitly specify exported targets. Run with --experimental_allow_android_library_deps_without_srcs=false to ensure forward compatibility when this feature is removed in a future release. PiperOrigin-RevId: 168686765