aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com
Commit message (Collapse)AuthorAge
* Automated rollback of commit 86b4532769c22cca2ed7068a60f3326beaad34af.Gravatar juliexxia2018-01-04
| | | | | | | | | | | | | | *** Reason for rollback *** Probably breaking //javatests/com/google/devtools/build/lib:Query2Tests *** Original change description *** Restructure how universeScope is used when testing configured query to mimick impending changes to the configured query interface (CL/179872445) which will pull build targets out of the query expression. Fill in testTopLevelTransitions on the way! PiperOrigin-RevId: 180880350
* Restructure how universeScope is used when testing configured query to ↵Gravatar juliexxia2018-01-04
| | | | | | | | mimick impending changes to the configured query interface (CL/179872445) which will pull build targets out of the query expression. Fill in testTopLevelTransitions on the way! PiperOrigin-RevId: 180854150
* Allow late bound defaults in skylark aspectsGravatar cparsons2018-01-04
| | | | | RELNOTES: None. PiperOrigin-RevId: 180849649
* Move PatchTransition and kin to analysis.config.transitions.Gravatar gregce2018-01-04
| | | | | | | HostTransition can't be migrated yet because it depends on BuildConfiguration. PiperOrigin-RevId: 180842784
* Fix Action subclasses so that the execution platform is properly set inGravatar John Cater2018-01-04
| | | | | | | | | more cases. Part of #4128. Change-Id: Ife5e4581f91ac07931d193ed5eaa256aab3ad047 PiperOrigin-RevId: 180826445
* Propagate deps' objc providers with AppleLoadableBundleGravatar cparsons2018-01-04
| | | | | | | | This change allows turndown of top-level ObjcProvider propagation by apple_binary via --noexperimental_objc_provider_from_linked. ios test bundle rules depend on loadable bundle apple_binary, and require the binary's deps' objc providers -- thus this is the only mechanism to propagate these providers. RELNOTES: None. PiperOrigin-RevId: 180824037
* Remove defunct Android incremental dexing flagsGravatar kmb2018-01-04
| | | | | | RELNOTES: Remove defunct flags --experimental_incremental_dexing_for_lite_proto and --experimental_incremental_dexing_error_on_missed_jars that have long been enabled by default PiperOrigin-RevId: 180821902
* Extract LocalEnvProvider members to classes.Gravatar Laszlo Csomor2018-01-04
| | | | | | | | | | | | | | | | | | Create a PosixLocalEnvProvider and WindowsLocalEnvProvider class, with singleton instances for now. This refactoring should not change functionality, it's just a requirement for an upcoming change. That upcoming change is for these classes to respect the client environment's TMPDIR or TMP/TEMP envvars. See https://github.com/bazelbuild/bazel/issues/4376 Change-Id: I032bb6f18adf8af9e43e6bc543c09c58adae3863 PiperOrigin-RevId: 180799936
* Allows @AutoCodec to handle injected deserialization dependencies.Gravatar shahan2018-01-04
| | | | | | | * Adds an interface, InjectingObjectCodec, taking an injected parameter in its deserialize method. * Adds the annotation, @AutoCodec.Dependency, that can be used to indicate that a constructor parameter is a dependency instead of a normal parameter. PiperOrigin-RevId: 180797816
* Correct comment for OneVersionEnforcementLevelConverter.Gravatar Benjamin Peterson2018-01-04
| | | | | | | Fixup from copy-paste in c5672f8edb1cb9fb7806024706d776901d7d434e ("Add the option for warning-level enforcement of One Version violations.") Change-Id: I90909b2f14aa7a8e0beadb99a72c25ab71bc40d8 PiperOrigin-RevId: 180779047
* Consolidate GlobDescriptor functionalityGravatar michajlo2018-01-03
| | | | | | | | Makes GlobDescriptor directly implement SkyKey and adds custom serialization logic. This lets us narrow visibility and migrate yet another SkyKey away from LegacySkyKey. PiperOrigin-RevId: 180705483
* @AutoCodec: proper handling of checked exceptions thrown by constructors.Gravatar shahan2018-01-03
| | | | PiperOrigin-RevId: 180697983
* Adds the @AutoCodec.Constructor annotation for selecting constructors.Gravatar shahan2018-01-03
| | | | | | Uses the constructor having the @AutoCodec.Constructor annotation to generate a codec (instead of choosing the first in source code). This annotation is required when a class has more than one constructor. PiperOrigin-RevId: 180685902
* Expose platform flags for documentation purposes.Gravatar John Cater2018-01-03
| | | | | | | | | Also remove experimental tag from platform and toolchain flags in docs. Fixes #4372. Change-Id: I4e8f29273b52fbaabf9c97d1a7563f817601653f PiperOrigin-RevId: 180678722
* Consolidate calls to AnalysisUtils.getTopLevelTargetsWithConfigs which ↵Gravatar juliexxia2018-01-03
| | | | | | conveniently also makes it unnecessary to pass the entire LoadingResult when doing configured queries post analysis. PiperOrigin-RevId: 180676481
* Rework implementation of --nobuild_runfile_manifests.Gravatar Benjamin Peterson2018-01-03
| | | | | | | | | | | | | When --nobuild_runfile_manifests is passed, don't create runfiles input or output manifests at all. This seems better than creating fake manifest artifacts that are actually a middleman. Fail fast for local tests and the run command when --nobuild_runfiles_manifests is passed. (These cases were failing with obscure errors before under --nobuild_runfile_manifests-I just improved the messaging. See https://github.com/bazelbuild/bazel/issues/4177.) Change-Id: I351d26f746ecbe47016b58e4662768a5b6a72ff2 PiperOrigin-RevId: 180659571
* @AutoCodec: Uses sun.misc.Unsafe to retrieve fields for serialization.Gravatar shahan2018-01-02
| | | | | | | | This is fast (profiles indicate a 9% penalty vs getters) and does not require getters. * Also adds a Marshaller for java.util.regex.Pattern. * Minor fixes for codecs that were broken by this change. PiperOrigin-RevId: 180619680
* Change the default for value for experimental_skyframe_native_filesets now ↵Gravatar kush2018-01-02
| | | | | | | that most Google builds have it set to true. RELNOTES: None PiperOrigin-RevId: 180578926
* Make android_local_test use robolectric's framework manifest parser.Gravatar dannark2018-01-02
| | | | | RELNOTES: None PiperOrigin-RevId: 180562543
* Automated rollback of commit 46356dfa59428b665aa280ba4cbca6e449f73c5b.Gravatar laszlocsomor2018-01-02
| | | | | | | | | | | | | *** Reason for rollback *** causes github #4375 and #4373 *** Original change description *** Use an annotation preprocessor to validate SkylarkConfigurationField. RELNOTES: None. PiperOrigin-RevId: 180535458
* Don't output duplicate srcs when jar and sourcejar are the sameGravatar Auke Schrijnen2018-01-02
| | | | | | | | | | When a source jar is used as maven_jar the filegroup in the generated BUILD.bazel contains duplicate entries. This results in an error when the jar is used as a dependency (... is duplicated in the 'srcs' attribute of rule 'file'). This change simply doesn't write the duplicate entry to the BUILD.bazel file when the filenames are equal. Closes #4333. PiperOrigin-RevId: 180534960
* Enable switching def_parser's Windows target for remote executionGravatar Yun Peng2018-01-02
| | | | | | | | | | | | When --define EXECUTOR=remote is specified in bazel command, embedded tools 'def_parser' will be compiled remotely from source. Because def_parser itself is a cc_binary, if we want to compile it remotely, to avoid cycle dependency it cannot be a dependency of cc_toolchain. Therefore, we make it a dependency of cc rules. Change-Id: I77faf77238f8edd3585d0e5e5c780b14e9782a40 PiperOrigin-RevId: 180534568
* Add android_local_test rule to Bazel.Gravatar dannark2017-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This rule enables testing android_librarys locally in the jvm (as opposed to on a device). To use this rule with robolectric (robolectric.org), add the following to your WORKSPACE file: http_archive( name = "bazel_android", url = "...", ) load("@bazel_android//:setup_robolectric.bzl", "setup_robolectric") setup_robolectric() and then an android_local_test rule would need to add: "@bazel_android//:robolectric", to its dependencies. android_local_test( name = "MyTest", srcs = ["MyTest.java"], deps = [ "//java/app:lib", "@bazel_android//:robolectric", ], ) RELNOTES[NEW]: New android test rule, android_local_test. PiperOrigin-RevId: 180438995
* Remove obsolete ConfigurationTransition.SPLIT.Gravatar gregce2017-12-28
| | | | PiperOrigin-RevId: 180291093
* Remove synchronization from file system.Gravatar tomlu2017-12-28
| | | | | | | | | | After the path refactor we will no longer have path instances to synchronize on. The underlying OS file systems are already naturally thread safe, that is, their internal data structures cannot be damaged. Any further synchronization (eg. races between directory creation and deletion) has to be managed at the client level. The last attempt to do this failed because of races in FileUtils#createDirectoryAndParents on Windows. This method is now gone, replaced by a method from the Java framework that knows how to synchronize. PiperOrigin-RevId: 180290901
* Intern the BuildConfigurationValue.Key instances that we create. Currently ↵Gravatar janakr2017-12-28
| | | | | | | | | | we don't create too many of them, but it'll be nice to have this interning for future work in which there are many more of them. When comparing BuildConfiguration instances, compare their full BuildOptions fields, which can compare quickly due to fingerprint caching, as opposed to their raw options, which is slow. Also intern the map of Fragments that we create as part of a BuildConfiguration. There aren't too many of them either, but it means that equal Fragment sets can be compared using reference equality downstream. PiperOrigin-RevId: 180289334
* AutoCodec: support for ImmutableListMultimap, ImmutableMultimap and ↵Gravatar Googler2017-12-28
| | | | | | ImmutableMap types. PiperOrigin-RevId: 180288965
* Undo change to introduce methods to remove file system instance from Path.Gravatar tomlu2017-12-28
| | | | | | | | I no longer believe that it is worthwhile to remove the file system instance from Path. Measurements indicate that I can simply replace the Path implementation in one go and just leave the instance on the Path class. This CL was done entirely using IDE refactoring, so should be safe. PiperOrigin-RevId: 180287162
* After getting rid of LabelAndConfiguration, simplify some code by providing ↵Gravatar janakr2017-12-28
| | | | | | a ConfiguredTargetKey directly. PiperOrigin-RevId: 180285691
* Replace Attribute.ConfigurationTransition with ↵Gravatar gregce2017-12-28
| | | | | | | | | | | | | | | | config.transitions.ConfigurationTransitionProxy. The "proxy" part is to dissuade people from writing: void myfunc(ConfigurationTransition transition) signatures casually. Maybe that's actually a better name than "Transition". But I'd rather rename Transition to ConfigurationTransition in its own change if we want to do that. PiperOrigin-RevId: 180285321
* Rename some ClassObject/Provider-related methodsGravatar brandjon2017-12-28
| | | | | | | The terminology "field" is preferred over "key" for the components of a struct or struct-like object. RELNOTES: None PiperOrigin-RevId: 180269374
* AutoCodec features.Gravatar Googler2017-12-27
| | | | | | | | * Support for Optional, Iterable, Collection and proto types. * Support for getters that omit 'get' prefix. * Support for constructors that throw exceptions. PiperOrigin-RevId: 180235121
* Fix include scanner's absolute path handling.Gravatar tomlu2017-12-27
| | | | | | | | | When absolute include dirs are used we can discover absolute includes outside any known root. * Fix bug where we try to create an absolute exec path. Instead, make the exec path relative to the root directory '/'. * Reverse the condition we use to filter absolute includes. We can identify these by their fake root ('/') before we create a path and linearly check if it is a system include. PiperOrigin-RevId: 180217154
* Adds ObjectCodecs for FragmentOptions and BuildOptions.Gravatar Googler2017-12-27
| | | | PiperOrigin-RevId: 180211710
* Refactor Info classGravatar brandjon2017-12-27
| | | | | | | This simplifies the location field (now non-nullable), removes a couple redundant loc args, and clarifies the type's description and some javadoc. RELNOTES: None PiperOrigin-RevId: 180210943
* ObjectCodecs for all non-test FragmentOption subclasses.Gravatar Googler2017-12-27
| | | | PiperOrigin-RevId: 180202221
* Memoize equals and hashCode operations for BuildOptions. Currently, equality ↵Gravatar janakr2017-12-24
| | | | | | is so slow that if we have to compare many of them, the build can basically never finish. This is needed for a follow-up in which BuildOptions are part of many SkyKeys. PiperOrigin-RevId: 180056834
* Stop using AtomicLongMap in AbstractQueueVisitor.Gravatar tomlu2017-12-24
| | | | | | | This class generates tons of garbage. It's better to manually use a ConcurrentHashMap + AtomicLongs. RELNOTES: None PiperOrigin-RevId: 180053164
* @AutoCodec features and refactoring.Gravatar Googler2017-12-23
| | | | | | | | * Features - ImmutableList, Map, ImmutableSortedMap, and ProtocolMessageEnum types. * Refactoring - creates an abstraction, "Marshaller", to replace a big switch over supported types. * Cleanup - implements equals for most of the test classes. PiperOrigin-RevId: 180024241
* Enable local action execution statistics collection for sandboxed actions ↵Gravatar ruperts2017-12-22
| | | | | | | | | | | that use the DarwinSandboxedSpawnRunner. In particular, record metrics for user and system CPU execution time, block I/O and involuntary context switches. This feature is guarded behind a new option, --experimental_collect_local_sandbox_action_metrics. RELNOTES: None. PiperOrigin-RevId: 179980734
* Enable local action execution statistics collection for sandboxed actions ↵Gravatar ruperts2017-12-22
| | | | | | | | | | | | | that use either the LinuxSandboxedSpawnRunner or the ProcessWrapperSandboxedSpawnRunner. In particular, record metrics for user and system CPU execution time, block I/O and involuntary context switches. This feature is guarded behind a new option, --experimental_collect_local_sandbox_action_metrics. Note: We still need to enable execution statistics for the DarwinSandboxedSpawnRunner in a later change. RELNOTES: None. PiperOrigin-RevId: 179976217
* Replace Attribute.SplitTransition with config.transitions.SplitTransition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179948322
* Remove some dead code from AndroidIdeInfoProvider.Gravatar ajmichael2017-12-22
| | | | | RELNOTES: None PiperOrigin-RevId: 179947662
* Bump up the max number of changed files we INFO-log to 10.Gravatar nharmata2017-12-22
| | | | | RELNOTES: None PiperOrigin-RevId: 179944277
* PiperOrigin-RevId: 179941785Gravatar Googler2017-12-22
|
* Replace Attribute.Transition with config.transitions.Transition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179936355
* Remove more dead codeGravatar Googler2017-12-22
| | | | | RELNOTES: none PiperOrigin-RevId: 179933248
* PiperOrigin-RevId: 179932935Gravatar ajmichael2017-12-22
|
* Replaces some existing codecs with @AutoCodec.Gravatar Googler2017-12-22
| | | | PiperOrigin-RevId: 179931575
* Tell PackageFunction if it will never be used to do incremental package ↵Gravatar nharmata2017-12-22
| | | | | | | | | | | loading. Have PackageFunction optimize for the non-incremental case by not doing Skyframe [hybrid] globbing. Have AbstractPackageLoader use PackageFunction in non-incremental mode (recall that AbstractPackageLoader, by design, has no incrementality). Since AbstractPackageLoader now doesn't need GlobFunction, it now also doesn't need DirectoryListingFunction and therefore also doesn't need DirectoryListingStateFunction. In the entire Bazel codebase, DirectoryListingStateFunction is only used by DirectoryListingFunction. And DirectoryListingFunction's only use in package loading (in cases currently supported by AbstractPackageLoader*) is GlobFunction. *AndroidRepositoryFunction apparently uses DirectoryListingFunction, but AbstractPackageLoader doesn't yet support all Bazel repository types. We can address this in future changes, if needed. RELNOTES: None PiperOrigin-RevId: 179931359