aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Introduce --incompatible_disallow_toplevel_if_statement to forbid top-level ↵Gravatar laurentlb2017-06-08
| | | | | | | | | | if statements. RELNOTES: In .bzl files, top-level `if` statements are deprecated and will be forbidden in the future. Move them in a function body instead (or use a conditional expression instead: `x if condition else y`). PiperOrigin-RevId: 158276986
* Add new configuration fragment for platforms, with host and targetGravatar John Cater2017-06-08
| | | | | | | options. Change-Id: If623f2416f8bff7c74ddf99d5c957a075de6494f PiperOrigin-RevId: 158275892
* PiperOrigin-RevId: 158274860Gravatar carmi2017-06-08
|
* Require that flags with static expansions be of Void type.Gravatar ccalvarin2017-06-07
| | | | | | | The type was ignored, and it was expected that all expansion flags had no value of their own, but was not checked. PiperOrigin-RevId: 158261788
* Extend the SpawnResult interface to cover more use casesGravatar ulfjack2017-06-07
| | | | | | | - tag status results that are likely due to user behavior - add a cache hit flag PiperOrigin-RevId: 158240265
* Adds the resource class jar to the implicit outputs of android_libraryGravatar Googler2017-06-07
| | | | | | | | | An in-progress change will remove compiled R.java from runtime dependencies. To make this file available to rules that depend on it it, expose it as an implicit output instead. RELNOTES: none PiperOrigin-RevId: 158182310
* Do not add archiver_flags feature when crosstool already has one.Gravatar hlopko2017-06-07
| | | | | | | This is needed for migrating one of the internal crosstools RELNOTES: None. PiperOrigin-RevId: 158176295
* Internally track changes to stdout / stderr files, so we can avoid ↵Gravatar felly2017-06-07
| | | | | | filesystem operations to check whether they've been written. In the common case, they haven't, and we can avoid checking that. PiperOrigin-RevId: 158172182
* Automated g4 rollback of commit d028d7854d3e95d97143945a1ec32944e5e4594b.Gravatar lpino2017-06-07
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks 1000+ targets in the depot: [] *** Original change description *** Generate pre-reconciled ids R classes for dependency libraries with resources in the transitive closure of robolectric tests. RELNOTES: None PiperOrigin-RevId: 158159550
* Have BazelPackageLoader use the newly added BazelSkyframeExecutorConstants.Gravatar nharmata2017-06-07
| | | | PiperOrigin-RevId: 158159054
* protobuf: Use bazel's native java_proto_library rules.Gravatar Jakob Buchgraber2017-06-06
| | | | | | | | | Additional changes: - Introduce a Skylark macro java_library_srcs that provides the source jars of a java_*_library rule. - Remove bazel's own java_proto_library implementation. Change-Id: I18f2259bc75ca0fb32dcd8a6a857c609bd2c7773 PiperOrigin-RevId: 158146210
* Fix automatic host platform detection to check the --host_cpu flag.Gravatar John Cater2017-06-06
| | | | | | | | | Also adds a new target_platform attribute that checks the --cpu flag. Part of #2219. Change-Id: Icc732917db127ac8377a7722adc70b1a722d538a PiperOrigin-RevId: 158143095
* java_stub_template: remove cygpath callGravatar Laszlo Csomor2017-06-06
| | | | | | | | | | | | | | | | | | Remove the cygpath call on non-Windows platforms, that was recently added by 102ce6ddc04063d26165c6a2167059f2348026bf Also add a test for Bazel's Java launcher. Also update the testenv.sh:cleanup method to wait for Bazel to shut down, don't give up immediately if it could not clean up the inner Bazel's temp dir. Fixes https://github.com/bazelbuild/bazel/issues/3092 See https://github.com/bazelbuild/bazel/issues/3069 Change-Id: I82b1026a60056f340caa53a59b6f2ec8a1397ef3 PiperOrigin-RevId: 158139846
* Factor out Bazel-specific ctor constants in SequencedSkyframeExecutor into a ↵Gravatar nharmata2017-06-06
| | | | | | | separate class. They're currently passed in around various callsites in the codebase and tests. RELNOTES: None PiperOrigin-RevId: 158139074
* Remove the CommandEnvironment from BlazeCommand.editOptionsGravatar ulfjack2017-06-06
| | | | | | | | | | | BlazeCommand.editOptions is currently called fairly late in the startup process, so it must be restrictive in what it does, as any change to the options can potentially introduce inconsistencies between different parts of Bazel. Removing the CommandEnvironment reduces the amount of damage it can do, and may allow us to move the call earlier in the startup process (maybe even to a point where the CommandEnvironment does not exist yet). PiperOrigin-RevId: 158133862
* Fix a typo.Gravatar Googler2017-06-06
| | | | | RELNOTES: None. PiperOrigin-RevId: 158131549
* Fix a bunch of issues related to server startup/shutdown:Gravatar lberki2017-06-06
| | | | | | | | | - Only try to communicate with the server if it passes verification (i.e. the indicated PID exists and its start time is correct) - Use only one thread to delete files on exit - Don't set restart reason to NEW_VERSION unless there is an existing server RELNOTES: None. PiperOrigin-RevId: 158131470
* Move the instrumentation filter computation to BuildToolGravatar ulfjack2017-06-06
| | | | | | | | | | | | | | | | | | Previously, it was in CoverageCommand, which led to all sorts of special casing and workarounds, because it required options editing, error handling during options editing, as well as early package path setup. It also caused us to duplicate target pattern evaluation for the coverage command. A semantic change is that the TestCommand can now also trigger the heuristic instrumentation filter computation, if collect_code_coverage is enabled; we might consider also enabling this for the BuildCommand, which can also have collect_code_coverage enabled (e.g., when a user wants to build a non-test binary with coverage instrumentation). Also remove a bunch of unnecessary AbruptExitException declarations. RELNOTES: bazel test now also computes a default instrumentation filter if --collect_code_coverage is enabled PiperOrigin-RevId: 158129953
* Add exit codes for remote errors to ExitCodeGravatar ulfjack2017-06-06
| | | | | | | These values are already used inside Google with specific semantics, so we have to use these exact values (for now). PiperOrigin-RevId: 158127273
* Fix: remote execution was ignoring the exit codeGravatar Ulf Adams2017-06-06
| | | | | | | | | | | | | | | | | | | | I likely broke that in 7f6e27f, although it was a pre-existing condition: previously, the remote worker was reporting non-zero exit as a failure. Now it reports the run as successful with a non-zero exit code. Update RemoteSpawnStrategy to handle the exit code and generate an appropriate error. In the future, we won't throw exceptions for non-zero exit at this level, but instead report the non-zero exit in the SpawnResult, and have the caller inspect that (and generate the error if applicable). Fixes #3121. Change-Id: Ia39f5c2ef5622544285c1957bb9ebae89e58edf2 Closes #3130. Change-Id: Ia39f5c2ef5622544285c1957bb9ebae89e58edf2 PiperOrigin-RevId: 158120222
* Add a tag to ExecutionRequirements that allows disabling local prefetchGravatar ulfjack2017-06-06
| | | | | | | Remove SpawnExecutionPolicy.shouldPrefetchInputsForLocalExecution in favor of a static helper method in Spawns. PiperOrigin-RevId: 158119993
* Move ExecutionRequirements to the lib.actions packageGravatar ulfjack2017-06-06
| | | | | | | | | It was previously the odd-one out in lib.analysis.actions, due to other code that wanted to depend on it without pulling in all of analysis. However, it's needed to interpret Spawn instances, and Spawn lives in lib.actions, so it makes more sense to move it there, and remove the special-casing. PiperOrigin-RevId: 158116684
* Change help message for --batchGravatar Mike Morearty2017-06-06
| | | | | | | | | | The help message previously said that `--batch` is strongly discouraged, but in fact it's only discouraged when using bazel interactively. Since the tradeoffs of `--batch` are fully explained in the online docs, this commit changes the help message to explain what the option does without getting into the tradeoffs. Fixes #3051 Closes #3118. PiperOrigin-RevId: 158112611
* apple_binary provides information about its dylibs' symbols in its nested ↵Gravatar cparsons2017-06-06
| | | | | | | | | | | | | ObjcProvider This facilitates app->dylib->dylib dependencies, as the app needs to avoid linking in symbols contained in any *transitive* dylibs, not just in any direct dylibs. This also removes a test which verified the previous, incorrect functionality (not propagating information about dylibs up the tree). RELNOTES: None. PiperOrigin-RevId: 158070381
* Specify isTestRule as an input to CompilationSupport instead of from the ↵Gravatar cparsons2017-06-06
| | | | | | | current rule name RELNOTES: None. PiperOrigin-RevId: 158068921
* Make compatible_with = ["all", "foo"] the same as compatible_with = ["all"].Gravatar gregce2017-06-06
| | | | | | | | | | | | | Assuming "all" fulfills "foo", these should be exactly the same (and maybe we should trigger a redundant listing error). In practice, it's possible to make the first case succeed while the second fails because of environment refining and lack of static constraint checking for selects. See changes for details. Also refactor ConstraintSemantics.checkConstraints to divide and conquer more clearly. PiperOrigin-RevId: 158047217
* Cleanup the interface of ApkActionsBuilder.Gravatar ajmichael2017-06-05
| | | | | | | | | | | | | | | A few changes: 1. Remove the ApkSigningMethod input. We always read this from AndroidConfiguration, callers shouldn't need to pass it in. 2. Add a signingKey attribute. This will be needed for dex2oat to pass in whatever key was used to sign the input APKs. 3. Unify the resourceApk and nativeLibsZips into a "addInputZip(s)" methods. This can also be used for inputting an existing APK, such as the one from dex2oat. RELNOTES: None PiperOrigin-RevId: 157973679
* Add a new flag --sandbox_writable_path, which asks the sandbox to make anGravatar Googler2017-06-05
| | | | | | | | existing directory writable when running actions. RELNOTES: Added a new flag --sandbox_writable_path, which asks the sandbox to make an existing directory writable when running actions. PiperOrigin-RevId: 157971858
* Internal changeGravatar Googler2017-06-05
| | | | PiperOrigin-RevId: 157878648
* Automated g4 rollforward of commit b71e99b1f3746103e5d6802eebc24096b3494959.Gravatar gregce2017-06-05
| | | | | | | | | | | | | | | | | | | | | | | | (Automated g4 rollback of commit de92f9d8ea093416fae999073bbfcf3cf501ab55). *** Reason for rollback *** The problems that forced commit de92f9d8ea093416fae999073bbfcf3cf501ab55 were fixed in commit e6392cd380fce14d719890c78d5eb2657e8a6cfc . *** Original change description being rolled forward *** 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.... *** ROLLBACK_OF=156180015 PiperOrigin-RevId: 157865224
* Fixing documentation for platforms and toolchains.Gravatar John Cater2017-06-05
| | | | | Change-Id: I98fd671af858c402b10bb5ef59735d83d4003593 PiperOrigin-RevId: 157863146
* Remove Xcodege integration from Blaze.Gravatar schmitt2017-06-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 157857216
* Include the root cause IOException in the BuildFileContainsErrorsException ↵Gravatar nharmata2017-06-05
| | | | | | | thrown when PackageFunction encounters such an IOException when reading the contents of a BUILD file. RELNOTES: None PiperOrigin-RevId: 157853283
* Make the non propagated values available in the Skylark representation of ↵Gravatar kaipi2017-06-05
| | | | | | ObjcProvider. PiperOrigin-RevId: 157850516
* Rename xcode_version's default_macosx_sdk_version to use 'macos'.Gravatar cparsons2017-06-05
| | | | | | | This is consistent with other usage. RELNOTES: NONE. PiperOrigin-RevId: 157849696
* Set host apple platform type to MACOSGravatar cparsons2017-06-05
| | | | | RELNOTES: None. PiperOrigin-RevId: 157847930
* Expose .ap_ artifact as a skylark providerGravatar Googler2017-06-05
| | | | | RELNOTES: none PiperOrigin-RevId: 157837746
* Remove "supports-workers" tag from ApkBuilder execution info.Gravatar philwo2017-06-05
| | | | | | The C++ implementation of SingleJar, which is available in Bazel, but not yet the default, doesn't support persistent worker mode, so this causes issues when you try to use it. PiperOrigin-RevId: 157831362
* Move helper methods for accessing platform providers to a utility class.Gravatar John Cater2017-06-02
| | | | | Change-Id: I45d0cf8e5096ad4ab516af5ddaa98eea8d516c04 PiperOrigin-RevId: 157788771
* Generate pre-reconciled ids R classes for dependency libraries with resourcesGravatar corysmith2017-06-02
| | | | | | | in the transitive closure of robolectric tests. RELNOTES: None PiperOrigin-RevId: 157762190
* Fix a bug in ParallelVisitor which prevents visitation task from being ↵Gravatar Googler2017-06-02
| | | | | | | | | | | | | | interrupted eagerly The original code swallows the InterruptedException, sets the interrupt bit and stops new tasks from being submitted. However it does not actively send an interrupt signal to all running and pending tasks already in the pool. It is partly due to the misleading syntax of awaitTermination, which actually quitely waits for all tasks to exit even if interruptWorkers is set to true. Both errors are fixed in this change. RELNOTES: None PiperOrigin-RevId: 157762029
* Remove javacopts and java_plugins attributes of aar_import.Gravatar ajmichael2017-06-02
| | | | | | | These do not make sense since aar_import does not compile any java but are inherited from JavaBaseRule. RELNOTES: None PiperOrigin-RevId: 157751090
* Add .equals(), .hashCode() to EnableLipoTransition.Gravatar gregce2017-06-02
| | | | | | | | | | | | This fixes a subtle integration bug between PatchTransition, ConfiguredTargetFunction, and DependencyResolver. Short story: ConfiguredTargetFunction.getDynamicConfigurations assumes at most one <Attribute, Label, Transition> entry per configured target dep. DependencyResolver.dependentNodeMap faithfully supplies this by returning an OrderedSetMultimap<Attribute, Dependency>, where each Dependency is a <Label, Transition>. OrderedSetMultimap guarantees no <key, value> repeats, but if you have two semantically equal EnableLipoTransition instances that don't satisfy .equals(), deduping fails. Most PatchTransitions don't have this problem because they're singletons. But each EnableLipoTransition is instantiated with a Rule, so singletons don't work here. This problem can only happen when a rule has multiple instances of the same C++ dep under the same attribute. But this isn't actually possible for normal attributes like "deps" because they don't allow duplicates (see RuleClass#checkForDuplicateLabels). Only non-LABEL_LIST attributes can trigger this. PiperOrigin-RevId: 157733284
* Make android_binary.manifest mandatory.Gravatar ajmichael2017-06-01
| | | | | | | | | | It was already effectively mandatory. The build would fail if you did not have the manifest attribute set, but this provides a better error message. Fixes https://github.com/bazelbuild/bazel/issues/3090. RELNOTES: None PiperOrigin-RevId: 157719024
* CountingOutputStream: properly flush()Gravatar Klaus Aehlig2017-06-01
| | | | | | | | | | | If console output limiting is enabled in the actual output stream is wrapped in a CountingOutputStream to hard-limit the number of bytes written. As on the console, the two streams, stdout and stderr, might interleave, proper flushing of writes is important. Therefore, make sure flushing is propagated through the CountingOutputStream. Change-Id: I591a2a1ae798a9d8ef704118b22960ff9773a59e PiperOrigin-RevId: 157707049
* Experimental UI: don't show dates for no-build commandsGravatar Klaus Aehlig2017-06-01
| | | | | | | | | | | When building with timestamps enabled, it is useful to know the date as well, e.g., when later looking at logs. This, however, is not the case if the command does not build (e.g., "bazel help", "bazel query"), or, in general, if the first output is only produced after the command is completed. Change-Id: I75ef38fbb98e886b1dc38899efa10188055f87e2 PiperOrigin-RevId: 157700578
* Windows: Create a dangling junction when symlink target doesn't existGravatar Yun Peng2017-06-01
| | | | | | | | | | | | | | On Unix system, `ln -s foo bar` will create an dangling symlink bar -> foo even foo doesn't exist. The current implementation of createSymbolicLink for Windows fails in this situtation. And this lead to #2474. In this change, we create a dangling junction when the target doesn't exist which mimics the behavior on Unix. Fixed https://github.com/bazelbuild/bazel/issues/2474 Change-Id: I442ca3e2fb20b76c9b5bbfee903299fe51481f43 PiperOrigin-RevId: 157694631
* Make C++ archiving use action_configs instead of hardcoded flagsGravatar hlopko2017-06-01
| | | | | RELNOTES: Use action_config in crosstool for static library archiving, remove ar_flag. PiperOrigin-RevId: 157685703
* Remove NestedSets from ApkProvider.Gravatar ajmichael2017-06-01
| | | | | | | | The only call site passes single artifacts. Some of the read sites assert that the NestedSet contains only one element. RELNOTES: None PiperOrigin-RevId: 157635897
* Remove support of --no_ prefix for boolean flags.Gravatar ccalvarin2017-06-01
| | | | | | | | The no_ prefix was initially undocumented, but its support has over time lead to a number of inconsistencies. RELNOTES: --no_ prefix no longer recognized. PiperOrigin-RevId: 157631435