aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
Commit message (Collapse)AuthorAge
* Throw a static error when lvalue of an augmented assignment is a list.Gravatar laurentlb2017-08-21
| | | | | | | RELNOTES: When the lvalue of an augmented assignment is a list, we now throw an error before evaluating the code (e.g. `a, b += 2, 3`). PiperOrigin-RevId: 165906611
* Simplify RunfilesSupport interface by having it call ↵Gravatar Googler2017-08-21
| | | | | | | RuleContext.shouldCreateRunfilesSymlinks() itself. RELNOTES: None. PiperOrigin-RevId: 165774395
* Initial (partial) implementation of configured target query. Activated by ↵Gravatar janakr2017-08-21
| | | | | | | | | | | | | | | | | | | | | passing the --post_build_query flag to a build command, with a query expression as the argument. Bazel then executes this query on the configured target graph as constructed by the build command. Since the prepare graph -> query workflow is how SkyQueryEnvironment works, this is mostly just copying that. Main missing features/code cleanups: * Recursive target patterns (/...) are not supported. * There is no way to specify the configuration of the targets in your query. * Configuration output is totally opaque (just the hash, or null if no configuration). * More generally, no output options. * Some features (visibility, label attrs) not supported. * No edge filtering (host deps, implicit deps). * Aspects are totally ignored. * Graceful failure on errors, edge cases, incompatible flags (like the TAP flags that discard edges). * Code hygiene issues (calling test-only method to get to Skyframe graph, some code duplication across ConfiguredTargetQueryEnvironment and SkyQueryEnvironment). Most of the features I plan to leave to rules-side people, since I think they won't be too hard for a general Blaze developer to implement, and designing the right features and user interfaces for these things is better left to the rules side. PiperOrigin-RevId: 165747829
* Replace TransitionApplier interface with a dedicated class.Gravatar gregce2017-08-21
| | | | | | | | | | | | | | | This accomplishes a few goals: 1. Removes the outdated BuildConfiguration.StaticConfigurationApplier code. 2. Removes the TransitionApplier abstraction completely. This was an awkward bridge meant to support both static and dynamic implementations. 3. Moves transition logic to its own dedicated class: ConfigurationResolver. This no longer belongs in BuildConfiguration, which we ultimately want to become a simple <key, value> map. Part of the static config cleanup effort. PiperOrigin-RevId: 165736955
* Remove CustomArgv. It is unused.Gravatar tomlu2017-08-21
| | | | PiperOrigin-RevId: 165731260
* j2objc java tests work for --experimental_objc_crosstool=allGravatar cpeyser2017-08-21
| | | | PiperOrigin-RevId: 165730337
* Windows: Implement python native launcherGravatar Yun Peng2017-08-21
| | | | | | | | | | | | Now Bazel build a Windows exe to launch the python self-extracting zip file by default, using --windows_exe_launcher=0 to switch back to cmd wrapper. The extra zip file with shebang preprended is not built on Windows anymore, even when using cmd wrapper. Change-Id: Ic7060326f19ca6e2e73ea8d8211afd1c7618083c PiperOrigin-RevId: 165707076
* Fix stale comment.Gravatar nharmata2017-08-21
| | | | | RELNOTES: None PiperOrigin-RevId: 165705342
* Prevent using android libraries as resources if they have non-resource infoGravatar Googler2017-08-21
| | | | | | | | | | | | | | android_libraries can now be used in the resources attribute. However, if these libraries contain non-resource information, it won't get picked up. To prevent unexpected behavior, fail if such libraries are used as resources. Adding a temporary boolean to AndroidResourcesProvider seems to be the most straightforward way of doing this. The alternative, having the consuming target check all relevant providers for non-resource information, would be much messier. RELNOTES: None PiperOrigin-RevId: 165703578
* Refactor Bash LauncherGravatar Yun Peng2017-08-21
| | | | | | | | | | | | | | | | | | 1. Extract some funtions into NativeLauncherUtil.java So that they can also be used by Python and Java launcher. 2. Derive runfiles directory from mainExectuable yielding "%{name}.cmd.runfiles" or "%{name}.exe.runfiles" 3. Removed bash_main_file key, we can assume the main file is next the launcher just without .exe suffix. By doing this, we don't have to worry about passing RunfilesPath or ExecPath. RunfilesPath has ../ prefix for external file, ExecPath contians ./bazel-out/... for generated file. If main file is a generated file from external repository, neither of them are correct. Change-Id: Ie0c35f6030f6229c28d935d8fb3cb6a8af5af29c PiperOrigin-RevId: 165699975
* Do not add linking features in CppActionConfigs when crosstool already ↵Gravatar hlopko2017-08-21
| | | | | | | defines it RELNOTES: None. PiperOrigin-RevId: 165695975
* Make an immutable copy of a map in a simpler way.Gravatar lberki2017-08-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 165685048
* Remove BuildConfiguration.useDynamicConfigurations.Gravatar gregce2017-08-18
| | | | | | | | This is always true. Part of the static config cleanup effort. PiperOrigin-RevId: 165628823
* Properly handle some values that can be null in AppleCommandLineOptions.Gravatar janakr2017-08-18
| | | | PiperOrigin-RevId: 165622047
* Add Skylark flags as common command optionsGravatar brandjon2017-08-18
| | | | | | | | | This makes these flags accessible to all commands, including some that don't do anything with Skylark (e.g. canonicalize-flags). This leads to spammier help messages. But the benefit is that it allows them to appear on a "common" line in the .bazelrc. Fixes #3538. RELNOTES: Skylark-related options may now appear as "common" command options in the .bazelrc PiperOrigin-RevId: 165620829
* Remove unnecessary options parser caching.Gravatar ccalvarin2017-08-18
| | | | | | | The options parser already has a static cache of all the reflection work performed. There can still be costs associated with the obtaining and combining of options classes (see the BlazeCommandDispatcher's additional caching), but in this case, each parser is made with a single options class, and none of the class-name extraction was being cached, so I think there was nothing gained. RELNOTES: None. PiperOrigin-RevId: 165613107
* Remove ConfigurationCollection{Function,Value}, ↵Gravatar gregce2017-08-18
| | | | | | | | BuildConfigurationCollection.Transitions. Part of the static config cleanup effort. PiperOrigin-RevId: 165607492
* Desugar all the Android builds!Gravatar ajmichael2017-08-18
| | | | | | | | | Also, promote --experimental_desugar_for_android to --desugar_for_android. Fixes https://github.com/bazelbuild/bazel/issues/2871 RELNOTES: All Android builds now use the desugar tool to support some Java 8 features by default. To disable, use the --nodesugar_for_android flag. PiperOrigin-RevId: 165606988
* Added support for $(LD) for genrule() and ld_executable for SkylarkGravatar John Basila2017-08-18
| | | | | | | | | | I added support for exposing the GNU linker (ld) for genrule() and Skylark. For reference: https://stackoverflow.com/questions/45560314/building-kernel-module-with-bazel Closes #3557. PiperOrigin-RevId: 165600633
* Rename Scope to LexicalBlock, and other cleanup in ValidationEnvironment.Gravatar laurentlb2017-08-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 165600058
* Expose android configuration to skylark (android_sdk and apk_signing_method)Gravatar Googler2017-08-18
| | | | PiperOrigin-RevId: 165596223
* Remove RuleClass.Configurator and obsolete LIPO_ON_DEMAND uses.Gravatar gregce2017-08-18
| | | | | | | | Dynamic configs use RuleTransitionFactory instead. Part of the static config cleanup effort. PiperOrigin-RevId: 165590679
* Open-source Skyframe serialization, and make AppleConfiguration serializable ↵Gravatar janakr2017-08-18
| | | | | | as a pilot. Currently not hooked up to anything, but will be shortly. PiperOrigin-RevId: 165583517
* Categorize query options.Gravatar janakr2017-08-18
| | | | PiperOrigin-RevId: 165581746
* Remove ConfigurationCollectionFactory as part of the static config cleanup.Gravatar gregce2017-08-18
| | | | PiperOrigin-RevId: 165578449
* Remove validate() methods in the AST, use a visitor instead.Gravatar laurentlb2017-08-18
| | | | | | | This is a simple refactoring, no change in behavior. RELNOTES: None. PiperOrigin-RevId: 165572028
* Add the workspace name to the sandbox path for sandboxed workers.Gravatar philwo2017-08-18
| | | | PiperOrigin-RevId: 165571541
* CommandBuilder.java: Don't quote the last argument when passing Windows ↵Gravatar pcloudy2017-08-18
| | | | | | | | | command to CMD.EXE. Fix https://github.com/bazelbuild/bazel/issues/2040#issuecomment-322980147 RELNOTES: None PiperOrigin-RevId: 165562681
* Delete cachedSymbols from LoadStatement.Gravatar laurentlb2017-08-18
| | | | | | | We rarely need it, it's not useful to keep it in memory. RELNOTES: None. PiperOrigin-RevId: 165562119
* Fetch the Java-specific Make variables from the :host_jdk dependency instead ↵Gravatar lberki2017-08-18
| | | | | | | | | of the configuration in genrules. This is necessary because if one uses a java_runtime rule that has java_home="$(VAR") and VAR is set to an absolute path, BuildConfiguration won't be able to resolve VAR (since it's a Make variable and thus can't affect other Make variables), Blaze won't be able to tell that it's an absolute value and thus will prepend the package name of the java_runtime rule to it, e.g. resulting in a//foo/bar instead of /foo/bar if the java_runtime rule is in package a. RELNOTES: None. PiperOrigin-RevId: 165555251
* Honor --nobuild_runfile_links for non-tests, and propagate it to theGravatar Googler2017-08-17
| | | | | | | | | | | | | host configuration. I think the comment I'm deleting is misleading. PAR file construction already has special handling of the input manifest, and host tools do get their runfiles when executed remotely. They don't get them for local execution, but users who care about that don't need to pass the non-default --nobuild_runfile_links option. RELNOTES: None. PiperOrigin-RevId: 165535870
* Change WalkableGraphFactory#prepareAndGet to take multiple SkyKeys as graph ↵Gravatar Googler2017-08-17
| | | | | | | | | | roots It also changes a few accessors of utility methods in Skyframe library. It refactors the QueryExpressionMapper to use a general QueryExpressionVisitor. RELNOTES: None PiperOrigin-RevId: 165534908
* Fix NPE in PrinterGravatar brandjon2017-08-17
| | | | | RELNOTES: None PiperOrigin-RevId: 165489091
* Filter out non-aidl files out of idl_preprocessed param if the passed in valueGravatar Googler2017-08-17
| | | | | | | is a target. RELNOTES: None PiperOrigin-RevId: 165482057
* Remove ConfigurationFactory as part of the static configuration cleanup.Gravatar gregce2017-08-17
| | | | PiperOrigin-RevId: 165478994
* Simplify validation environment (futureReadOnlyVariables is not needed).Gravatar laurentlb2017-08-17
| | | | | RELNOTES: None. PiperOrigin-RevId: 165477209
* Add aapt2 to the resource compile action.Gravatar corysmith2017-08-17
| | | | | RELNOTES: None PiperOrigin-RevId: 165469671
* Make `incompatible_disallow_toplevel_if_statement` default to true.Gravatar laurentlb2017-08-17
| | | | | RELNOTES: Top-level `if` statements are now forbidden. PiperOrigin-RevId: 165469101
* Refactoring: create only one ValidationEnvironmentGravatar laurentlb2017-08-17
| | | | | | | | After this change, it will be easier to move the validate() methods to a separate visitor. RELNOTES: None. PiperOrigin-RevId: 165467838
* Fix skyframe-native filesets to honor 'excludes' while in a directory traversal.Gravatar kush2017-08-17
| | | | | RELNOTES: None PiperOrigin-RevId: 165465128
* workers: Don't skip empty lines when expanding flagfiles.Gravatar philwo2017-08-17
| | | | | | Fixes #3329. PiperOrigin-RevId: 165443367
* Add flag to fail when android_resources targets are encounteredGravatar Googler2017-08-17
| | | | | | | | | | As part of the migration away from android_resources, add a flag that causes failures if android_resources is encountered. This makes it easier to test that all android_resources targets have been removed without actually breaking any builds. RELNOTES: none PiperOrigin-RevId: 165437983
* Fix lexer bug that allowed non-ASCII letters in identifiersGravatar fzaiser2017-08-17
| | | | | RELNOTES: None PiperOrigin-RevId: 165434934
* Fixing #3552: re-execute cached orphaned Actions.Gravatar olaola2017-08-17
| | | | | | | A bug was introduced in patch 9626bb4923c74c6d3c09b7438eb24b32191053df, where a cache miss would not result in action re-execution, making the cache miss non-recoverable. RELNOTES: fixes #3552 PiperOrigin-RevId: 165434579
* Delete Literal.javaGravatar laurentlb2017-08-17
| | | | | RELNOTES: None. PiperOrigin-RevId: 165422514
* When a worker can no longer be used, because one or more of its files on ↵Gravatar philwo2017-08-17
| | | | | | | disk have changed since it was launched, print *which* files have changed. RELNOTES: Improved logging when workers have to be restarted due to its files having changed. PiperOrigin-RevId: 165419664
* Remove methods that shouldn't belong to FuncallExprGravatar fzaiser2017-08-17
| | | | | RELNOTES: None PiperOrigin-RevId: 165419360
* Add more type safety to CustomCommandLine.Gravatar tomlu2017-08-16
| | | | | | | | | | | | Allowing add(Object) is too loose and can easily lead to programmer mistakes. Because of type erasure, we can't use the same overload name for (eg.) add(NestedSet<String>) and add(NestedSet<Artifact>). The API is overhauled to use the same terms everywhere, eg. "add", "addPaths", "addExecPaths". This is similar to how it used to be a few CLs ago. The API is overhauled to make sure it's consistent for all types. While tedious, the facade methods immediately dispatch to internal helpers, so implementation wise it's not too heavy. While large, this CL is almost entirely an automated refactor. PiperOrigin-RevId: 165358287
* Add the command option --experimental_oom_more_eagerly_threshold. This will ↵Gravatar janakr2017-08-16
| | | | | | replace the startup option after a deprecation period. PiperOrigin-RevId: 165340514
* android_library can be used in the resources attributeGravatar Googler2017-08-16
| | | | | | | | | | | | | | | | | | | | | | This allows us to perform a more gradual migration away from the android_resources rule. Specifically, rather than move all android_resources targets and simultaneously move all resources attributes, we can now first transform all android_resources rules into android_library rules, and then afterwards migrate dependencies on those rules from resources into deps. This allows a two-part migration. The resources attribute, once allowed to take android_library targets, should continue to work exactly as before. There is one change in behavior - for this to work, android_library targets now need to build an output APK during resource processing. This APK will be removed once the resources attribute is removed. Once the migration is complete, the resources attribute will be removed completely. RELNOTES: none PiperOrigin-RevId: 165313447