aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
* Add crosstool_lib.bzl and crosstool_utils.bzlGravatar hlopko2018-03-21
| | | | | | | | These will be used to rewrite current crosstool autoconfiguration into action_configs and features. RELNOTES: None. PiperOrigin-RevId: 189888171
* Allow android_library rule to also accept rules that provide the JavaInfoGravatar Googler2018-03-20
| | | | | | | provider as an input. RELNOTES: PiperOrigin-RevId: 189868401
* Mark //src/test/java/com/google/devtools/build/lib/skylark:SkylarkTests as ↵Gravatar ruperts2018-03-20
| | | | | | | flaky. RELNOTES: None. PiperOrigin-RevId: 189833678
* Bug fix to allow timeout errors for remote spawns.Gravatar Googler2018-03-20
| | | | | | TESTED=unit RELNOTES: None PiperOrigin-RevId: 189818481
* Add EnumMapCodec. Some hackery necessary to get Class for Enum when map is ↵Gravatar janakr2018-03-20
| | | | | | | | | | empty. Since EnumMap.equals() ignores the key type when the maps are empty [1], we could just return a canonical empty EnumMap, but that seems to depend on implementation details in a hacky and potentially subtly broken way. The Unsafe method will hopefully break spectacularly if it goes wrong. [1] http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/util/EnumMap.java#l685 PiperOrigin-RevId: 189803280
* Force @SkylarkCallable Params with defaultValue = "None" to be noneable.Gravatar cparsons2018-03-20
| | | | | | | | Previously, usage was fairly inconsistent. From now on, if the @Param is mandatory, use defaultValue = "" instead. RELNOTES: None. PiperOrigin-RevId: 189777905
* Add ability to shallow-freeze individual objectsGravatar brandjon2018-03-20
| | | | | | | | | Clarify that the IMMUTABLE Mutability should only be used for deeply immutable things, not tuples. Created a new SHALLOW_IMMUTABLE Mutability for them. Note that the new shallow-freezing functionality marks things as deeply IMMUTABLE without traversing its contents. I.e., it lies, and it is up to the caller to ensure this doesn't cause problems. RELNOTES: NONE PiperOrigin-RevId: 189767422
* Allow path options to use user specific pathsGravatar David Ostrovsky2018-03-20
| | | | | | | | | | | | | | | | | | | | | Fixes #2054. Allow users to be able to specify user specific paths. With this option we can now commit bazel configuration file and force local action cache activation per default: $ cat tools/bazel.rc build --experimental_local_disk_cache_path=~/.gerrit/bazel-cache/cas build --experimental_local_disk_cache build --experimental_strict_action_env Test Plan: $ bazel test //src/test/java/com/google/devtools/build/lib:util_test Closes #4852. PiperOrigin-RevId: 189744599
* Automated rollback of commit 72d28f3efc2842510a34cacd930c0204143f7412.Gravatar shreyax2018-03-19
| | | | | | | | | | | | | | | | | | | | | | | | Fix skylark caching to properly include transitive dependencies when there is a diamond-like dependency in the loaded bzl files. Also add guards to make sure we're not attempting to cache skylark files that transitively request a dependency that is in error. *** Reason for rollback *** Looking for source of non-determinism *** Original change description *** Automated rollback of commit 7ba939dfd5df48903929e9c14ebd0449656403e4. *** Reason for rollback *** Likely cause for non-determinism in skyframe *** Original change description *** Cache SkylarkLookupImportValues in memory so that we don't recompute them multiple times. PiperOrigin-RevId: 189686604
* Automated rollback of commit e6af9f9178e731a45e552b1d249ded90124945ba.Gravatar janakr2018-03-19
| | | | | | | | | | | | *** Reason for rollback *** See linked bug. *** Original change description *** Add behavior to NestedSetCodec to prevent it from running during testing. PiperOrigin-RevId: 189663863
* Use ConfiguredTargetAndData in some android tests and pass in the target ↵Gravatar janakr2018-03-19
| | | | | | configuration in getImplicitOutputArtifact. PiperOrigin-RevId: 189654578
* Add some testing methods to get ConfiguredTargetAndData more easily, and ↵Gravatar janakr2018-03-19
| | | | | | rename some methods that were still called ConfiguredTargetAndTarget. Move some tests over to using ConfiguredTargetAndData instead of calling ConfiguredTarget#getConfiguration() directly. PiperOrigin-RevId: 189642264
* Expose the j2objc configuration fragment, with field dead_code_report, ↵Gravatar cparsons2018-03-19
| | | | | | | matching build flag --j2objc_dead_code_report. RELNOTES: The 'j2objc' configuration fragment is exposed to Skylark. PiperOrigin-RevId: 189630012
* Add behavior to NestedSetCodec to prevent it from running during testing.Gravatar cpeyser2018-03-19
| | | | PiperOrigin-RevId: 189602622
* RELNOTES: Allow C++ features to make proto_library emit smaller C++ codeGravatar Googler2018-03-19
| | | | PiperOrigin-RevId: 189589977
* @AutoCodec some expressions that show up in Java configured targets.Gravatar janakr2018-03-16
| | | | PiperOrigin-RevId: 189419493
* Propagating remote results, including stdout/err, to Bazel on execution ↵Gravatar olaola2018-03-16
| | | | | | | | | timeouts. The refactoring to have an Exception that contains partial results will also be used in the next CL, in order to propagate and save remote server logs. RELNOTES: None PiperOrigin-RevId: 189344465
* Pass all TreeArtifacts to the ParameterWriteFileAction so they're expanded ↵Gravatar Googler2018-03-16
| | | | | | | | | | | by the time the action runs. Tested: custom_blaze build experimental/users/kmensah/cc_proto_library:libnon_android_example.so --config android_x86 -s RELNOTES: Properly handle tree artifacts on the link command line coming from a cc_library dependency. PiperOrigin-RevId: 189344192
* Refactor DependencyResolver#dependentNodeMap to take in a set of toolchain ↵Gravatar juliexxia2018-03-16
| | | | | | labels instead of the entire toolchain context since that's all the dependency resolver really needs. This will help make cquery transitions outputter easier to implement. PiperOrigin-RevId: 189342812
* Delete 1.2k lines of dead code.Gravatar carmi2018-03-16
| | | | | RELNOTES: None PiperOrigin-RevId: 189317851
* Inline and delete artifactPrefix, which is never assigned.Gravatar carmi2018-03-15
| | | | | RELNOTES: None PiperOrigin-RevId: 189292736
* Makes leaf level AutoCodec marshallers into runtime codecs.Gravatar shahan2018-03-15
| | | | | | Next change will convert containers. PiperOrigin-RevId: 189261293
* Remove unused files. Most of the functionality contained in these files has ↵Gravatar kaipi2018-03-15
| | | | | | already been migrated to github.com/bazelbuild/rules_apple. PiperOrigin-RevId: 189245171
* Begins cleanup to allow ActionFS to be injected into all action executions.Gravatar shahan2018-03-15
| | | | PiperOrigin-RevId: 189244665
* Optimize GC churn due to PackageFunction#getContainingDirectory. While I'm ↵Gravatar nharmata2018-03-15
| | | | | | | | | here, also slightly restructure the code in #handleLabelsCrossingSubpackagesAndPropagateInconsistentFilesystemExceptions to make it more readable (and defer PackageIdentifier allocations). Alternatives considered: Add a PathFragment#getParentDirectoryOfRelative(String other) instance method, and use it in PackageFunction#getContainingDirectory. I thought the approach in this CL would be preferable to adding a specialized method like that to PathFragment. RELNOTES: None PiperOrigin-RevId: 189197855
* Ensure that only ObjC tests initialize the MockObjcSupport.Gravatar jcater2018-03-15
| | | | PiperOrigin-RevId: 189181919
* Splits the iterableMarshaller into runtime codecs.Gravatar shahan2018-03-14
| | | | | | Makes NestedSetCodec into a runtime codec instead of a Marshaller. PiperOrigin-RevId: 189110883
* Dedupes aspects in BuildViewGravatar Googler2018-03-14
| | | | | | | This change ensures that there is no duplicate aspect in AnalysisResult. RELNOTES: None PiperOrigin-RevId: 189086095
* Clean up tests of temp dirs in CcCommonTest to properly set the host CPU.Gravatar jcater2018-03-14
| | | | | | Also have each method only test one CPU value, for easier debugging. PiperOrigin-RevId: 189081488
* Delete unused method.Gravatar carmi2018-03-14
| | | | | RELNOTES: None PiperOrigin-RevId: 189065642
* Bazel: add ar_files/as_files to cc_toolchain targetsGravatar Googler2018-03-14
| | | | | | | | These are mostly tests. This is a step toward making the ar_files/as_files attributes mandatory. RELNOTES: None. PiperOrigin-RevId: 189052327
* Remove unused files.Gravatar kaipi2018-03-14
| | | | PiperOrigin-RevId: 189023695
* Allow BazelPackageLoader to load external repositories.Gravatar carmi2018-03-13
| | | | | | | | | Also, disallow BazelPackageLoader from fetching missing external repos. Integration tests for BazelPackageLoader wrt external repos will be left for a follow-up CL. RELNOTES: None. PiperOrigin-RevId: 188967694
* Deleted implementation of internal_bootstrap_hack from Blaze.Gravatar Googler2018-03-13
| | | | | | | | | | | | | | As of unknown commit, internal_bootstrap_hack no longer appears in any BUILD files, so once that CL is clearly landed (without rollback) we should be able to submit this CL. There are still some users who set --experimental_js_proto_generate_js_even_for_bootstrap (including tools/blaze.blazerc), so we can't remove that flag until all references are removed. RELNOTES: internal_bootstrap_hack has been deprecated and removed. PiperOrigin-RevId: 188952693
* Integrate memoization into standard serialization. This involves a number of ↵Gravatar janakr2018-03-13
| | | | | | | | | | | | | | | | large changes: 1. SerializationContext and DeserializationContext become the owners of the Memoizer if requested. They produce new versions of themselves on demand that are memoization-aware. Because of intricacies of Skylark that I do not fully understand, we inject a Mutability object when starting memoization, and so to be conservative, that injection starts up a new memoization frame, nested if we were already memoizing, just like before. It would be nice to decouple this injection from memoization in the future. 2. MemoizingCodec is deleted, but really ObjectCodec becomes MemoizingCodec, so it lives on. BaseCodec is deleted since it now has only one implementation. 3. The simplified model of registering MemoizingCodecs is adopted for ObjectCodecs: all codecs are registered based on their #getEncodedClass and #additionalEncodedSubclasses. This also allows us to register codecs that are defined using tricky parameter types, since we're no longer trying to reflectively examine them. This required a clean-up of such codecs, and the addition of ArrayListCodec to stop NullableListCodec from making lists unmodifiable when they shouldn't be. 4. @AutoCodec is extended to allow users to specify that memoization should start with this codec. To ensure bit-equivalence, SkyKeySerializer disables memoization. PiperOrigin-RevId: 188918251
* Integrate import_deps_checker into aar_import.Gravatar cnsun2018-03-13
| | | | | RELNOTES: Enable dependency checking for aar_import targets. PiperOrigin-RevId: 188912126
* Clean up testing of constraint-based selects to not rely on anything that ↵Gravatar John Cater2018-03-13
| | | | | | | | | uses toolchains. Closes #4833. Change-Id: I9f58dc98cc00d0b2246d479d33a5086114d95073 PiperOrigin-RevId: 188882007
* Remove assumption from test that /a and /b don't exist.Gravatar buchgr2018-03-13
| | | | | | | | | | The updated test cases in the InMemoryFileSystemTest make the assumption that /a and /b are not prefixes of the InMemoryFilesystemTest.workingDir field. This is not safe and thus use a randomly generated directory name instead of a hardcoded one. PiperOrigin-RevId: 188872604
* PiperOrigin-RevId: 188862123Gravatar lpino2018-03-13
|
* Make DeployArchiveBuilder fetch the C++ toolchain identifier throughGravatar lberki2018-03-13
| | | | | | | | | CcToolchainProvider instead of BuildConfiguration. This is a step towards removing BuildConfiguration#getPlatformName(). RELNOTES: None. PiperOrigin-RevId: 188862029
* tests: add TimestampGranularityUtilsGravatar laszlocsomor2018-03-13
| | | | | | | | | | | | | | Add a new test utility class TimestampGranularityUtils which offers methods to wait for the filesystem timestamp granularity to pass. Such waiting is necessary if a test asserts changes in a file's mtime or ctime. This is a follow-up to comments on https://github.com/bazelbuild/bazel/commit/a31e035fb42aa8db9fd248ef2ebd665a411053b8. PiperOrigin-RevId: 188847729
* Fix toolchain and execution platform registration to use patterns.Gravatar John Cater2018-03-12
| | | | | | | | This allows more flexibility in registering toolchains and execution platforms, both in the WORKSPACE and from the command-line. Change-Id: I6fe75507d1a74de74085b7c927fdf093c152b894 PiperOrigin-RevId: 188813688
* Automated rollback of commit 7ba939dfd5df48903929e9c14ebd0449656403e4.Gravatar shreyax2018-03-12
| | | | | | | | | | | | *** Reason for rollback *** Likely cause for non-determinism in skyframe *** Original change description *** Cache SkylarkLookupImportValues in memory so that we don't recompute them multiple times. PiperOrigin-RevId: 188729929
* Unify action_configs for static librariesGravatar hlopko2018-03-12
| | | | | | | | | | | We don't need to separate them into 4 different flavours, all crosstools define them identically anyway. RELNOTES: CppRules: Unified action_configs for static libraries From now on only c++-link-static-library is read. PiperOrigin-RevId: 188726352
* remote: fix flakiness of HttpBlobStoreTest on Windows.Gravatar buchgr2018-03-12
| | | | | | | | Increase the connect timeout to 30 seconds Windows sometimes seems to need more time. RELNOTES: None PiperOrigin-RevId: 188702864
* Get rid of non-class-based lookups for ObjectCodecs. There were basically no ↵Gravatar janakr2018-03-10
| | | | | | | | remaining non-test users (ErrorInfoEncoder was it). Should help to simplify our codec registration. I want to converge MemoizingCodec and ObjectCodec, and the unnecessary complexity around ObjectCodec registration is annoying. PiperOrigin-RevId: 188620988
* Open-source ImmutableMapCodec and make it able to handle arbitrary ↵Gravatar janakr2018-03-10
| | | | | | | | | | keys/values without injecting the codecs. Also allow it to handle ImmutableSortedMap, since we were always silently degrading to ImmutableMap for objects that weren't declared as ImmutableSortedMap, and there's no good way to handle non-natural comparators. This will lead to runtime failures if a class actually needs an ImmutableSortedMap with a different comparator than the natural one. This changes the semantics of ImmutableMap serialization. Previously, we went off the declared type. In the case of a declared ImmutableSortedMap, we ignored the comparator, potentially leading to incorrect serialization (new test added in AutoCodecProcessorTest that would have caught that). Moreover, declared ImmutableMaps were deserialized as ImmutableMaps even if they were actually ImmutableSortedMaps. Now, we preserve the ordering unconditionally, and preserve the type if possible. I think this is a better state to be in. This is needed to kill off MemoizingCodec, since MemoizingCodec has an ImmutableMapMemoizingCodec, which I want to get rid of in favor of this. PiperOrigin-RevId: 188619637
* Add BuildConfiguration to ConfiguredTargetAndTarget and rename it to ↵Gravatar janakr2018-03-10
| | | | | | ConfiguredTargetAndData. We want to get BuildConfiguration out of ConfiguredTarget because it uses >800K when serialized. PiperOrigin-RevId: 188600002
* ActionOwner references only BuildEvent instead of full BuildConfigurationGravatar shahan2018-03-10
| | | | | | This reduces the size of its serialized representation. PiperOrigin-RevId: 188597127
* remote/http: support refresh of oauth2 tokens in the remote cache.Gravatar Jakob Buchgraber2018-03-10
| | | | | | Closes #4622. PiperOrigin-RevId: 188595430