aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
* Proper error messages when built-in rule attributes are overridden #1811Gravatar Vladimir Moskva2016-10-04
| | | | | -- MOS_MIGRATED_REVID=134823021
* Default host configuration's --fat_apk_cpu to the empty list.Gravatar Greg Estren2016-10-04
| | | | | | | It doesn't make sense to split a host Android rule's deps down fat APK settings. -- MOS_MIGRATED_REVID=134814698
* Fix NPE in skylark documentation processorGravatar Jon Brandvein2016-10-04
| | | | | | | | Crash was triggered by overriding a @SkylarkCallable without repeating the annotation in the subclass's method. -- MOS_MIGRATED_REVID=134797463
* Implement Skylark syntax to propagate an aspect to all attributes.Gravatar Dmitry Lomov2016-10-04
| | | | | -- MOS_MIGRATED_REVID=134793032
* Add a build-event streamer classGravatar Klaus Aehlig2016-10-04
| | | | | | | | | | | | | The BuildEventStreamer will listen for BuildEvents and stream them to the provided transports. It also ensures events are properly chained: for unsolicited events, it will add progress events to chain them and at the end of a build it closes all announced but not produced events as aborted. -- Change-Id: I623b582657573fe1288821c96f084e0ab0bca4d4 Reviewed-on: https://bazel-review.googlesource.com/#/c/6275 MOS_MIGRATED_REVID=134787541
* Adds SingleJar APK building option behind --use_singlejar_apkbuilder flag.Gravatar Adam Michael2016-10-04
| | | | | | | | | Default is off (using ApkBuilderMain still). Note that --use_singlejar_apkbuilder is incompatible with --apk_signing_method=legacy_v1 (but compatible with --apk_signing_method={v1,v2,v1_v2}). -- MOS_MIGRATED_REVID=134783504
* cc_inc_library deletes its output directory before execution.Gravatar Janak Ramakrishnan2016-10-04
| | | | | | | | | | | | This ensures that stale outputs from prior builds do not remain to confuse the compiler. Fixes #1778. -- Change-Id: I31b5c3e7e5970cf45c3ff10144ddfc73540ef9af Reviewed-on: https://bazel-review.googlesource.com/6250 MOS_MIGRATED_REVID=134780501
* Do not write terminal output in the experimental UI character-by-character ↵Gravatar Lukacs Berki2016-09-30
| | | | | | | | | (which results in single-character gRPC messages). Fixes #1861. -- MOS_MIGRATED_REVID=134775680
* If Label syntax is wrong, actual offense is now reported in error message.Gravatar Andreas Bergmeier2016-09-30
| | | | | | | | Closes #1633. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/1633 MOS_MIGRATED_REVID=134774446
* experimental_objc_library always creates a module map, to be consistent with ↵Gravatar Cal Peyser2016-09-30
| | | | | | | objc_library. -- MOS_MIGRATED_REVID=134773363
* Fix #1849: Sandboxing on OS X should be turned off by default for 0.3.2.Gravatar Philipp Wollermann2016-09-30
| | | | | | | | | | | | This restructures the way we set the default Spawn strategy so that each BlazeModule supplying a SpawnActionContext has an ActionContextConsumer that sets its own SpawnActionContext as the default, with the BazelRulesModule being put as the last module loaded in BazelMain, so that it can override that decision - it only does, if the user explicitly specifies a --spawn_strategy flag. IMHO this is a much saner approach than the older one. So the flow is essentially this: - StandaloneActionContextConsumer sets the default strategy to "standalone". - SandboxActionContextConsumer sets the default strategy to "sandboxed", but only on Linux - BazelRulesModule sets the default strategy to the value of the --spawn_strategy flag, if it is set. -- MOS_MIGRATED_REVID=134770427
* Add type annotation for the benefit of java 7Gravatar Klaus Aehlig2016-09-30
| | | | | | | Fixes #1863 -- MOS_MIGRATED_REVID=134767527
* sandbox: Replace the error-prone lazy cleanup of sandbox directories by a ↵Gravatar Philipp Wollermann2016-09-30
| | | | | | | | | simple synchronous cleanup. Tested with bazel building itself that this does not result in a performance degradation. -- MOS_MIGRATED_REVID=134766597
* Use minimum OS flags for watchOS and tvOS actions.Gravatar Chris Parsons2016-09-30
| | | | | | | | | | | | Also: - Move minimum os information into AppleConfiguration - Update watchos and tvos minimum version defaulting behavior such that, if unspecified in flags, the minimum OS is equal to the SDK version. - Expose Apple Platform to apple_common in skylark -- MOS_MIGRATED_REVID=134712763
* Initial check-in of apple_static_library ruleGravatar Chris Parsons2016-09-30
| | | | | | | RELNOTES: apple_static_library rule to create multi-architecture static archive files from Objc/C++/Swift dependencies on apple platforms -- MOS_MIGRATED_REVID=134701599
* Open source dex merging tools for incremental dexing.Gravatar Adam Michael2016-09-30
| | | | | | | | Tested with bazel build --incremental_dexing_binary_types=monodex,multidex_unsharded,multidex_sharded -- //examples/android/java/bazel:hello_world -- MOS_MIGRATED_REVID=134690103
* Export idl_import_root to Android Studio, so that we know the packages of ↵Gravatar Googler2016-09-30
| | | | | | | new AIDL files in relation to their location. -- MOS_MIGRATED_REVID=134687843
* Lazily evaluate hash codes for ConfiguredTargetFunction#AttributeAndLabel.Gravatar Greg Estren2016-09-30
| | | | | | | | | | Profiling shows this shaves off 8% of getDynamicConfigurations' CPU time. And brings down AttributeAndLabel instantiation from 30% of that time to 24%. Over a simple cc_binary, this reduces the number of Objects.hash calls by 96%. -- MOS_MIGRATED_REVID=134687748
* Add an actions provider for testing Skylark rules.Gravatar Jon Brandvein2016-09-30
| | | | | | | The new provider gathers actions generated by any Skylark-based RuleConfiguredTarget, so long as the rule definition has _skylark_test=True set. For the moment this flag is under the user's control, but the intention is that it will be set by a test runner. -- MOS_MIGRATED_REVID=134687396
* Don't force PrintStream on streaming output formattersGravatar Michajlo Matijkiw2016-09-30
| | | | | | | | Usually an OutputStream will do. Forgo the extra layer of indirection and stream directly to the output. -- MOS_MIGRATED_REVID=134682243
* ConfiguredTargetFunction#getDynamicConfigurations: halve the number of ↵Gravatar Greg Estren2016-09-30
| | | | | | | | | | | | | | | | AttributeAndLabel instantiations. This shaves 25% off the method's execution time in --experimental_dynamic_configs=notrim mode. This isn't a crucial optimization, since getDynamicConfigurations is already fast. Profiling: $ bazel shutdown; bazel build --nobuild //testapp:cc --experimental_dynamic_configs=notrim shows getDynamicConfigurations takes 1.3% of the analysis phase's CPU time before this change and 1.0% after. Before this change, AttributeAndLabel instantiation took 44% of the method's CPU time. After: 30%. Profiling done with JProfiler. -- MOS_MIGRATED_REVID=134677107
* Add infrastructural build eventsGravatar Klaus Aehlig2016-09-30
| | | | | | | | | | | | | | | | | To organize a clean build event stream, certain infrastructural events are necessary. - If the build is aborted prematurely, certain expected events will not happen; hence we have to close those leafs with an event indicating that the actual event did not happen, as the build was aborted. - Occasionally, we update on progress of the build, using special events; those are also used to chain failure events that come before the build events for which they are root cause are reported. Add those. -- Change-Id: Ibf86a313eb678822754b5e1f1e9d7f1a2cbeaaef Reviewed-on: https://bazel-review.googlesource.com/#/c/6274 MOS_MIGRATED_REVID=134667915
* Fixed location expansion in cc rules.Gravatar Vladimir Moskva2016-09-30
| | | | | -- MOS_MIGRATED_REVID=134652924
* cxx_flags are not applied to objc compiles.Gravatar Cal Peyser2016-09-30
| | | | | -- MOS_MIGRATED_REVID=134651940
* Add a BuildEventTransport writing text-format protosGravatar Klaus Aehlig2016-09-29
| | | | | | | | | | This will allow a precise, but still human-readable, transcript of the build-event protocol buffers generated. -- Change-Id: I6284521f652b04ab6bf54e5eeed7b92f2d7e2245 Reviewed-on: https://bazel-review.googlesource.com/#/c/6273 MOS_MIGRATED_REVID=134637366
* Optimize how null configurations get created and add test infrastructure for ↵Gravatar Greg Estren2016-09-29
| | | | | | | | | | | | Bazel's dep configuration creation logic. This essentially implements the following TODOs: https://github.com/bazelbuild/bazel/blob/bc6045dcc8fa33d4241d231138020ac4bdecc14f/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java#L599 https://github.com/bazelbuild/bazel/blob/bc6045dcc8fa33d4241d231138020ac4bdecc14f/src/test/java/com/google/devtools/build/lib/skyframe/ConfigurationsForTargetsTest.java#L42 -- MOS_MIGRATED_REVID=134607049
* Provide parallel implementations of 'allrdeps' and 'rbuildfiles', using a ↵Gravatar Nathan Harmata2016-09-29
| | | | | | | shared naive BFS implementation. Also implement RegexFilterExpression#parEval. -- MOS_MIGRATED_REVID=134598046
* Add a flag to disable native Swift support.Gravatar Dmitry Shevchenko2016-09-29
| | | | | | | | * When set, this flag will cause any objc_library or objc_binary rule with Swift sources to error out. The native functionality is deprecated. -- MOS_MIGRATED_REVID=134583636
* Make AbstractBlazeQueryEnvironment no longer implement AutoCloseable. ↵Gravatar Nathan Harmata2016-09-29
| | | | | | | | | | | Instead have SkyQueryEnvironment#evaluateQuery be responsible for handling cleanup of its internal ForkJoinPool. In addition to being a more sensible way of organizing the code (imo, it makes sense for SkyQueryEnvironment to clean up after itself), this fixes several issues: (i) If query evaluation is interrupted, the AbstractBlazeQueryEnvironment#close call at the end of the try-with-resources statement in QueryCommand would be blocking and non-urgent. N.B. This was not an issue with the current ForkJoinPool usage, but was an issue with the old ThreadPoolExecutor usage. (ii) Because of how the code in QueryCommand was structured, OutputFormatterCallback#close would happen _before_ the AbstractBlazeQueryEnvironment#close call. If query evaluation is interrupted, threads executing query tasks may be invoking the callback after the callback had been shut down! -- MOS_MIGRATED_REVID=134573395
* Fix IDE aspect crash when traversing a data mode deps attr.Gravatar Googler2016-09-29
| | | | | -- MOS_MIGRATED_REVID=134566270
* Disables sandboxing when "--mem_leaks" is present.Gravatar Yue Gan2016-09-28
| | | | | -- MOS_MIGRATED_REVID=134540479
* Update ActionMetadata -> ActionExecutionMetadata references.Gravatar Greg Estren2016-09-28
| | | | | -- MOS_MIGRATED_REVID=134537085
* Allow new_ rules to overwrited BUILD files in downloaded reposGravatar Kristina Chodorow2016-09-28
| | | | | | | | | | | My previous change carefully checked that the file was a symlink before removing it and added a test with local repositories... and it of course isn't a symlink with downloaded repositories and crashes. Fixes #1697. -- MOS_MIGRATED_REVID=134536130
* Windows, native: add windows_msvc config_settingGravatar Laszlo Csomor2016-09-28
| | | | | | | | | | | | | | | Update `select` statements in BUILD files with the new config_setting. This is a first step on a long path that leads to us being able to compile bazel on Windows with --cpu=x64_windows_msvc. Needless to say, we're not there yet. Tested: on Linux, Darwin, Windows/MSYS -- MOS_MIGRATED_REVID=134534613
* Eliminates performance overhead of --experimental_dynamic_configs=notrim.Gravatar Greg Estren2016-09-28
| | | | | | | | | | | | | | Before this change, a non-trivial real-world build was measured to have about 20% analysis time overhead. After, that's theoretically down to 2.4%. But that's only the analysis phase, so the impact on full builds is smaller. And the impact on analysis-cached builds is zero. And practical tests show no obvious difference (JProfiler is probably overstating the impact since it excludes known heavyweight methods). The improvements, in short: - Optimize a sanity check that expects each <Attribute, Label> pair to only have one transition. This alone was over half the original performance penalty. - Simplify logic for null configuration deps (of which there are many, e.g.: all source files) - Skip a check for required fragments not available in the configuration. This is irrelevant for notrim mode. There are still some places we could optimize. Dependency.withNullConfiguration in particular takes measurable time (I think from being constructed all the time and in its hashCode calls). But this doesn't seem pressing given the new numbers. -- MOS_MIGRATED_REVID=134533452
* Add a new flag --sandbox_tmpfs_path, which asks the sandbox to mount an ↵Gravatar Philipp Wollermann2016-09-28
| | | | | | | | | empty, writable directory at a specified path when running actions. (Supported on Linux only for now.) RELNOTES: Added a new flag --sandbox_tmpfs_path, which asks the sandbox to mount an empty, writable directory at a specified path when running actions. (Supported on Linux only for now.) -- MOS_MIGRATED_REVID=134526345
* Add support for sandboxing persistent workers.Gravatar Philipp Wollermann2016-09-28
| | | | | -- MOS_MIGRATED_REVID=134523222
* Add interfaces for the build event protocolGravatar Klaus Aehlig2016-09-28
| | | | | | | | | | | Bazel in the will provide a machine-readable stream of important build events. These interfaces set up the framework and expectations about the produced events and the entities distributing those events. -- Change-Id: If2c3b2e11c31b0136b57eadeef2d2f8f8fe5e2e7 Reviewed-on: https://bazel-review.googlesource.com/#/c/6272 MOS_MIGRATED_REVID=134522369
* Remove the "labels in the configuration must be in the transitive closure of ↵Gravatar Lukacs Berki2016-09-28
| | | | | | | | | command line labels" sanity check. It's only used for --libc_top and makes configuration creation much more heavyweight that it would otherwise be. -- MOS_MIGRATED_REVID=134513058
* Skylark: Give more detailed errors when parsing the argumentsGravatar Pedro Liberal Fernandez2016-09-28
| | | | | | | | | | | | | | | | | | | | | of a SkylarkCallable. CL already reviewed in commit 5972bee6ebfa53cf165befab9fa7962e19d5f620. Rolled back due to casting error in Java 1.7. This is fixed now: https://github.com/bazelbuild/bazel/issues/1832 Old: matchingMethod = new Pair<>( method, argumentListConversionResult.getArguments()); New: matchingMethod = new Pair<MethodDescriptor, List<Object>>( method, argumentListConversionResult.getArguments()); -- MOS_MIGRATED_REVID=134503884
* Prevent interleaved slow interrupt stack tracesGravatar Michajlo Matijkiw2016-09-28
| | | | | | | | It's possible that there are multiple outstanding interrupts. When this happens avoid interleaving their stack traces. -- MOS_MIGRATED_REVID=134477540
* Read android binary attributes that are queried for incremental dexing ↵Gravatar Googler2016-09-28
| | | | | | | artifacts from AndroidSemantics. -- MOS_MIGRATED_REVID=134475699
* Tolerate the rare state where a dependent of a previously cached shared ↵Gravatar Janak Ramakrishnan2016-09-28
| | | | | | | | | action sees a different shared action that is in the midst of being an action cache hit. Concretely, suppose that the user builds A, then requests C and D. C depends on A, D depends on B, which is a shared action with A. If B executes at just the right time, as C is finishing execution, C can think that it must add itself to B's execution path, which is incorrect. -- MOS_MIGRATED_REVID=134475095
* patch bootclasspath to allow javac to compile lambdas and method references ↵Gravatar Googler2016-09-28
| | | | | | | in android_* targets (behind existing flag). -- MOS_MIGRATED_REVID=134453743
* Implement input pruning using .d files in objc behind a flag that defaults toGravatar Cal Peyser2016-09-28
| | | | | | | false. -- MOS_MIGRATED_REVID=134452391
* Disallow mutation of values being iterated by a for loop or comprehensionGravatar Jon Brandvein2016-09-28
| | | | | | | | | This entails adding a read-locking mechanism to Mutability contexts. RELNOTES[INC]: Updating list/dicts while they are being looped over is not allowed. Use an explicit copy if needed ("for x in list(mylist):"). -- MOS_MIGRATED_REVID=134442701
* Fix visibility of proto srcsGravatar Klaus Aehlig2016-09-27
| | | | | | | | | | Of course, the sources of the buildevent protos should be visible by the including srcs targets. -- Change-Id: I76f5155990dd767d5eb46ad7150980589050217e Reviewed-on: https://bazel-review.googlesource.com/#/c/6290 MOS_MIGRATED_REVID=134414797
* Fixed EvaluationProgressReceiver object namesGravatar Googler2016-09-27
| | | | | | | | | | EvaluationProgressReceiver objects have two common naming schemes currently, and calling them invalidationReceiver is misleading, so to make the naming convention standard, all object names are based on "progressReceiver." -- MOS_MIGRATED_REVID=134411011
* In J2ObjC proto aspect, add a proto file blacklist to filter out unnecessary ↵Gravatar Rumou Duan2016-09-27
| | | | | | | protos from linking into the final binary. -- MOS_MIGRATED_REVID=134409481
* Refactor SkyframeExecutor#preparePackageLoading to pass all ↵Gravatar Janak Ramakrishnan2016-09-27
| | | | | | | | | PackageCacheOptions as a bundle. This will allow me to thread a new flag through more easily in the future. -- MOS_MIGRATED_REVID=134406676