aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
Commit message (Collapse)AuthorAge
* Add documentation for workspace functionGravatar Kristina Chodorow2016-01-26
| | | | | -- MOS_MIGRATED_REVID=112971086
* Stop inserting local shell environment into CppCompileAction.Gravatar Han-Wen Nienhuys2016-01-26
| | | | | -- MOS_MIGRATED_REVID=112956748
* Move RepositoryName to its own top-level classGravatar Kristina Chodorow2016-01-26
| | | | | | | | | | As it's about to get more important in its own right. The only change that isn't just moving code around is making RepositoryName.validate package-private. -- MOS_MIGRATED_REVID=112956571
* Fix some generic warnings.Gravatar Ulf Adams2016-01-25
| | | | | -- MOS_MIGRATED_REVID=112952552
* Rollback of commit bd9f25c593a140acb15d3fd3fc7f66d091e1a898.Gravatar Ulf Adams2016-01-25
| | | | | | | | | | | | | | | | *** Reason for rollback *** Violates layering - genrule should not depend on platform- or language-specific parts. *** Original change description *** Add a DEVELOPER_DIR make variable to genrules to propagate the apple xcode environment variable DEVELOPER_DIR to commands. If $(DEVELOPER_DIR) is included in the genrule command, we bootstrap the XCODE_VERSION_OVERRIDE environment variable to the command. The contract with the actual action executor is, if XCODE_VERSION_OVERRIDE is present in the environment, to additionally bootstrap the DEVELOPER_DIR absolute path to the command. -- MOS_MIGRATED_REVID=112951074
* Share some error handling code between aspects and top-level aspects.Gravatar Ulf Adams2016-01-25
| | | | | -- MOS_MIGRATED_REVID=112948493
* Export the AndroidManifest.xml from the resource processing. This is an ↵Gravatar Googler2016-01-25
| | | | | | | initial step toward changing the manifest merge to use the Gradle merger, as well as ensuring the custom library package is reflected in the manifest. -- MOS_MIGRATED_REVID=112943820
* Make AspectFunction error handling match TopLevelAspectFunction.Gravatar Ulf Adams2016-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also match ConfiguredTargetFunction for target loading. It isn't currently possible to trigger either of these code paths - the loading phase ensures that we never attempt to analyze targets that fail to load - the Skylark import or conversion cannot fail, because Skylark checks during .bzl execution that all referenced symbols are Skylark aspects Therefore, the only way to trigger this would be if there was a native rule requesting a non-existent or broken Skylark aspect for its dependencies, but that is currently not possible - native rules can only request native aspects. However, for interleaved loading and analysis, we need to limit the set of exception classes that can be thrown from AspectFunction - we do that here by changing the constructor of AspectFunctionException to only accept either NoSuchThingException or AspectCreationException. That in turn requires that we re-throw the Skylark import and conversion exceptions as AspectCreationException, which is exactly what TopLevelAspectFunction is already doing, and necessary for correct error handling if we do ever support Skylark aspects in native rules. Alternatively, I could change the code path to crash Bazel, but that seems strictly worse. Even if we can't test this code, it's conceptually the right way to handle these errors. I'll move part of the error handling into loadSkylarkAspect in a subsequent change. -- MOS_MIGRATED_REVID=112938284
* Remove unused ${ATTRIBUTE_DEFINITION} and ${ATTRIBUTE_SIGNATURE} variables fromGravatar David Chen2016-01-25
| | | | | | | | | Bazel native rule inline documentation. These variables are no longer used because the docgen templates now directly generate the table of attributes instead of using ATTRIBUTE_DEFINITION and call RuleDocumentation.getAttributeSignature() instead of using ATTRIBUTE_SIGNATURE. RuleDocumentation.getHtmlDocumentation() currently resolves both of these variables to the empty string. -- MOS_MIGRATED_REVID=112933659
* Fix remaining links in inline native rule docs.Gravatar David Chen2016-01-25
| | | | | -- MOS_MIGRATED_REVID=112931111
* Move analysis root cause tracking to the ConfiguredTargetFunction.Gravatar Ulf Adams2016-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | The main remaining problem with interleaved loading and analysis is error handling. When interleaving, we don't run a real loading phase anymore, and loading errors can occur during the analysis phase, and need to be handled there. The plan is to have ConfiguredTargetFunction throw a ConfiguredValueCreationException with a list of all loading root causes, which requires that we also catch ConfiguredValueCreationException here, which in turn breaks analysis root cause handling, as that is currently relying on Skyframe root cause tracking. Moving analysis root cause handling into CTFunction makes it possible to subsequently also implement loading root cause handling here. This is also necessary if we want to have complete root cause handling in the general case: a target may have any number (and combination) of loading and analysis root causes at the same time. For now, we only pass a single analysis root cause, which mirrors the current Skyframe-based implementation. -- MOS_MIGRATED_REVID=112930871
* Use the existing exception instance, not a new one.Gravatar Ulf Adams2016-01-25
| | | | | | | | | | | | | Note that this can never happen in production - the loading phase ensures that we only attempt to analyze targets that load successfully. That's also why there are no tests for this. This code path will become live in a later change, with corresponding test coverage; the existing tests cover this in principle, we just need to make them run with the reduced loading phase. -- MOS_MIGRATED_REVID=112926211
* Fixes an NPE in BazelJavaSemantics.checkMainClass that would occur whenGravatar Alex Humesky2016-01-25
| | | | | | | | | a java_binary rule tries to find its main class when it doesn't have a main_class attribute and that rule is defined in a parent directory of a java/javatests directory. -- MOS_MIGRATED_REVID=112851711
* Make Bazel exit with the exit code from the BuildFailedException if one is ↵Gravatar Googler2016-01-25
| | | | | | | | | specified. If the build failure is caused by a catastrophic error, propagate the exit code from the catastrophe (EvaluationResult.getCatastrophe()) even when --keep_going. -- MOS_MIGRATED_REVID=112845942
* Allow an exit code to be specified in the ActionExecutionException when an ↵Gravatar Googler2016-01-25
| | | | | | | | | action fails, and propagate the exit code to BuildFailedException. And update all call sites that copy or wrap ActionExecutionExceptions. -- MOS_MIGRATED_REVID=112811857
* Always generate a workspace name for new repositoriesGravatar Kristina Chodorow2016-01-25
| | | | | -- MOS_MIGRATED_REVID=112790992
* Make select() statements in remote repositories with selector labels ↵Gravatar Lukacs Berki2016-01-25
| | | | | | | | | | | pointing back to the main repository ("@//:...") work. In principle, we should just use main repository labels instead of default repository labels in all the SkyKeys that take labels. @bsilver8192 is working on it, but in the meantime, this will serve to unblock @chin33z. Fixes #811. -- MOS_MIGRATED_REVID=112787545
* Allow switching on header processing (parse_headers or preprocess_headers)Gravatar Manuel Klimek2016-01-22
| | | | | | | | | | | | | | | | | for targets in the transitive closure of a target that is built. Previously, this would only happen if a link action for the library containing the headers was also built; this specifically means it did not trigger if a library didn't contain source files, as there is no link action for such libraries. That led to no header-only libraries would get their headers parsed, which includes all cc_public_library rules. Adding a flag to introduce this under so we can switch it on independently from the blaze release. Once it is switched on, we can remove the edges in the action graph from the link actions to the header processing actions. -- MOS_MIGRATED_REVID=112782219
* Clearer error message if git repository cannot be cloned. Minor style cleanup.Gravatar David Chen2016-01-22
| | | | | | | | | | Currently, if an error occurs when cloning a git repository, resulting in a GitAPIException being thrown, the error message printed is not very clear. One example of this is if the repository is being cloned over SSH since cloning over SSH is not currently supported. -- MOS_MIGRATED_REVID=112770885
* Do not compile source files mentioned in 'hdrs'.Gravatar Manuel Klimek2016-01-22
| | | | | | | | | | | | Currently for a library: cc_library(name='a', hdrs=['a.cc']) we compile a.cc into a.pic.o and link that into its reverse dependencies. With this change, a .cc file in hdrs will be treated like a .inc file or a file in textual_hdrs. -- MOS_MIGRATED_REVID=112770625
* Extract parsing of the WORKSPACE file in two partsGravatar Damien Martin-Guillerez2016-01-22
| | | | | | | | | | | The WORKSPACE file AST is now parsed as a separate SkyFunction and this will be used to have multiple SkyValue for the same WORKSPACE file, splitting the execution of the AST after load statements to enable load statement of external dependencies in the WORKSPACE file. -- MOS_MIGRATED_REVID=112768897
* Restore jsch as a runtime_dep of bazel-repository.Gravatar David Chen2016-01-22
| | | | | | | Issue: #802 -- MOS_MIGRATED_REVID=112768782
* Make SkylarkList a List.Gravatar Francois-Rene Rideau2016-01-22
| | | | | | | | | | | | | | | SkylarkList now implements the List interfaces, except that its mutating methods throw an UnsupportedOperationException, just like ImmutableList does. To actually mutate a SkylarkList, you need to pass a Location and a suitable Environment object with a matching Mutability while it is still active. Introduce SkylarkMutable and SkylarkMutable.MutableCollection to better handle mutable data structures. Remove some functions in EvalUtils made obsolete by this and previous changes regarding Skylark lists. -- MOS_MIGRATED_REVID=112768457
* Skylark, JS: nicer error message when a source file has an unknown type.Gravatar Laszlo Csomor2016-01-22
| | | | | -- MOS_MIGRATED_REVID=112766003
* Create convenience symlinks before the build so that they are available for ↵Gravatar Lukacs Berki2016-01-22
| | | | | | | | | intra-build debugging. As a drive-by fix, create the configuration-independent symlinks even when we have >1 target configurations. Fix broken windows! -- MOS_MIGRATED_REVID=112764311
* cpp: delete a mistaken note on ParseOptions() documentationGravatar Thiago Farina2016-01-22
| | | | | | | | | ParseOptions() function does not return any value (its type is void). -- Change-Id: I7e3b818169a304cc2ad6c8d1580ce010b7d79d12 Reviewed-on: https://bazel-review.googlesource.com/#/c/2740/ MOS_MIGRATED_REVID=112762600
* Properly filter out Aspect attributes when `blaze query` requests ↵Gravatar Dmitry Lomov2016-01-22
| | | | | | | | | --noimplicit_deps and/or --nohost_deps. RELNOTES: --noimplicit_deps and --nohost_deps work correctly for Aspect attributes. -- MOS_MIGRATED_REVID=112724917
* Extract AttributeInfoProvider interface for DependencyFilters.Gravatar Dmitry Lomov2016-01-22
| | | | | | | | This is in preparation of implementing dependency filtering correctly for aspects. -- MOS_MIGRATED_REVID=112721440
* Refactor dependency filtering out of Rule class.Gravatar Dmitry Lomov2016-01-22
| | | | | -- MOS_MIGRATED_REVID=112717648
* Allow filtering out some extra-actions related to Java proto compilation.Gravatar Carmi Grushko2016-01-22
| | | | | -- MOS_MIGRATED_REVID=112709717
* Fix NullPointerException in DelegatingWalkableGraphGravatar Damien Martin-Guillerez2016-01-22
| | | | | | | | | | Package name comparison did not included the repository name which leads to a crash when trying to build :* targets. Fixes #792. -- MOS_MIGRATED_REVID=112708531
* Improve space efficiency of Blaze action cache: For actions that don't ↵Gravatar Eric Fellheimer2016-01-22
| | | | | | | perform input discovery, there is no need to store the full set of edges in the action cache. This data is only used to formulate the set of input files for an action prior to checking the validity of a cache entry. For non-input-discovering actions, the set of input files is known statically and the action cache data is not used. -- MOS_MIGRATED_REVID=112704382
* Raise error if we find an unknown type in native.rule().Gravatar Han-Wen Nienhuys2016-01-21
| | | | | | | | | | | | Handle more types: * Boolean * TriState * SkylarkValue (eg. FileSetEntry) * skip Licenses, Distribs. -- MOS_MIGRATED_REVID=112690550
* Copy output files out of the sandbox even when the action failed.Gravatar Philipp Wollermann2016-01-21
| | | | | -- MOS_MIGRATED_REVID=112683298
* Create the convenience symlinks only after the build, and only those that ↵Gravatar Lukacs Berki2016-01-21
| | | | | | | | | point to an existing directory. This required fixing the worker strategy so that it reads params files not through said convenience symlinks, but from the execroot. -- MOS_MIGRATED_REVID=112682485
* Allow more flexibility on proto output formatter.Gravatar Miguel Alcon Pinto2016-01-21
| | | | | -- MOS_MIGRATED_REVID=112681274
* When using workers for Java compilation, build deploy jars and source jars ↵Gravatar Philipp Wollermann2016-01-21
| | | | | | | on the local machine, too. -- MOS_MIGRATED_REVID=112675289
* Fix extra_actions with sandboxing.Gravatar Brian Silverman2016-01-21
| | | | | | | | | | | | | | | The ExtraAction code assumed that it didn't need to list the runfiles of its tools when running locally, but this isn't true with sandboxing. I don't think fixing this will negatively affect anybody's performance because they probably don't have any runfiles because they currently can't use them, unless they're running actions remotely in which case this change has no effect. -- Change-Id: Ibeb3db9d31321912a7163d1bce0edf5f6288ea3e Reviewed-on: https://bazel-review.googlesource.com/#/c/2520/ MOS_MIGRATED_REVID=112670586
* Scaffolding for implementing symlinks on Windows. Gravatar Lukacs Berki2016-01-21
| | | | | | | | | | | | | | | At first, this will only be used for emulating the planned implementation on Linux to validate it a little more before starting with the big work of porting everything to Windows in case it is doomed to failure. In logging mode, the only places where we create symbolic links that we can't emulate with the plan (pointing to a non-existent file or to a file outside the output base and the source root, which are assumed to be writable): - ExecutionTool.createOutputDirectoryLinks(). If we won't have the convenience symlinks on Windows, I won't shed a tear (I'm wondering why, though, because they are between the output base and the source tree) - In the implementation of new_local_repository (Would need to be special-cased for Windows. No big deal.) - In the implementation of the .tar.gz decompressor (doesn't seem to be serious, either.) So this seems to be alright. Note, however, that we didn't check build-runfiles.cc, which might cause trouble. I don't remember any place where we create a link there that is illegal according to the above rules, though. -- MOS_MIGRATED_REVID=112659070
* Introduce implicit host_xcodes dependency on cc_test rules, as cc_test rules ↵Gravatar Chris Parsons2016-01-21
| | | | | | | require creation of CppCompileAction. -- MOS_MIGRATED_REVID=112630562
* Perform package loading in parallel with transitive target visitation. This ↵Gravatar Janak Ramakrishnan2016-01-21
| | | | | | | is a partial rollback of commit f1e257d because it turns out that loading sequentially can be a bottleneck. -- MOS_MIGRATED_REVID=112628616
* Enforce aspect configuration fragment specification when present.Gravatar Michael Staib2016-01-21
| | | | | | | | | | | | | | | | | If an aspect has specified its configuration fragment dependencies, use these in place of the rule's. Note that the dynamic configuration support for this is yet to come. Also in this CL: * RuleContext is constructed with a ruleClassNameForLogging, which allows error messages involving aspects to be clearer. RELNOTES[NEW]: Skylark aspects can now specify configuration fragment dependencies with fragments and host_fragments like rules can. -- MOS_MIGRATED_REVID=112614357
* Add a DEVELOPER_DIR make variable to genrules to propagate the apple xcode ↵Gravatar Chris Parsons2016-01-21
| | | | | | | | | | environment variable DEVELOPER_DIR to commands. If $(DEVELOPER_DIR) is included in the genrule command, we bootstrap the XCODE_VERSION_OVERRIDE environment variable to the command. The contract with the actual action executor is, if XCODE_VERSION_OVERRIDE is present in the environment, to additionally bootstrap the DEVELOPER_DIR absolute path to the command. -- MOS_MIGRATED_REVID=112605616
* Rename defaultShellEnvironment to localShellEnvironment and clarifyGravatar Han-Wen Nienhuys2016-01-21
| | | | | | | its intended use. -- MOS_MIGRATED_REVID=112598772
* Refer to objc's gcov under @bazel_toolsGravatar Kristina Chodorow2016-01-21
| | | | | | | | | | This is part of removing the requirement of having base_workspace in your package_path for bazel builds. This also removes --experimental_objc_gcov_binary, since it doesn't seem to be needed anymore. -- MOS_MIGRATED_REVID=112595137
* Make crashing test logger shut down the serverGravatar Michajlo Matijkiw2016-01-21
| | | | | | | | | Previously the crashing logger would allow the server process to survive which could leave things in a weird state if a crash was expected. Instead of throwing an exception shut down the runtime. -- MOS_MIGRATED_REVID=112589751
* Add a Java property to influence symlinking strategy so that we can test ↵Gravatar Lukacs Berki2016-01-20
| | | | | | | what kind of performance we could get from how we imagine it would work under Windows. -- MOS_MIGRATED_REVID=112572621
* Fix documentation of --[no]block_for_lockGravatar Googler2016-01-20
| | | | | | | | | | | | | | The help message of this option had the effect inversed. The default --block_for_lock setting makes the client block waiting for the lock when needed, and the flag needs to be unset with --noblock_for_lock to instead exit immediately. Also rename the dummy noblock_for_lock variable to blockForLock to match the naming convention. The variable is not used anywhere, as this class only exists for the help messages. -- MOS_MIGRATED_REVID=112566287
* Add titles to Bazel documentation pages.Gravatar David Chen2016-01-20
| | | | | | | Fixes #790 -- MOS_MIGRATED_REVID=112563137
* Remove stray ul tag.Gravatar Alex Humesky2016-01-20
| | | | | -- MOS_MIGRATED_REVID=112562308