aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
Commit message (Collapse)AuthorAge
* Handle exceptions encountered resolving packages during the execution phaseGravatar Michajlo Matijkiw2015-06-10
| | | | | | | | | | | | | | Currently we may do lookups of not-already-cached packages during the execution phase for actions that discover inputs. Exceptions encountered during this would go unhandled and result in a crash. Here we introduce PackageRootResolutionException which wraps these exceptions and triggers an ActionExecutionException which is cleanly handled in the exec phase. As part of this change SkyframeActionExecutor#getArtifactRoots(...) will fail properly on errors getting package roots. -- MOS_MIGRATED_REVID=95578891
* Merges class jars specified as srcs into the android library class jar in ↵Gravatar Andrew Pellegrini2015-06-10
| | | | | | | | | order to create the classes.jar to be used in aar generation. RELNOTES: The classes.jar in .aar files now also contains the contents of any class jars specified in the android_library.srcs attribute. -- MOS_MIGRATED_REVID=95542278
* Skylark: implemented set.union()Gravatar Florian Weikert2015-06-10
| | | | | -- MOS_MIGRATED_REVID=95536484
* Enable AndroidBinary to dex with Jack.Gravatar Michael Staib2015-06-10
| | | | | | | | | | | | | Until the Jack aspect implementation is submitted (in a coming CL), only android_library dependencies can be used by Jack dexing, as no other rule type exports the right provider. But for now, android_binaries which depend purely on android_libraries can build their dexes using Jack if --experimental_android_dex_with_jack is specified. -- MOS_MIGRATED_REVID=95534421
* Bugfix: We must use a case-insensitive TreeMap here so that differently ↵Gravatar Philipp Wollermann2015-06-10
| | | | | | | cased strategy-flags can override the default flags (otherwise for example "Javac" and "javac" are both stored in the case-sensitive HashMap and it depends on luck which one ends up in the final strategy map). -- MOS_MIGRATED_REVID=95532191
* Some small, random fixes for JavaBuilder that increase error reporting, fix ↵Gravatar Philipp Wollermann2015-06-10
| | | | | | | | | JavaDoc strings, ... I found having stack traces very helpful while I was debugging an issue where the JavaBuilder ran out of file handles and crashed, but only printed "Compilation failed: No more file handles" and didn't tell me which part of the code actually tried to open the file. -- MOS_MIGRATED_REVID=95529141
* Implement persistent worker processes and a spawn strategy that uses them.Gravatar Philipp Wollermann2015-06-10
| | | | | | | | | This will be used by the persistent JavaBuilder, which improves performance of Java compilation by 4x due to profiting from JVM JIT optimizations and not having to relaunch the JVM for every spawn. It is completely generic though, so as long as a tool (ProGuard? Dexer? Whatever.) conforms to the Worker process protocol, it can use the new spawn strategy. -- MOS_MIGRATED_REVID=95527132
* The Order enum now supports the conversion of its values to and from strings.Gravatar Florian Weikert2015-06-10
| | | | | | | This functionality used to be part of SkylarkNestedSet. -- MOS_MIGRATED_REVID=95526136
* Support --run_under in Bazel.Gravatar Han-Wen Nienhuys2015-06-10
| | | | | | | Fixes #206. -- MOS_MIGRATED_REVID=95525127
* Make Java transitive runtime and compile time deps available to Skylark.Gravatar Erik Kuefler2015-06-09
| | | | | | | | | | | | | | | | This is necessary to add support for Java-based languages like GWT, Groovy, and Scala. With this change, I can construct a classpath for GWT as follows: all_deps = set(ctx.files.deps + ctx.files._implicitdeps) for this_dep in ctx.attr.deps: if hasattr(this_dep, 'java'): all_deps += this_dep.java.transitive_runtime_deps all_deps += this_dep.java.transitive_source_jars classpath = ":".join([dep.path for dep in all_deps]) -- Change-Id: If58ffd19a4cc19f69d5f98814c11391683804234 Reviewed-on: https://bazel-review.googlesource.com/#/c/1480 MOS_MIGRATED_REVID=95523130
* Make it possible to put the Crosstool proto in BUILD files.Gravatar Lukacs Berki2015-06-09
| | | | | | | This is needed so that Bazel can access Android NDK if it's outside of the workspace. The current limitation is that we Bazel can pretend that there is a BUILD file there, but cannot do the same with a CROSSTOOL file. We could fix that limitation, but given that Crosstool is the only conceivable use case, let's fix it by changing the Blaze-Crosstool interface. -- MOS_MIGRATED_REVID=95517408
* Refactoring: PseudoAction ctor "inputs" argument is now a NestedSet.Gravatar Laszlo Csomor2015-06-09
| | | | | -- MOS_MIGRATED_REVID=95514599
* Add stub implementations of the android_sdk_repository and ↵Gravatar Lukacs Berki2015-06-09
| | | | | | | android_ndk_repository rules that will be used to reference Android SDK/NDK to be used for Android builds. -- MOS_MIGRATED_REVID=95507994
* Optimization: do not trigger the loading of directly dependent packages on ↵Gravatar Lukacs Berki2015-06-09
| | | | | | | query for aspects that do not have implicit attributes. -- MOS_MIGRATED_REVID=95507900
* Log invalid rule class names on deserializationGravatar Mark Schaller2015-06-09
| | | | | | | Previously would always log null. -- MOS_MIGRATED_REVID=95446225
* Log exceptions deserializing PackagesGravatar Michajlo Matijkiw2015-06-09
| | | | | | | | | | | Due to our streaming deserialization approach we can leave data on the wire when encountering exceptions. Java serialization, the primary consumer of this code, isn't happy with that and throws an IllegalStateException("unread block data"), drowning out the original exception and leaving us without much useful debug information. -- MOS_MIGRATED_REVID=95442892
* Don't be unnecessarily conservative about marking FileStateKeys and ↵Gravatar Nathan Harmata2015-06-09
| | | | | | | DirectoryListingStateKeys as dirty. Note that the two previous "concerns" of cycles and errors (which weren't actually concerns) are now obsolete anyway. -- MOS_MIGRATED_REVID=95441624
* Remove unneeded parameter from LocalGccStrategy.Gravatar Philipp Wollermann2015-06-08
| | | | | -- MOS_MIGRATED_REVID=95429195
* Do not add LocalGccStrategy and LocalLinkStrategy to ActionContextProviders ↵Gravatar Philipp Wollermann2015-06-08
| | | | | | | in BazelRulesModule, as they are already added in the StandaloneContextProvider. -- MOS_MIGRATED_REVID=95428810
* Implement "More flexible strategy flag for Bazel".Gravatar Philipp Wollermann2015-06-08
| | | | | -- MOS_MIGRATED_REVID=95427512
* Skylark: fix escaping of backslashGravatar Francois-Rene Rideau2015-06-08
| | | | | | | | | | | Create a Printer class into which to eventually move all printing infrastructure currently in EvalUtils. For now, only move string escaping there. Fix the forgotten case of backslash. Allow any style of Python quotes, while we're at it, but keep using simple double-quote as the default. -- MOS_MIGRATED_REVID=95328052
* Changes zip filtering of the test APK to use the last jar before dexing from ↵Gravatar Googler2015-06-08
| | | | | | | the binary_under_test. This prevents the filter from removing classes that are identical in the deploy jars but are proguarded differently. -- MOS_MIGRATED_REVID=95325114
* Expand JavaSourceInfoProvider to provide more fine-grained sources.Gravatar Michael Staib2015-06-08
| | | | | | | | | | | This will be used by Jack support, which needs to know the different types of sources as they're handled differently on the Bazel side. Additionally, it wants to know the difference between source jars the user provided directly in the sources of the rule, and source jars used to provide sources for the jar files in the same rule. -- MOS_MIGRATED_REVID=95324035
* Remove superfluous throws clause.Gravatar Nathan Harmata2015-06-08
| | | | | -- MOS_MIGRATED_REVID=95320780
* Rollback of commit 25f07c5f1ae826d748a4dac61f3adf3deb4edc8f.Gravatar Googler2015-06-08
| | | | | | | | | | | | | *** Reason for rollback *** Emulator is missing GLIBC_2.7 for certain cases. *** Original change description *** Remove the dynamic tool launcher, now that the android tools are static. -- MOS_MIGRATED_REVID=95302834
* Add the JackCompilationHelper to Bazel.Gravatar Michael Staib2015-06-08
| | | | | | | | | | | | | This class contains the compilation logic for Jack: building Java files/resources into Jack libraries, and converting jar files using Jill to convert Java code and a resource extraction script to pull resources out. The JackLibraryProvider is exported by rules which can compile to Jack. Android library rules will export this provider, while an aspect will be used to add it to Java rules. -- MOS_MIGRATED_REVID=95296935
* Add --with_aspect_deps flag to blaze query. This flag should produce ↵Gravatar Lukacs Berki2015-06-05
| | | | | | | | | | | | | additional information about aspect dependencies when --output is set to {xml, proto}. One quirk of this CL is that if BUILD files of direct dependencies are added both under <subinclude> and <load>. Any better ideas are appreciated. As a drive-by fix, if for some reason a package reports the same label as a both subinclude and a Skylark dependency, it will only be reported once in the proto output. RELNOTES[NEW]: added --with_aspect_deps to blaze query, that prints additional information about aspects of target when --output is set to {xml, proto, record}. -- MOS_MIGRATED_REVID=95272042
* More runfiles consolidationGravatar Michajlo Matijkiw2015-06-05
| | | | | -- MOS_MIGRATED_REVID=95261769
* Add debugging for mysterious crash.Gravatar Janak Ramakrishnan2015-06-05
| | | | | -- MOS_MIGRATED_REVID=95227410
* Rollback of unknown previous commit.Gravatar Googler2015-06-05
| | | | | -- MOS_MIGRATED_REVID=95215123
* Unregister previously registered directories when they are deleted. This is ↵Gravatar Nathan Harmata2015-06-05
| | | | | | | important because the directory's inode could be reused for another directory in the future, and we would get WatchEvents for that new directory which would be problematic if we hadn't noted it yet. -- MOS_MIGRATED_REVID=95214882
* Teach FakeSubincludeTarget its package, because rdeps wants itGravatar Mark Schaller2015-06-05
| | | | | | | | | | | | While evaluating the transitive closure of the universe, if the universe contains the buildfiles of a package with a subinclude, the RdepsFunction would ask a FakeSubincludeTarget for its package. Prior to this change, this would result in a crash. Now, FakeSubincludeTargets remember the package they belong to. -- MOS_MIGRATED_REVID=95212925
* Deduplicate generated resources from multiple architectures.Gravatar Peter Schmitt2015-06-05
| | | | | | | | | | | | When compiling in multiple architectures, the same resource may be added to a bundle several times because it is generated by a genrule within each architecture's configuration. This causes conflicts when adding the files to the final bundle which is why we discard all but one of the generated files that map to the same location (error checking for users accidentally mapping to the same location exists). -- MOS_MIGRATED_REVID=95212124
* Remove the dynamic tool launcher, now that the android tools are static.Gravatar Googler2015-06-05
| | | | | -- MOS_MIGRATED_REVID=95206267
* Deduplicate include directories when include scanning.Gravatar Janak Ramakrishnan2015-06-05
| | | | | | | | | Duplicate include directories were always possible, but are now much more likely because CppCompileAction#getSystemIncludeDirs will overlap with CppCompileAction#getBuiltInIncludeDirs. Note that it is possible that neither is a subset of the other -- raw specification of C++ options in the CROSSTOOL or elsewhere will be in getSystemIncludeDirs and not in getBuiltInIncludeDirs. Similarly, the include directory under the sysroot will be in getBuiltInIncludeDirs but not in getSystemIncludeDirs. Duplicate directories are bad because if an #include_next is specified in a file inside a directory listed twice, the scanner may just find that file again in the next occurrence of the directory, as opposed to a different directory listed later. -- MOS_MIGRATED_REVID=95165367
* MavenDownloader ignores empty/default sha1 attributeGravatar Michajlo Matijkiw2015-06-05
| | | | | | | | | | | Fixes #224 AttributeMap#has() checks if a rule has an attribute for a specific type, not if it's set. We need to check the value to make sure it's reasonable. -- MOS_MIGRATED_REVID=95138818
* Description redacted.Gravatar Rumou Duan2015-06-05
| | | | | -- MOS_MIGRATED_REVID=95135804
* Make source jars from java_library available to Skylark.Gravatar Erik Kuefler2015-06-05
| | | | | | | | | | | | | | | This is necessary to implement GWT support in Bazel, which requires source jars on the classpath. With this change, I can build a GWT classpath as follows: all_deps = ctx.files.deps for this_dep in ctx.attr.deps: if this_dep.java: all_deps += this_dep.java.source_jars classpath = ":".join([dep.path for dep in all_deps]) -- Change-Id: I1983cb57f15eb48e49b81b250bb18bb51b7d9391 Reviewed-on: https://bazel-review.googlesource.com/1441 MOS_MIGRATED_REVID=95111144
* Allow objc_{library,binary} to depend on cc_library.Gravatar Peter Schmitt2015-06-05
| | | | | | | | | | | | | | | | | | | | | | This is an early version of support for this feature, likely still missing a number of edge cases. However the basic functionality should work. To allow a dependency from objc to cc, the following flags will have to be passed to bazel: --experimental_enable_objc_cc_deps --cpu=ios_i386 --crosstool_top=//tools/objc/crosstool:crosstool The feature is also compatible with --ios_multi_cpus, with the familiar values for --ios_cpu (i386, x86_64, armv7, arm64; passed instead of --cpu above). This CL does not contain any Xcode support for CC dependencies yet, they will just not show up in the generated Xcode project. (Second submission after earlier accidental submit before this CL was ready). -- MOS_MIGRATED_REVID=95110081
* Allow absolute system includes if they're builtins.Gravatar Peter Schmitt2015-06-05
| | | | | -- MOS_MIGRATED_REVID=95108839
* Simplification in EvalUtils.optionMapGravatar Laurent Le Brun2015-06-05
| | | | | -- MOS_MIGRATED_REVID=95106558
* Ignore relative entries in SearchPath.Gravatar Han-Wen Nienhuys2015-06-03
| | | | | -- MOS_MIGRATED_REVID=95102460
* Add rule class definition and configured target factory for the upcoming ↵Gravatar Lukacs Berki2015-06-03
| | | | | | | | | android_binary rule. This is not hooked up with BazelRuleClassProvider yet, because once we do, we'll start always loading the Android SDK on Bazel startup regardless of whether it's actually needed or not, which is a pain. We'll have to figure something out for that. -- MOS_MIGRATED_REVID=95100903
* Add vfs.SearchPath for searching binaries.Gravatar Han-Wen Nienhuys2015-06-03
| | | | | -- MOS_MIGRATED_REVID=95097699
* Fix product name in the error message for invalid commands.Gravatar Laszlo Csomor2015-06-03
| | | | | | | | $ bazel blah Command 'blah' not found. Try 'bazel help'. -- MOS_MIGRATED_REVID=95089307
* Minor FileSystem refactoring.Gravatar Eric Fellheimer2015-06-03
| | | | | -- MOS_MIGRATED_REVID=95054907
* Serialize Packages as a series of protocol buffersGravatar Michajlo Matijkiw2015-06-03
| | | | | | | | | | | Packages have the potential to have an exceptional number of associated targets. When serialized in one message these targets can push the protocol buffer representation of a Package over the default deserialization size limit. In this commit we serialize targets separately as a series of individual messages to avoid this limit. -- MOS_MIGRATED_REVID=95049743
* Properly handle exceptions that RecursivePkgFunction can encounter, instead ↵Gravatar Janak Ramakrishnan2015-06-03
| | | | | | | | | | | of silently swallowing them. The old behavior was simply incorrect on --keep_going builds because it meant any directory with an uncaught error caused all of its ancestors to not have any values. It wasn't noticed because SkyframeTargetPatternEvaluator was overly permissive in the errors it expects. We also use a singleton for the empty RecursivePkgValue which might have a negligible (beneficial) memory impact. -- MOS_MIGRATED_REVID=95037551
* Slight refactoring of readdir().Gravatar Eric Fellheimer2015-06-03
| | | | | -- MOS_MIGRATED_REVID=95036998
* Remove compatible_with / restricted_to attributes from ruleGravatar Greg Estren2015-06-03
| | | | | | | classes that are exempt from constraint checking. -- MOS_MIGRATED_REVID=95033646