aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google
Commit message (Collapse)AuthorAge
* Propagate skylark flags to WORKSPACE and repo rulesGravatar brandjon2017-10-24
| | | | | RELNOTES: Skylark semantics flags now affect WORKSPACE files and repository rules. PiperOrigin-RevId: 173130286
* Fix resource generation in android_testGravatar Googler2017-10-24
| | | | | RELNOTES: none PiperOrigin-RevId: 173128623
* Preserve `pass` statements in the Skylark AST.Gravatar fzaiser2017-10-23
| | | | | RELNOTES: none PiperOrigin-RevId: 173125138
* Change FileSystem#getDirectoryEntries to return strings of the ↵Gravatar tomlu2017-10-23
| | | | | | | | file/directory names instead of paths. This is a small isolated change that can be done ahead of the big refactoring. PiperOrigin-RevId: 173124518
* Memoize configuration supplier in InfoCommand. Previous implementation never ↵Gravatar janakr2017-10-23
| | | | | | | | actually assigned to the configuration, so we were redoing Skyframe graph setup each time. We still cached actual loading/analysis work, but unnecessarily injected precomputed values each time. This meant that in the "edge" case of not keeping edges, we were only succeeding by accident, because we never actually switched the evaluator to not keep edges. PiperOrigin-RevId: 173124505
* Automated rollback of commit 1b98de65873054b148ced772cfa827a7bfb5ad9a.Gravatar dslomov2017-10-23
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** If the 'set' function was used in a .bzl file but not called, --incompatible_disallow_set_constructor=True would allow the load of that .bzl file without error, but this change removes the 'set' function so loading that bzl file is an error. Example failure: https://ci.bazel.io/blue/organizations/jenkins/Global%2FTensorFlow/detail/TensorFlow/245/pipeline/ *** Original change description *** Remove the deprecated set constructor from Skylark The `set` constructor used to be deprecated, but it was still possible to use it by providing --incompatible_disallow_set_constructor=false. RELNOTES[INC]: The flag --incompatible_disallow_set_constructor is no longer available, the deprecated `set` constructor is not available anymore. PiperOrigin-RevId: 173115983
* Automated rollback of commit f9a379157d1e992390c5b6f0b75ef853e0870689.Gravatar lberki2017-10-23
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks a single, but very important target :( *** Original change description *** Remove OS/Xcode versions (and thus package loading) from AppleConfiguration.Loader. Fixes #3424. RELNOTES[INC]: Selecting on "xcode_version" and "{ios,tvos,macos,watchos}_sdk_version" is not supported anymore. What was config_setting(values={"$FOO_version": $VALUE}) is now config_setting(flag_values={"@bazel_tools//tools/osx:$FOO_version_flag": $VALUE}). PiperOrigin-RevId: 173085962
* Also disable Make variables in the host configuration in the Jvm fragment ↵Gravatar lberki2017-10-23
| | | | | | | when they are disabled in the target configuration. RELNOTES: None. PiperOrigin-RevId: 173083682
* Automatic code cleanup.Gravatar cushon2017-10-23
| | | | PiperOrigin-RevId: 173054453
* Add support for linker scripts in auto-linked Android native depsGravatar Googler2017-10-23
| | | | | | | Android's mechanism for automatically linking native deps does not currently support linker scripts. A dependency cc_library can specify the linker script in the linkopts and include it in its deps, but since the artifact is not provided as an input to the generated link action, this results in an error. This change provides the missing inputs and makes this work. RELNOTES: Support for linker scripts in NativeDepsHelper (e.g., android_binary) PiperOrigin-RevId: 172963605
* Post non-empty ActionResults for all completed Actions.Gravatar ruperts2017-10-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 172955521
* Micro-optimize mutablelist concatenationGravatar michajlo2017-10-23
| | | | | | | | Avoid ArrayList.addAll(Collection) winds up converting the collection to an array, which is wasteful on such a potentially hot code path. RELNOTES: None PiperOrigin-RevId: 172941634
* Move hard-coded compilation-mode-specific flags in ObjcConfiguration.Gravatar cpeyser2017-10-23
| | | | PiperOrigin-RevId: 172932367
* Fix changes that broke resource filtering, and document related confusionGravatar Googler2017-10-23
| | | | | | | | | | | | | | | | | | | | | | | | Recent changes: 1) Started passing all resources to processors, ignoring the filtered ResourceContainers, and 2) Started loading an unfiltered LocalResourceContainer into binary resource processing, in addition to the filtered container. Fix both of these. To fix the former, we need to split the misleadingly-named 'transitiveResourceRoots' (actually transitive resource and assets artifacts) into transitive resources and assets. Update resource filtering tests to catch bugs like these. Also, rename getters for resource containers to make clear that they are not getters for resources. Finally, document some weirdness and partially-completed migrations encountered as part of investigating these issues, and add appropriate TODOs and deprecation. RELNOTES: None PiperOrigin-RevId: 172929936
* Don't set globals in environments that aren't readGravatar brandjon2017-10-23
| | | | | | | There are two Environments involved in running an implementation callback for rules/aspects/repository-rules: (1) The static environment of the function's definition, and (2) the caller's dynamic environment. The function will only consult (1), so trying to set anything on (2) is misleading. RELNOTES: None PiperOrigin-RevId: 172929301
* Add tests for ToolchainUtil, and fix an error when there is an error andGravatar John Cater2017-10-23
| | | | | | | | | values are missing while fetching toolchains. Fixes #3928. Change-Id: I4fde784f56daf544ba70c9848e006f1183c20a99 PiperOrigin-RevId: 172922687
* Require semantics field for Environment.BuilderGravatar brandjon2017-10-23
| | | | | | | Follow-up of unknown commit. RELNOTES: None PiperOrigin-RevId: 172922507
* Expose a CcToolchainProvider that is generated by the legacy toolchain ↵Gravatar cpeyser2017-10-23
| | | | | | selection logic to skylark. PiperOrigin-RevId: 172921818
* Fix UnionFileSystem's implementation of supportsModifications and friends.Gravatar tomlu2017-10-23
| | | | | | It now correctly delegates to the right file system. PiperOrigin-RevId: 172916854
* Lazy-initialise rootPath in FileSystem.Gravatar tomlu2017-10-23
| | | | | | Path construction entails calling isFileSystemCaseSensitive at a time when subclasses have not been initialised. This can cause a crash. Solve by deferring init of the path. PiperOrigin-RevId: 172914501
* Be explicit about semantics of Skylark environmentsGravatar brandjon2017-10-23
| | | | | | | | | All callers that do not use Environment.Builder#setSemantics should call #useDefaultSemantics. A follow-up CL will enforce this requirement. Motivation: It's more important that we are strict about semantics than about the other builder args. It's too easy for a mistake in semantics to go unnoticed. RELNOTES: None PiperOrigin-RevId: 172912829
* Add a flag to disable Make variables in the C++ configuration.Gravatar lberki2017-10-23
| | | | | RELNOTES: None. PiperOrigin-RevId: 172901568
* Remove scope escaping capability from InMemoryFileSystem.Gravatar tomlu2017-10-23
| | | | | | | | Nobody sets a delegate anymore, meaning it should be fine to crash hard if we try to resolve a file outside scope. The CL was created by inlining ScopeEscapableFileSystem into InMemoryFileSystem, making it impossible to return an outOfScope file status (instead throwing an exception), then trivially fixing the code. PiperOrigin-RevId: 172886769
* Track expansions in OptionValueDescription.Gravatar ccalvarin2017-10-23
| | | | | | | Add warnings for behavior that is likely unexpected. Expansion values do not accept values at all, and implicit requirements are set regardless of whether the option was turned "on" or not, so warn in the cases where this weird behavior might rear its ugly head. RELNOTES: None PiperOrigin-RevId: 172883214
* Allow ClassObjects to throw EvalExceptions.Gravatar dslomov2017-10-23
| | | | | | | Preparations to fix https://github.com/bazelbuild/bazel/issues/3826. RELNOTES: None. PiperOrigin-RevId: 172876802
* Properly attaching context for remote uploads in RemoteSpawnCache.Gravatar olaola2017-10-20
| | | | | | | | Fixes #3930. Also added tests. TESTED=added tests RELNOTES: Fixing regression to --experimental_remote_spawn_cache PiperOrigin-RevId: 172852740
* Make UnionFileSystem eagerly resolve symlinks.Gravatar tomlu2017-10-20
| | | | | | This allows symlinks between multiple different file systems. InMemoryFileSystem uses this in some tests. This CL will allow deletion of ScopeEscapableFileSystem, one of two file systems that partially duplicate what UnionFileSystem does. PiperOrigin-RevId: 172823391
* Add useDefaultSemantics() to Enviornment.BuilderGravatar brandjon2017-10-20
| | | | | RELNOTES: None PiperOrigin-RevId: 172801656
* BEP: correctly report the cause of unbuilt targets if --noanalyze is givenGravatar Klaus Aehlig2017-10-20
| | | | | | | | | If bazel is asked to only load target, but not perform an analysis phase, correctly report this as the cause why the obtained targets wer never configured. Change-Id: Ib630a6dc1b955b810a6cc40254c0ae746e2eca1e PiperOrigin-RevId: 172787777
* Add Path argument to supportsModifications, supports*LinksNatively.Gravatar tomlu2017-10-20
| | | | | | | | This works better with UnionFileSystem, as (eg.) different mapped file systems might not agree on whether they are read-only. No actual code changes have been made that actually uses this argument, so this should be a behaviour no-op. PiperOrigin-RevId: 172782759
* Change "LexicalBlock" back to "Scope".Gravatar allevato2017-10-20
| | | | | | The former is *technically* more formally correct, but other debuggers (VS Code and V8, among others) already use the term "scope" to refer to the same concept so aligning with those existing debuggers has value. PiperOrigin-RevId: 172778821
* Add ObjectCodecTester, migrating a few tests to use itGravatar michajlo2017-10-20
| | | | | | | | | | | This provides a composition-based alternative to the existing inheritance-based testing style. The inheritance style has been showing its age/has become quite cumbersome when multiple codecs are in the same class or codecs are colocated with their encoded class. This will hopefully get rid of some friction when adding new codecs. RELNOTES: None PiperOrigin-RevId: 172778555
* Support Python 2 and 3 in the same build.Gravatar gregce2017-10-20
| | | | | | | | | This is also an example of the versatility of dynamic configurations: this feature only requires changes to rules/python/... Issue #3871 PiperOrigin-RevId: 172775001
* Replace Futures.dereference with the appropriate async method.Gravatar Googler2017-10-20
| | | | | | Futures.dereference is being deprecated and deleted, because it has a race condition where cancellation is not propagated. PiperOrigin-RevId: 172748120
* bazelrc: remove experimental_ui optionsGravatar Klaus Aehlig2017-10-20
| | | | | | | | | | Now that the experimental_ui is enabled by default in commit 784bb52613feb484221c3aa6756de, we do not need to enable it in the (recommended) bazelrc file anymore. While there, also move the default number of actions shown in the experimental_ui to the flag default. Change-Id: I74673a0d677b6d832c9fb5e2983f97c0dcbc44e4 PiperOrigin-RevId: 172736977
* Set the platform name in the build event stream to the CPU instead of the ↵Gravatar lberki2017-10-20
| | | | | | | | | toolchain identifier. This is necessary because we don't want BuildConfiguration to depend on BUILD and CROSSTOOL files anymore and this is possible because the toolchain ID was conceived as a unique identifier for the configuration in the build event stream, which it isn't anyway, and this way it's at least more human-readable. RELNOTES: None. PiperOrigin-RevId: 172725386
* Remove OS/Xcode versions (and thus package loading) from ↵Gravatar lberki2017-10-20
| | | | | | | | | | | AppleConfiguration.Loader. Fixes #3424. RELNOTES[INC]: Selecting on "xcode_version" and "{ios,tvos,macos,watchos}_sdk_version" is not supported anymore. What was config_setting(values={"$FOO_version": $VALUE}) is now config_setting(flag_values={"@bazel_tools//tools/osx:$FOO_version_flag": $VALUE}). PiperOrigin-RevId: 172714477
* [Bazel] Change default place where {java,cc}_proto_library look for their ↵Gravatar carmi2017-10-20
| | | | | | | | | external repo dependencies. This fixes https://github.com/cgrushko/proto_library/issues/4. RELNOTES: [Bazel] {java,cc}_proto_library now look for dependencies in @com_google_protobuf, instead of in @com_google_protobuf_$LANG PiperOrigin-RevId: 172685722
* Loop in top-level transition logic to configurable query to give more ↵Gravatar juliexxia2017-10-20
| | | | | | accurate results. Some refactoring done to get custom query code out of BuildView and into resolvers. PiperOrigin-RevId: 172647838
* Fix src/test/shell/bazel:srcs_test to add missing srcs filegroup.Gravatar allevato2017-10-20
| | | | PiperOrigin-RevId: 172639055
* Push NodeEntry#keepEdges down to InMemoryNodeEntry. It's not needed on the ↵Gravatar janakr2017-10-18
| | | | | | general interface. PiperOrigin-RevId: 172606623
* Flip the default value of --experimental_toolchain_id_in_output_directory to ↵Gravatar lberki2017-10-18
| | | | | | | | false and make the option a no-op. RELNOTES[INC]: C++ toolchain identifiers are not in the name of the output directory anymore. PiperOrigin-RevId: 172594237
* Add c++-module-codegen to known action typesGravatar hlopko2017-10-18
| | | | | | | Builds using c++-module-codegen actions stopped working after https://github.com/bazelbuild/bazel/commit/5518ce1f0d9a5a12dbf54ba3a6bc2e10d1cae979. This cl fixes that. RELNOTES: None PiperOrigin-RevId: 172587344
* Internal changeGravatar twerth2017-10-18
| | | | PiperOrigin-RevId: 172569624
* Add memory profiler.Gravatar tomlu2017-10-18
| | | | | | | | | | | This adds two dump command, bazel dump --rules and bazel dump --skylark_memory. dump --rules outputs a summary of the count, action count, and memory consumption of each rule and aspect class. dump --skylark_memory outputs a pprof-compatible file with all Skylark analysis allocations. Users can then use pprof as per normal to analyse their builds. RELNOTES: Add memory profiler. PiperOrigin-RevId: 172558600
* Actions now have the option of returning an ActionResult, containing a ↵Gravatar ruperts2017-10-18
| | | | | | | (possibly empty) set of SpawnResults created during execution of the Action. RELNOTES: None. PiperOrigin-RevId: 172529328
* Remove feature to allow expansion flags to have values.Gravatar ccalvarin2017-10-18
| | | | | | | | | It was added as a potential fix for --config (an expansion flag with values), but this would have required forcing the parser to know the config's expansions at parsing time, which is not currently possible. Instead, we will use the new addition of option-location tracking to make sure we expand options at a the correct place, even if the expansion is triggered after the fact. This is mostly a straight forward undoing of https://github.com/bazelbuild/bazel/commit/7c7255ec8d6da20526c2c4078c57aadaf3dd3612, except where the context has changed. Notably, implicit requirements are effectively treated like expansion flags, so special casing in OptionDescription could be removed. RELNOTES: None. PiperOrigin-RevId: 172514997
* Fall back on basic StringCodec if FastStringCodec isn't availableGravatar michajlo2017-10-18
| | | | | | | Also adds a method which can be used to tell if this behavior actually applied, for more performance-sensitive users. PiperOrigin-RevId: 172512011
* Make cc_toolchain put the files comprising the toolchain into its FileProvider.Gravatar lberki2017-10-18
| | | | | | | Note that cc_toolchain_suite is not changed this way, but that rule doesn't currently serve as a proxy for cc_toolchain (unlike java_runtime_suite for java_runtime), so that's OK. RELNOTES: None. PiperOrigin-RevId: 172502279
* Migrate ResourceProcessorBusyBox Android actions to using SHELL_QUOTED param ↵Gravatar apell2017-10-18
| | | | | | | files. RELNOTES: None. PiperOrigin-RevId: 172485548