aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google
Commit message (Collapse)AuthorAge
* Fix BuildRuleWithDefaultsBuilder to work properly with NODEP_LABEL attributes.Gravatar jcater2017-07-07
| | | | | | | | NODEP_LABEL attributes are not allowed to set file types, but populateLabelAttributes assumes that every label attribute has a file type set. Fix this by adding in better checks. PiperOrigin-RevId: 161212141
* Clean up string representations for rule and aspect contextsGravatar vladmos2017-07-07
| | | | | | | | | If --incompatible_descriptive_string_representations is passed, rule and aspect contexts are converted to strings using `str`, `repr` and `print` functions differently (more descriptive, e.g. "<rule context for //pkg:rule>" instead of just "//pkg:rule"). PiperOrigin-RevId: 161205430
* Platform -> ApplePlatform, to avoid ambiguity with the newly introducedGravatar cpeyser2017-07-07
| | | | | | Platform rule. PiperOrigin-RevId: 161203491
* Remove all non-essential call sites of methods on Jvm.Gravatar lberki2017-07-07
| | | | | | | This is so that we can eventually route the information it now contains through JavaRuntimeProvider. RELNOTES: None. PiperOrigin-RevId: 161196809
* 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
* Do not NPE crash when C++ actions are not configured in crosstoolGravatar hlopko2017-07-07
| | | | | | | Show meaningful message instead. RELNOTES: None. PiperOrigin-RevId: 161196096
* Refactor RemoteSpawn{Strategy,Runner}Gravatar ulfjack2017-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make the RemoteSpawnRunner match RemoteSpawnStrategy functionality, including local fallback, remote caching, and execution. This is done so we can actually finish the migration to the SpawnRunner API, for which I've had a pending change for several months now. - Never throw StatusRuntimeException from the GrpcRemoteCache or the GrpcExecutor. We almost never do, since the Retrier catches them implcitly, so a number of catch blocks were already unreachable. Carefully document the cases where we still need to handle it. - RemoteSpawnStrategy / RemoteSpawnRunner no longer catch gRPC-specific exceptions; they should be able to handle any reasonable remote caching / execution implementation (except we don't have a common interface for GrpcRemoteExecutor yet), with no dependency on gRPC as such. Note that the RemoteSpawnStrategy class will actually go away after the SpawnRunner migration (eventually). - However, ensure that we _are_ actually throwing CacheNotFoundException; the retrier implicitly catches that also, so we need to manually unwrap from RetryException. - Don't call into the EventHandler from RemoteSpawnStrategy; instead, throw an exception with the message, and let the higher levels handle the reporting (we only allow this for exception + local fallback, for which there's no good reporting API right now). PiperOrigin-RevId: 161195666
* 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
* Plumb some information about the location of the JVM through ↵Gravatar lberki2017-07-07
| | | | | | | | | | | | | | | JavaRuntimeProvider instead of Jvm if a java_runtime rule is used. There are a few things standing in the way of removing package loading from JvmConfigurationLoader: - The JAVABASE/JAVA Make variables, which are a function of the contents of the package with the JVM. The plan is to make JavaRuntime a MakeVariableProvider and add an attribute to rules that do Make variable evaluation to tell which Make variables they need - The path to the Java binary is exported to Skylark through the configuration fragment. We'll need to export an attribute to Skylark that can be used to depend on the JVM, then do the three-step dance to use that instead of the configuration and figure out what to do if --javabase is not a label. - Jvm#getJavaExecutable() has a bunch of call sites. They need to be adjusted individually. RELNOTES: None. PiperOrigin-RevId: 161176462
* Automated rollback of commit 9000e61fc1737444392ffe251727e8331fab3cf2.Gravatar Googler2017-07-07
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Fixed handling of pch, so this should work again *** Original change description *** Automated rollback of commit 29ec1b89989db411d2038e2df8657b6435f80403. *** Reason for rollback *** Breaks the classroom_ios TAP project [1] in the presence of --experimental_objc_crosstool=all, which was added to the global .blazerc last week. [1] [] *** Original change description *** Change ProtobufSupport to use CrosstoolCompilationSupport if experimental_objc_crosstool=all PiperOrigin-RevId: 161159846
* Factor out BuildConfigurationCollection.Transitions.getDynamicTransition.Gravatar gregce2017-07-07
| | | | | | | | | | | | This is a legacy dependency on the configuration transition table, which is only needed for static configurations. Dynamic configurations didn't actually use anything in that table: this was just a convenience interface that could have equally been defined somewhere else. So this cl defines it somewhere else. There's still one last dependency: Transitions.configurationHook. We'll tackle that in a followup cl. PiperOrigin-RevId: 161141650
* 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 apple_watch2_extension ruleGravatar cparsons2017-07-07
| | | | | RELNOTES: Remove apple_watch2_extension build rule. Users should be using the skylark watchos_application and watchos_extension rules. https://github.com/bazelbuild/rules_apple has details. PiperOrigin-RevId: 161079942
* Prohibit multiple load() statements from appearing on the same lineGravatar brandjon2017-07-07
| | | | | | | | This is an incompatible change, but it's an obvious bug. RELNOTES[INC]: Fixed a bug whereby multiple load() statements could appear on the same line PiperOrigin-RevId: 161070399
* Android tests: prepare tests for parameter filesGravatar laszlocsomor2017-07-06
| | | | | | | | | | | | Prepare tests for an upcoming change where some Android actions will use a parameter file, because they expect command line flags with lists of files and the list separators don't work on Windows. See https://github.com/bazelbuild/bazel/issues/3264 RELNOTES: none PiperOrigin-RevId: 161064058
* Simplify the ActionInputFileCacheGravatar ulfjack2017-07-06
| | | | | | | | | Add a single getMetadata method (matching MetadataHandler), and rewrite everything in those terms. This is in preparation for merging ActionInputFileCache and MetadataHandler. PiperOrigin-RevId: 161053535
* Open source unit tests for the objc rules.Gravatar cpeyser2017-07-06
| | | | PiperOrigin-RevId: 161010594
* 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
* Improve the ToolchainInfo provider and add more data.Gravatar John Cater2017-07-06
| | | | | | | Part of #2219. Change-Id: Ie235d0a75fc50746331b20a7f2060e6d49ae48cb PiperOrigin-RevId: 160982987
* Fix LocalRepositoryLookupFunction to normalize paths so they are compared ↵Gravatar John Cater2017-07-06
| | | | | | | | | properly. Part of #2811. Change-Id: I15da53d1f6ec7f4a41f5d14fdd9dafd5ad82f9fc PiperOrigin-RevId: 160982624
* Require LValues to have at least one variable.Gravatar laurentlb2017-07-06
| | | | | | | | | | | | In other words, we now forbid these: [] = [] () = () _, [] = f() RELNOTES[INC]: lvalues must have define at least one variable (i.e. we forbid `[] = f()`). PiperOrigin-RevId: 160981283
* Assume crosstools that don't have 'no_legacy_features' feature need patchingGravatar hlopko2017-07-06
| | | | | | | | | | | | | Right now there are 2 ways how to control crosstool patches. If there is 'no_legacy_features' feature defined, no patching will be performed. If there is not, then depending on whether any c++ action_config is defined one set of patches is applied, or other set of patches is applied. It's a mess, and in the most cases, crosstools that do not define 'no_legacy_features' need the full patching. This cl fixes the crosstools that need the partial patching. RELNOTES: Crosstool patches are only applied if the toolchain doesn't define 'no_legacy_features' feature. PiperOrigin-RevId: 160979463
* Handle problematic resource qualifiers in references to individual resourcesGravatar Googler2017-07-05
| | | | | | | | | ResourceFilter already handles problematic qualifiers in the resource_configuration_filters attribute. Also handle them in references to individual resources. RELNOTES: none PiperOrigin-RevId: 160969753
* Do not pass ruleKind from Java sandwich/aspects.Gravatar dslomov2017-07-05
| | | | | | | This gives non-sensical values in most cases. RELNOTES: None. PiperOrigin-RevId: 160959188
* 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
* Make 'load' a keywordGravatar laurentlb2017-07-05
| | | | | | | RELNOTES[INC]: `load` is now a language keyword, it cannot be used as an identifier PiperOrigin-RevId: 160944121
* implement py_runtime ruleGravatar yiyu2017-07-05
| | | | | | | | | | * A user can use the py_runtime by `--python_top` flag, where the py_runtime can contain either: + an absolute path of a Python interpreter + a checked-in Python interpreter * A user can also use `--python_path` to point to a Python interpreter in an absolute path directly. PiperOrigin-RevId: 160901921
* 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
* Forbid tabs for indentationGravatar laurentlb2017-07-05
| | | | | | RELNOTES[INC]: Using tabulation for identation is now fobidden in .bzl files PiperOrigin-RevId: 160888064
* Exposing the value of strict_java_deps flag to Skylark.Gravatar elenairina2017-07-05
| | | | | | | | | | Fixes #3295. Users requested this [1] and it is useful for example to pass it as a value to java_common.compile#strict_deps. [1] https://stackoverflow.com/questions/44827704/bazel-can-a-skylark-action-read-a-command-line-flag-strict-java-deps PiperOrigin-RevId: 160886151
* build_windows_jni.sh: move file to subdirectoryGravatar Laszlo Csomor2017-07-05
| | | | | | | | | | | | | The script more logically belongs in src/main/native/windows than in src/main/native. Also move the //src/main/native:windows_jni rule into //src/main/native/windows:windows_jni, so the logic of building the JNI library is fully contained in that package. Change-Id: I96e19003932cc0ddc5af3471b0b31a1aec09b8fa PiperOrigin-RevId: 160876594
* Rename GrpcActionCache to GrpcRemoteCacheGravatar ulfjack2017-07-05
| | | | PiperOrigin-RevId: 160872755
* Remove implicit iteration from CrosstoolGravatar hlopko2017-07-05
| | | | | | | | | | | | | | | | | Up until now we allowed implicit iteration, e.g.: flag_group { flag: '%{some_sequence_variable}' } From now on, snippet above will raise an error. We require explicit 'iterate_over' message, e.g.: flag_group { iterate_over: 'some_sequence_variable' flag: '%{some_sequence_variable}' } RELNOTES: Implicit iteration in the CROSSTOOL has been removed, use explicit 'iterate_over' message. PiperOrigin-RevId: 160871888
* New flag `--incompatible_checked_arithmetic` to use checked arithmetics.Gravatar laurentlb2017-07-05
| | | | | | | RELNOTES: Evaluation will soon use checked arithmetics and throw an error instead of overflow/underflow. PiperOrigin-RevId: 160834366
* 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
* Bazel, Windows: sh_binary now builds a .cmd fileGravatar Laszlo Csomor2017-07-05
| | | | | | | | | | | | | | | | | | | | | | | | On Linux/MacOS, sh_binary creates an output file with the same name as the rule. The file is a symlink pointing to the main script of the rule (sh_binary.srcs only allows one file.) On Windows sh_binary also creates an output file called the same as the rule, but it's a copy of the main script file (due to lack of symlink support on Windows). However the rule now also creates the <rulename>.cmd output, which is a wrapper script similar to the java_binary-generated launcher. If however the sh_binary rule's name ends with ".exe", ".cmd", or ".bat", and its main file also ends with the same extension, then sh_binary will not create the launcher .cmd file, and will copy the main file to the output tree instead. Change-Id: Idcf92ce3bb254bd6d9a1fb5c659a52220efe19aa PiperOrigin-RevId: 160805720
* Enable --feature_control_policy policy for feature flag usage.Gravatar mstaib2017-07-03
| | | | | | | | | | To limit rollout of this potentially risky feature, a new policy is added to the --feature_control_policy feature list. The contents of the package_group pointed to by that label are then used to control which targets are allowed to use feature flags and related features. RELNOTES: None. PiperOrigin-RevId: 160686186
* Inline AttributeContainer.ATTRIBUTE_CONTAINER_FACTORY and ↵Gravatar laurentlb2017-07-03
| | | | | | | PathFragment.TO_PATH_FRAGMENT RELNOTES: None. PiperOrigin-RevId: 160668541
* Enable incremental dexing by default.Gravatar ajmichael2017-07-03
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/3045. RELNOTES: Enable --incremental_dexing for Android builds by default. Note that some dexopts are incompatible with incremental dexing, including --force-jumbo. PiperOrigin-RevId: 160650101
* Add recursive jars to java_common.create_providerGravatar elenairina2017-07-03
| | | | | | Progress on #2614. PiperOrigin-RevId: 160649080
* Mark //src/test/java/com/google/devtools/build/lib/skyframe:SkyframeTests flakyGravatar hlopko2017-07-03
| | | | | | | | | | It had it's ups and downs the whole week on Windows, e.g. http://ci.bazel.io/view/Dashboard/job/bazel-tests/BAZEL_VERSION=latest,PLATFORM_NAME=windows-x86_64/855/console Tracking issue: #3302. RELNOTES: None. PiperOrigin-RevId: 160645225
* Add plugins and exported_plugins params to java_common.compile.Gravatar elenairina2017-07-03
| | | | | | | | | | This is a step forward to having the same semantics for java_library and custom Skylark rules that use java_common.compile, facilitating the migration from native Java rules to Skylark. Progress on #2614 PiperOrigin-RevId: 160644961
* Fix ./compile.sh srcs: adding dexer to the list of sourcesGravatar dmarting2017-07-03
| | | | PiperOrigin-RevId: 160644365