aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Fix test that accidentally masked an exceptionGravatar brandjon2017-12-28
| | | | | | | Looks like the test was originally broken (to always pass) by https://github.com/bazelbuild/bazel/commit/01120026dc313ee7ad9ea95069a29252eb19173b and its roll-forward https://github.com/bazelbuild/bazel/commit/950310ff911da6c26339f4dc0b124487adc0cdbb. RELNOTES: None PiperOrigin-RevId: 180272998
* 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
* Mark toolchain_test as flaky until we can uncover the cause and fix it.Gravatar jcater2017-12-22
| | | | PiperOrigin-RevId: 179962502
* 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
* Remove dead android_resources codeGravatar Googler2017-12-22
| | | | | RELNOTES: none PiperOrigin-RevId: 179928735
* Remove some code leftover from back when BUILD file preprocessing was a ↵Gravatar nharmata2017-12-22
| | | | | | | thing. Also remove some TODOs that were leftover from before we added the caches used after a PackageFunction restart. RELNOTES: None PiperOrigin-RevId: 179926806
* Proxy archive interfaces through buffered inputGravatar George Gensure2017-12-22
| | | | | | | | | | | | | | | Internal bazel use of compressed archives, exemplified through repository inspection, is utilizing a single-byte read syscall over all, possibly extremely large, archives, with substantial syscall roundtrip penalties. Time spent fetching all archives for a workspace was observed to be <50% of the time without the fix (performing single- byte reads). Fixes #3397 Closes #3870. PiperOrigin-RevId: 179921752
* "Blaze" -> "Bazel" in message visible on CLIGravatar Chris Beach2017-12-22
| | | | | | | | | | | | Example message containing "Blaze" - should be "Bazel": $ bazel run //... ERROR: Blaze can only run a single target. Do not use wildcards that match more than one target. INFO: Elapsed time: 0.092s Closes #3665. PiperOrigin-RevId: 179921748
* remote: update default auth scopeGravatar Jakob Buchgraber2017-12-22
| | | | | | | | | The "cloud-platform" is a universal auth scope and also works for Google Cloud Storage (GCS). Thus the devstorage.read_write scope can be removed. Change-Id: I1ac3dbea82476acdb39956564964db737df8ed00 PiperOrigin-RevId: 179920302
* Move TargetCompleteEvent generation to the CompletionFunctionGravatar ulfjack2017-12-22
| | | | | | | | | | | | | | | | This change breaks without https://github.com/bazelbuild/bazel/commit/a0ea569f7df19b8284846a52854e73747f7ec005; if that change is rolled back, this change has to be rolled back as well. It was previously in ExecutionProgressReceiver, and directly hooked into Skyframe. Now that we have a way to post event bus events directly from Sky functions, we should just do that. Also, this allows us to access artifact metdata, since the completion function has all the necessary artifacts as dependencies, which in turn can be used to improve the build event protocol implementation, where we want to post URLs to the CAS, which requires knowing the checksum. PiperOrigin-RevId: 179903333
* Redo FileType to reduce generated garbage.Gravatar tomlu2017-12-22
| | | | | | | | | | | | | * Change FileType to no longer assume it operates on just the base name (it can now be given a full path). * Move the responsibility to specific classes (Artifact, Path, PathFragment) to decide how they want to offer up a string that includes the file name. * Flip the order in which users are expected to check Artifact type, from FileType#matches(Artifact) to Artifact#isFileType(FileType). This looks natural and should encourage developers to use efficient file type checking methods. * Change CppCompileAction to use the new API. RELNOTES: None PiperOrigin-RevId: 179903239
* Remove testing flag --internal_do_not_export_builtinsGravatar brandjon2017-12-21
| | | | | | | Also add a @VisibleForTesting accessor to SkyframeExecutor. RELNOTES: None PiperOrigin-RevId: 179875655
* Open source the option processor tests.Gravatar ccalvarin2017-12-21
| | | | | | | The @Option annotation processor tests verify that the processor generates the correct errors at compile time. RELNOTES: None. PiperOrigin-RevId: 179872837
* Remove implicit dependency on //net/proto2/bridge/public:message_downgrader.Gravatar ckennelly2017-12-21
| | | | | RELNOTES: None PiperOrigin-RevId: 179866092
* Some performance improvements to AbstractPackageLoader.Gravatar nharmata2017-12-21
| | | | | | | | | (i) Share the syscall cache used for legacy globbing with the CachingPackageLocator also used by legacy globbing, otherwise it's not very "caching" :( (ii) Have the concurrency level of the syscall cache used by legacy globbing be set to the number of legacy globbing threads. This actually isn't a huge deal because of (i), since that removes a ton of duplicate cache lookups that would otherwise contend, but there's no reason not to do this. RELNOTES: None PiperOrigin-RevId: 179865599
* Only return a nocopts matcher if the attribute is explicitly specified.Gravatar tomlu2017-12-21
| | | | | | | Previously we'd return a matcher even for empty attributes. Pattern matching in Java generates garbage. RELNOTES: None PiperOrigin-RevId: 179864316
* Call through to Path#createDirectoryAndParents from FileUtils.Gravatar tomlu2017-12-21
| | | | | | | | | | | | This CL removes a method that due to its implementation causes threading difficulties for Path#createDirectory. The tests for the method are brought across to FileSystemTests since the methods are now implemented natively by the FileSystem classes. The tests were also cleaned up. The test revealed an edge case bug in JavaIoFileSystem, so fix this. In two cases some code was using the return value from the old method. Returning "false" essentially means that the directory already existed, and the code doesn't look racy, so we can replace it with an existence check. PiperOrigin-RevId: 179864042
* Move config transition definitions out of lib.packages.Attribute.Gravatar gregce2017-12-21
| | | | | | | | | | | | | This cleans up a legacy API from Bazel's "static configuration" days, when transition definitions involved deep and complex logic in the analysis code. That was too much cruft to embed into lib.packages. But the modern definitions are way simpler and thus easier to embed. This change only *copies* the existing definitions. Because a lot of references will have to be updated, we'll migrate the move over a few changes. PiperOrigin-RevId: 179859293
* Warn about config expansions as we do for other expansions.Gravatar ccalvarin2017-12-21
| | | | | | | | | If an expanded value overrides an explicit value, users who do not know the contents of the expansion may be surprised. We already warned about this for hard-coded expansions, and this is now applicable for --config expansions as well. This will only warn when a single-valued option has its value replaced. Options that accumulate multiple values in a list (e.g., --copt) will silently include both explicit and expanded values. RELNOTES: None. PiperOrigin-RevId: 179857526
* Change Mock xcrunwrapper dependency to accurately be a sh_binary instead of ↵Gravatar cparsons2017-12-21
| | | | | | | | | a file. This allows writing java tests for skylark rules which might need to depend on a sh_binary xcrunwrapper. RELNOTES: None. PiperOrigin-RevId: 179857352
* Deprecate "xctest" attribute from ios_test. This removes any functionality ↵Gravatar kaipi2017-12-21
| | | | | | related to using xctest = 0, but keeps the attribute to not break the users who have xctest = 1. PiperOrigin-RevId: 179855856
* Fix AliasRule to skip platform and toolchain resolution.Gravatar John Cater2017-12-21
| | | | | | | | | This causes a cycle in loading when an alias of a platform or constraint is used. Fixes https://github.com/bazelbuild/rules_go/issues/1161 Change-Id: I8b19ba94bfc52221416a3d99f5e5d4d80ce15bbd PiperOrigin-RevId: 179853665
* Remove ConfigurationTransition.HOST.Gravatar gregce2017-12-21
| | | | | | Use HostTransition.INSTANCE instead. PiperOrigin-RevId: 179851769
* @AutoCodec features.Gravatar Googler2017-12-21
| | | | | | | * POLYMORPHIC strategy. * Support for int and Map.Entry types. PiperOrigin-RevId: 179851237
* Automated rollback of commit 43f45b58acf10beadbb1221b71dfa06fa1341510.Gravatar jcater2017-12-21
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks some remote execution clients. *** Original change description *** Have the RemoteSpawnRunner use the execution platform present in the Spawn to get the remote execution properties. Fixes #4128. Change-Id: I7e71caef2465204d2dd8225448d54e52366807e6 PiperOrigin-RevId: 179847553
* Terminate --javacopt flags with `--`Gravatar cushon2017-12-21
| | | | | | | | | | | | JDK 9 adds javac flags that start with `--`, so we can't assume that `--` flags belong to JavaBuilder or turbine. Instead, we will use `--` by itself as a delimiter to parse e.g. `--javacopts --release 8 -- sources Hello.java`. This change cannot be released until versions of turbine and JavaBuilder are released that support the trailing `--`. After it is included in a Blaze release the other tools will be updated again to require the trailing `--`. PiperOrigin-RevId: 179847276
* Roll forward ↵Gravatar cushon2017-12-21
| | | | | | https://github.com/bazelbuild/bazel/commit/26b7ea6a37961ce993afe510d0ff8c1b5ecb30bc PiperOrigin-RevId: 179847149
* Remove final accessors of ConfigurationTransition.HOST.Gravatar gregce2017-12-21
| | | | | | | Also lean interfaces from Attribute.ConfigurationTransition to Attribute.Transition. PiperOrigin-RevId: 179846158
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179845261
* Remove android_resources and "resources" attributeGravatar Googler2017-12-21
| | | | | RELNOTES: none PiperOrigin-RevId: 179844898
* Terminate --javacopts in tests with --Gravatar cushon2017-12-21
| | | | PiperOrigin-RevId: 179841278
* Consolidate instances of the --loading_phase_threads flag.Gravatar juliexxia2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179838936