aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
Commit message (Collapse)AuthorAge
...
* Removed extra .useDefaultShellEnvironment()Gravatar jingwen2018-01-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 182566009
* Add a codec for LanguageDependentFragment and LibraryLanguage. Switch the onlyGravatar Googler2018-01-19
| | | | | | | | constructor of a LanguageDependentFragment to use an ImmutableSet instead of a HashSet. RELNOTES: None. PiperOrigin-RevId: 182555522
* Fix usages of PathFragment segments that will become inefficient.Gravatar tomlu2018-01-19
| | | | | | | An upcoming replacement to PathFragment will not have efficient segment semantics, causing code to become unnecessarily inefficient. RELNOTES: None PiperOrigin-RevId: 182553098
* Hoist "continue" statement outside of inner loop.Gravatar nharmata2018-01-19
| | | | | RELNOTES: None PiperOrigin-RevId: 182546239
* Rename relativePath -> rootRelativePath in Root and friends.Gravatar tomlu2018-01-19
| | | | | | This makes it clearer that the path fragments in question are relative *to the root*. Confusingly, when the root is absolute, the root relative fragment is also absolute. This makes it a tiny bit clearer that the path fragment may be absolute. PiperOrigin-RevId: 182544893
* Add new flag to add additional execution platforms.Gravatar John Cater2018-01-19
| | | | | | | Part of #4442. Change-Id: Ie263be75b85635717aa5670cf059891e644dfaee PiperOrigin-RevId: 182537464
* Replaced 'legal' by 'valid' in some documentation.Gravatar Googler2018-01-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 182528996
* Inline rarely used PathFragment methods that do not deserve to be on a core ↵Gravatar tomlu2018-01-19
| | | | | | path class. PiperOrigin-RevId: 182526427
* Prevent broken cache entries on concurrent file changesGravatar ulfjack2018-01-19
| | | | | | | | | | | | | | | | Local execution has an inherent race condition: if a user modifies a file while an action is executed, then it is impossible for Bazel to tell which version of the file was actually read during action execution. The file may have been modified before or after the tool has read it, or, in the worst case, the tool may have read both the original and the modified version. In addition, the file may be changed back to the original state before Bazel can check the file, so computing the digest before / after may not be sufficient. This is a concern for both local and remote caches, although the cost of poisoning a shared remote cache is significantly higher, and is what has triggered this work. Fixes #3360. We solve this by keeping a reference to the FileContentsProxy, and using that to check for modificaitons before storing the cache entry. We output a warning if this check fails. This change does not increase memory consumption; Java objects are always allocated in multiples of 8 bytes, we use compressed oops, and the FileArtifactValue currently has 12 bytes worth of fields (excl. object overhead), so adding another pointer is effectively free. As a possible performance optimization on purely local builds, we could also consider not computing digests at all, and only use the FileContentsProxy for caching. PiperOrigin-RevId: 182510358
* User can never explicitly set generator_* attributes. So it should beGravatar Googler2018-01-18
| | | | | | | nonconfigurable. RELNOTES: generator_* attributes are nonconfigurable. PiperOrigin-RevId: 182443578
* Add a way for BaseCodecs to register association with subtypesGravatar brandjon2018-01-18
| | | | | | Also add accessor to SkylarkInfo for the custom error message, and expose its concrete implementation classes for the benefit of reflection. PiperOrigin-RevId: 182443146
* Remove ConfigurationTransitionProxy.NONE and ↵Gravatar gregce2018-01-18
| | | | | | | | BaseRuleClasses.DYNAMIC_TRANSITION_MAP. This leaves DATA as the last remaining legacy transition. PiperOrigin-RevId: 182422552
* Address post-commit comments in ↵Gravatar nharmata2018-01-18
| | | | | | | https://github.com/bazelbuild/bazel/commit/6f35e2d81a4d10359d39643bd03887d1b87f4224. RELNOTES: None PiperOrigin-RevId: 182415982
* Clean up ArtifactRoot.Gravatar tomlu2018-01-18
| | | | | | | * Use an enum instead of booleans and null fields having special meaning. * Remove the exec root from ArtifactRoot. This is only used to calculate artifact exec paths, which can be done from the root's exec path and the root relative path. PiperOrigin-RevId: 182411710
* Fix aar_import.deps to propagate jars.Gravatar ajmichael2018-01-18
| | | | | | | | | | | | Previously, aar_import.deps only worked for resource files and aar_import.exports worked for both resource files and Java. Now, aar_import.deps works for both as well with the same semantics as exports. This is not ideal, but it is how java_import.deps currently works. Fixes https://github.com/bazelbuild/bazel/issues/4472 RELNOTES: None PiperOrigin-RevId: 182405741
* Fix bug where an was-inflight-and-is-about-to-be-done NodeEntry has ↵Gravatar nharmata2018-01-18
| | | | | | | | | | | | | | | | | | | | incomplete deps that need to be removed, and these deps are currently duplicated in the NodeEntry's newly requested deps GroupedList. Also add a fast-path to GroupedListHelper#remove(List<Object> elements, Set<E> toRemove) for the incredibly common case where toRemove is empty. This saves a wasteful O(elements.size()) scan over elements. This method is unconditionally called each time a SkyFunction restart causes us to add new direct deps (with elements=<the new direct deps> and toRemove=<unfinished direct deps>); in the case where there are a ton of new direct deps, this scan entails wasted cpu and gc churn. The bug only occurs in uncommon case that there are deps to remove. The bug has existed since GroupedList was first introduced into the codebase. In Skyframe-land, this is only observable in nokeep_going mode because in keep_going mode "we do not let SkyFunctions throw errors with missing deps" (quote from comment in AbstractParallelEvaluator). A Bazel-on-Skyframe-land example how this bug could occur in practice is PackageFunction's Skyframe hybrid globbing. If an io error is encountered during legacy globbing, the PackageFunction eagerly throws a SkyFunctionException but it has already requested the Skyframe GlobValue deps. RELNOTES: None PiperOrigin-RevId: 182403943
* Add absolute root concept.Gravatar tomlu2018-01-18
| | | | | | | | An absolute root accepts any absolute path fragments and simply returns it. This concept replaces the FileSystem root directory concept. PiperOrigin-RevId: 182400471
* Add a missing format argument to an error messageGravatar cushon2018-01-18
| | | | PiperOrigin-RevId: 182396321
* Add TestUtils#ConstantStringCodecGravatar brandjon2018-01-18
| | | | | RELNOTES: None PiperOrigin-RevId: 182390511
* Include the list of 'excludes' glob patterns in the error message used when ↵Gravatar nharmata2018-01-18
| | | | | | | an IOException is encountered from a Globber. The io error may have been encountered during evaluation of one of the 'excludes' patterns. RELNOTES: None PiperOrigin-RevId: 182390180
* Re-add WalkableGraph#isUpToDate and BuildDriver#alreadyEvaluatedGravatar Googler2018-01-18
| | | | | RELNOTES: None PiperOrigin-RevId: 182389876
* Add serialization codec for SkylarkImports. This is needed to serialize ↵Gravatar janakr2018-01-18
| | | | | | | | SkylarkAspectLoadingKey. Also add a @VisibleForSerialization annotation to @AutoCodec, since we're going to need to increase serialization visibility a lot here, and clean up some unnecessary modifiers. PiperOrigin-RevId: 182389162
* Start the process of getting Target out of ConfiguredTarget: add a new ↵Gravatar janakr2018-01-18
| | | | | | | | | | | | container, ConfiguredTargetAndTarget, that can be used to access Targets, and deprecate ConfiguredTarget#getTarget. ConfiguredAndTargetObjects are intended to be limited in scope, not being persisted to Skyframe. The eventual plan is to remove the target field from ConfiguredTarget. This CL is mostly straightforward, except for dealing with AliasConfiguredTargets, which cause some complications. A significant cleanup is still needed before #getTarget can be removed, but I don't see any impossible blockers. We will may still need to store a Target-like object in ConfiguredTarget (that has the RuleClass, or at least a string representation of it, for instance), but that will let us avoid storing a full Target together with its associated Package. PiperOrigin-RevId: 182371566
* Create function createJavaInfo with new API. Implement JavaExportsProvider.Gravatar dbabkin2018-01-18
| | | | | | | | | | | | Added tests for checking JavaExportsProvider state. Refactored logic working with collection in favor of using Streams to improve readability. All other providers will be implemented in next CLs. previous CL with JavaCompilationArgsProvider implementation is https://github.com/bazelbuild/bazel/commit/32dff21d00ad7d1bdf50e8761d675a6e7e002de9, JavaSourceJarsProvider : https://github.com/bazelbuild/bazel/commit/5bd53cb609480ca896ca2d011f415b424c63ce63 RELNOTES:none PiperOrigin-RevId: 182342490
* Make comment more readable and correct.Gravatar nharmata2018-01-17
| | | | | RELNOTES: None PiperOrigin-RevId: 182272900
* Introduce Root class.Gravatar tomlu2018-01-17
| | | | | | | | | | | This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759
* Suggest 'bazel clean --expunge' to fix Xcode errors in AppleCcToolchain.Gravatar ruperts2018-01-17
| | | | | RELNOTES: None. PiperOrigin-RevId: 182271042
* Add deprecation warning message to mobile-install classic mode.Gravatar Googler2018-01-17
| | | | | | | | | We've notified the top classic users by email that classic mode is deprecated. As we are no longer actively supporting classic mode, we'd like users to move over to skylark. RELNOTES: None. PiperOrigin-RevId: 182268733
* Fix forbidding of If statements in BUILD filesGravatar brandjon2018-01-17
| | | | | | | | | The bug also permitted For statements in BUILD files so long as they were contained within an If statement (i.e. not at the top level). Also add minor guidance to error messages. RELNOTES: None PiperOrigin-RevId: 182236172
* [Autocodec] Add a ImmutableSetCodec. ImmutableCollections have a deterministicGravatar Googler2018-01-17
| | | | | | iteration order so we should be okay. PiperOrigin-RevId: 182235068
* Fix blaze crashes with running under JDK9.Gravatar tomlu2018-01-17
| | | | | RELNOTES: None PiperOrigin-RevId: 182223038
* Migrate Apple providers to abide by Native Declared Provider best practices.Gravatar cparsons2018-01-17
| | | | | | | This has the effect of documenting exposed struct fields on these providers. RELNOTES: None. PiperOrigin-RevId: 182221042
* Filter out generated proto extension registry loader from instrumentation APK.Gravatar Googler2018-01-16
| | | | | RELNOTES: None PiperOrigin-RevId: 182145172
* Codec for Location.Gravatar shahan2018-01-16
| | | | | | * Moves SingletonCodec to third_party. PiperOrigin-RevId: 182143153
* Have UnixGlob explicitly handle RuntimeExceptions encountered by individual ↵Gravatar nharmata2018-01-16
| | | | | | | glob tasks. RELNOTES: None PiperOrigin-RevId: 182125500
* Add assets support to aar_import.Gravatar ajmichael2018-01-16
| | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4439. Empty assets are handled by writing out an empty file named "assets/empty_asset_generated_by_bazel~", which will silently be ignored by AAPT. RELNOTES: aar_import now supports assets. PiperOrigin-RevId: 182110400
* Remove mtime field from FileStateValue.Gravatar janakr2018-01-16
| | | | | | We stopped treating empty files specially in the execution phase after unknown commit. So this code is mostly if not entirely orphaned. The only scenario in which this would lead to a semantic difference that I can think of is if the user is running with --nouse_action_cache and a running Bazel server, and they have an action they want to re-run when an empty input file changes, which isn't something we need to be concerned about. PiperOrigin-RevId: 182109952
* Default to filtering resources in analysisGravatar Googler2018-01-16
| | | | | RELNOTES: none PiperOrigin-RevId: 182100169
* Remove ConfigurationTransitionProxy.NULLGravatar gregce2018-01-16
| | | | PiperOrigin-RevId: 182099803
* Remove EventBus from SkyframeActionExecutorGravatar ulfjack2018-01-16
| | | | | | Post to the Skyframe Environment instead. PiperOrigin-RevId: 182096559
* Enable incremental dexing of proguarded Android binaries in Bazel (one ↵Gravatar kmb2018-01-16
| | | | | | | | | dexbuilder action by default). Binaries can opt in by adding "incremental_dexing = 1" attribute. RELNOTES: Proguarded Android binaries can be built with incremental dexing. PiperOrigin-RevId: 182092699
* Move RootedPathCodec to an inner class of RootedPath.Gravatar tomlu2018-01-16
| | | | PiperOrigin-RevId: 182087153
* Rename Root to ArtifactRoot.Gravatar tomlu2018-01-16
| | | | | | This is slightly more descriptive, and we will potentially want to use the name Root for a broader concept shared between ArtifactRoot and RootedPath. PiperOrigin-RevId: 182082367
* Fix value collision in builtins registryGravatar brandjon2018-01-16
| | | | | | | If two values compared equal (e.g., MethodLibrary#bool and SkylarkAttr#bool), we were dropping one of them in favor of the other. RELNOTES: None PiperOrigin-RevId: 182057611
* Support array fields in AutoCodec. To do this, introduceGravatar cpeyser2018-01-16
| | | | | | | SerializationCodeGenerator, which is a generalization of Marshaller that supports primitive and array values. PiperOrigin-RevId: 182053617
* Refactor py_wrap_cc to go through CcLibraryHelper.Gravatar plf2018-01-16
| | | | | RELNOTES:none PiperOrigin-RevId: 182051418
* Fix copy-paste error in py_test docsGravatar Rodrigo Queiro2018-01-16
| | | | | Change-Id: I5fa8412fe0673b71a6e17adb39be0a208ee54f63 PiperOrigin-RevId: 182048035
* C++: Fixes linkstamp not compiled with PIC.Gravatar plf2018-01-16
| | | | | RELNOTES:none PiperOrigin-RevId: 182044727
* Change the mnemonic of C++ link stamp compile actions so that extra actions ↵Gravatar lberki2018-01-16
| | | | | | | can be attached to C++ compile actions without tickling the bug that makes Blaze crash when extra actions are attached to shared actions that do input discovery. RELNOTES: None. PiperOrigin-RevId: 182044169
* Automated rollback of commit dafe71390340224e06eab0ac7afcebb2f5219f5a.Gravatar dslomov2018-01-16
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks Bazel CI (https://ci.bazel.build/job/bazel-tests/1722/) *** Original change description *** Report unsuccessful error code if bazel fetch fails in "keep going" mode. Fixes #3234. PiperOrigin-RevId: 182042503