aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google
Commit message (Collapse)AuthorAge
* Have AQV propagate the most severe error encountered by any of its tasks. ↵Gravatar Nathan Harmata2016-08-12
| | | | | | | | | Make sure that ParallelEvaluator treats SchedulerExceptions as less severe than other RuntimeExceptions (it already did, but add a comment emphasizing this). The combination of the above means that we don't ignore hypothetical crashes in ParallelEvaluator worker threads _after_ a SchedulerException (e.g. due to an error in nokeep_going evaluation). -- MOS_MIGRATED_REVID=130044230
* Changes DependencyResolver <Attribute, Dep> map from a ListMultimap to new classGravatar Greg Estren2016-08-12
| | | | | | | | | | | | | | | | | | | | | | OrderedSetMultimap. This maintains insertion order while eliminating duplicates. Certain rules, in particular, otherwise break this invariant: https://github.com/bazelbuild/bazel/blo[]e3e28274cca5b87f48abe33884edb84016dd3/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java#L403 There's no reason (to my knowledge) to need multiple instances of the same <Attribute, Dependency> pair. More context from Google code review: (Michael Staib): > There are many things which pass around a dependentNodeMap or help construct one or modify one. We want an interface which has the right guarantees. > ListMultimap is not the right interface because it has no guarantee of unique elements, which we want - we don't want the problem that this CL ran into, and there's no reason (that we know of, to be confirmed) that anyone would want multiple identical Dependencies. > SetMultimap is not the right interface because it has no guarantee of deterministic iteration order or efficient iteration, which we want - dependency order sometimes matters (e.g., Java classpath or C++ link order). > We agreed that the best way to get what we want is to define our own interface with its own simultaneous uniqueness and iterability guarantees. Unspoken in the discussion was why we wouldn't just use LinkedHashMultimap as the thing we pass around. IMO the reason for that is that we don't care that it be a LinkedHashMultimap specifically; if tomorrow Guava comes out with a faster cooler map that has deterministic and efficient iteration and guarantees element uniqueness, we want it. > In this case we're going to make the "interface" be a (final?) class: OrderedSetMultimap, an extension of ForwardingSetMultimap which delegates to LinkedHashMultimap, an implementation which does support both of those guarantees. > I had mentioned in the conversation that none of the Multimap implementations make guarantees about key iteration order, but this is not true - LinkedHashMultimap preserves key insertion order. We should perhaps declare this as part of the OrderedSetMultimap contract as well. -- MOS_MIGRATED_REVID=130037643
* Rollback of commit f107debac45ddf5859b1eb963379769b5815b18f. Also includes ↵Gravatar Janak Ramakrishnan2016-08-12
| | | | | | | | | the logical rollback of commit 67ad82a319ff8959e69e774e7c15d3af904ec23d. RELNOTES[INC]: Bazel supports Unix domain sockets for communication between its client and server again, temporarily, while we diagnose a memory leak. -- MOS_MIGRATED_REVID=130027009
* Roll forward fix of global var shadow detectionGravatar Jon Brandvein2016-08-12
| | | | | | | RELNOTES[INC]: Skylark: It is an error to shadow a global variable with a local variable after the global has already been accessed in the function. -- MOS_MIGRATED_REVID=130014492
* Record the category of the artifact to be linked in LinkerInput.Gravatar Lukacs Berki2016-08-12
| | | | | | | | | It's currently only used for sanity checks, but the idea is that we'll use this field to decide what to do with a given linker input instead of inferring things from its file name. Also make artifact name creation a bit simpler by using the same set of variables for compiler and linker outputs. -- MOS_MIGRATED_REVID=129990944
* Add the repository name as a parameter to the output path functionsGravatar Kristina Chodorow2016-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't do anything yet, it's in preparation for the execroot rearranging change. The execroot will have one bazel-out per repo, so it'll look like: execroot/ repo1/ bazel-out/ local-fastbuild/ bin/ repo2/ bazel-out/ local-fastbuild/ bin/ genfiles/ repo3/ bazel-out/ local-fastbuild/ testlogs/ and so on. Thus, any output path (getBinDirectory() & friends) needs to know what the repo name is. This changes so many places in the code I thought it would be good to do separately, then just flip the functionality in the execroot-rearranging commit. While I was poking around, I changed all of the refs I could from getPackageRelativeArtifact() to getBin/GenfilesArtifact(), so that 1) rule implementation don't have to know as much about roots and 2) they'll be more isolated from other output dir changes. `bazel info` and similar just return roots for the main repository. The only "change" is passing around a target label in the Java rules. Continues work on #1262. -- MOS_MIGRATED_REVID=129985336
* Replace calls to <class>.newInstance with <class>.getConstructor().newInstance.Gravatar Ulf Adams2016-08-12
| | | | | | | This is safer; newInstance on class objects bypasses exception checking. -- MOS_MIGRATED_REVID=129976805
* Add ide-compile output group to IDE aspect.Gravatar Googler2016-08-11
| | | | | | | | | | | | This output group will contain all artifacts that are needed to compile the project (and get compilation errors), but aren't needed during the resolve step. Initially ide-compile is the object file output from any cc_* rule, so we can get compile errors. -- MOS_MIGRATED_REVID=129937436
* Rollback of commit fbaa700337bf0cf9083f083e6cd0d2f82faf1506.Gravatar Googler2016-08-11
| | | | | | | | | | | | | | | | *** Reason for rollback *** I want to do this in a way that exposes the data attribute only for android_test and android_binary, so I'll add it to the deploy manifest instead. *** Original change description *** Expose test "data" attribute to IDE. This is needed to deploy android_tests to the device for testing. For symmetry we expose it for all tests rules. -- MOS_MIGRATED_REVID=129926351
* Fix bug in ParallelEvaluator when an error dep was not newly requested in a ↵Gravatar Janak Ramakrishnan2016-08-11
| | | | | | | | | nokeep_going build because it finished building in between the time it was first requested and when we checked it for done-ness after the SkyFunction evaluation. This results in an IllegalStateException that gets ignored (and, importantly, not propagated) by AbstractQueueVisitor because AbstractQueueVisitor only records and propagates the first Throwable encountered. For nokeep_going evaluations, this will be the SchedulerException that we use for control flow. The IllegalStateException in question is benign in this case because it's merely from a Preconditions failure and doesn't leave anything in a bad state. It's possible, though, that we have other bugs that are being masked in this way. -- MOS_MIGRATED_REVID=129919336
* Expose test "data" attribute to IDE.Gravatar Googler2016-08-11
| | | | | | | | This is needed to deploy android_tests to the device for testing. For symmetry we expose it for all tests rules. -- MOS_MIGRATED_REVID=129918247
* Rollback of commit 6aa2f64045d390f4da77d396cd3fcbe1c44a98c1.Gravatar Chris Parsons2016-08-11
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks release. *** *** Original change description *** Fix Environment.Continuation's tracking of global variables RELNOTES[INC]: Skylark: It is an error to shadow a global variable with a local variable after the global has already been accessed in the function. -- MOS_MIGRATED_REVID=129910501
* Dynamic config test improvements:Gravatar Greg Estren2016-08-11
| | | | | | | | - Adds a helper routine to get all configured targets with a given label - Enhances latebound split test to check that deps actually take expected configurations -- MOS_MIGRATED_REVID=129906477
* Roll forward commit 94c86135d05a1844263c59f3ce6b1c1917e0f4c8Gravatar Liam Miller-Cushon2016-08-11
| | | | | | | And don't provide a default value for :java_launcher -- MOS_MIGRATED_REVID=129900898
* Get rid of InvalidatableGraph. This explicit concept is no longer needed.Gravatar Nathan Harmata2016-08-11
| | | | | -- MOS_MIGRATED_REVID=129895423
* Add 'provider()' function.Gravatar Dmitry Lomov2016-08-11
| | | | | -- MOS_MIGRATED_REVID=129889793
* Store non-code inputs to link actions separately.Gravatar Lukacs Berki2016-08-11
| | | | | | | | | | | | This is a re-submission of commit 99de0d07574f808fee36826289cb1f5c83e3b3e0 (rolled back in commit eff8b365c172b7e904ac6f7bba0c893fed7c91a8) and a few tweaks: - The fix for the bug that caused the rollback (see line 888 in CppModel.java -- we now use addNonCodeInputs() instead of addObjectFiles() to pass in the processed header tokens) - A few extra assertions - A test case - The re-submission of the parts of commit 603b540bbcd7414cd3e2c0b92c1c8985b035e41b that were also rolled back as collateral damage. The bug report didn't contain a precise reproduction, but the bug is trivial enough that I'm comfortable with things this way. -- MOS_MIGRATED_REVID=129872117
* Substituted NoSuchVariableException with manual checks for performance purposesGravatar Vladimir Moskva2016-08-11
| | | | | -- MOS_MIGRATED_REVID=129869968
* Move workspace initialization out of BlazeRuntime.Builder.Gravatar Ulf Adams2016-08-10
| | | | | | | Require all callers to call initWorkspace after BlazeRuntime construction. -- MOS_MIGRATED_REVID=129842292
* Implements dynamic split transitions on latebound attributes.Gravatar Greg Estren2016-08-10
| | | | | | | | | With this change, dynamic configs are at full feature parity for split transitions (minus some small differences in composed transitions from BuildConfigurationCollection.configurationHook). -- MOS_MIGRATED_REVID=129802414
* Rollback of commit 99de0d07574f808fee36826289cb1f5c83e3b3e0.Gravatar Googler2016-08-10
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Makes blaze unable to build //third_party/stl IllegalArgumentException: complex.h.processed at com.google.common.base.Preconditions.checkArgument(Preconditions.java:127) at com.google.devtools.build.lib.util.Preconditions.checkArgument(Preconditions.java:38) at com.google.devtools.build.lib.rules.cpp.CppLinkActionBuilder.addObjectFile(CppLinkActionBuilder.java:831) NOT a clean rollback; conflict in one file (CppCompilationContext.java). So this also partially rolls back commit 603b540bbcd7414cd3e2c0b92c1c8985b035e41b (just the change in that file). *** Original change description *** Cleanup: store non-code inputs to link actions separately. -- MOS_MIGRATED_REVID=129798636
* Allow ImplicitOutputsFunctions to be overriden on Rule creation.Gravatar Michajlo Matijkiw2016-08-10
| | | | | -- MOS_MIGRATED_REVID=129787305
* Apply extra actions to top-level aspects.Gravatar Dmitry Lomov2016-08-10
| | | | | -- MOS_MIGRATED_REVID=129759632
* Drive-by cleanup to remove unnecessary function from the ActionCache interface.Gravatar Shreya Bhattarai2016-08-10
| | | | | -- MOS_MIGRATED_REVID=129753109
* Cleanup: store non-code inputs to link actions separately.Gravatar Lukacs Berki2016-08-10
| | | | | -- MOS_MIGRATED_REVID=129743936
* Split BlazeDirectories into two classes.Gravatar Ulf Adams2016-08-09
| | | | | | | | | | | | | This is done in preparation for allowing multiple workspaces / commands in a single server. That requires changes to the module API, which currently hard-codes a 1:1 correspondence between workspaces and servers. Note how BlazeDirectories exists even when it runs outside a workspace. It's not ideal that the output base is in ServerDirectories, and the BlazeRuntime creation also still requires a BlazeDirectories instance. -- MOS_MIGRATED_REVID=129736613
* Refactor C++ rules so that CcLinkingOutputs.libraryIdentifierOf() gets ↵Gravatar Lukacs Berki2016-08-09
| | | | | | | called at places where a CcToolchainProvider is near so that we can use information in it to infer how each input file is linked. -- MOS_MIGRATED_REVID=129729628
* Add SkylarkClassObjectConstructor - a future return value of "provider" ↵Gravatar Dmitry Lomov2016-08-09
| | | | | | | function. -- MOS_MIGRATED_REVID=129726780
* Error out if loading phase error encountered even if we skip analysis. Also ↵Gravatar Janak Ramakrishnan2016-08-09
| | | | | | | change error messages in these cases to not assume there was an execution phase. -- MOS_MIGRATED_REVID=129723717
* ProxyHelper handles proxy URLs with trailing slash.Gravatar Christoph Siedentop2016-08-09
| | | | | | | | | | | | | | | Having a proxy URL defined with a trailing slash caused an exception. `Proxy address ... is not a valid URL"` This pull request fixes this issue. I also added two test cases for this issue. 1. Trailing slash in proxy URL. 2. No user:password provided in proxy URL. Closes #1597. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/1597 MOS_MIGRATED_REVID=129721433
* Add a builder-like mechanism for writing targets to a Scratch instance that isGravatar Cal Peyser2016-08-09
| | | | | | | usable across front-end types. -- MOS_MIGRATED_REVID=129633711
* Implements dynamic split transitions (minus latebound attribute splits).Gravatar Greg Estren2016-08-08
| | | | | | | | | | With the prereq work behind this, this is surprisingly straightforward. The main change is to eliminate BuildConfiguration.SplittableTransitionApplier, make both DynamicTransitionApplier and StaticTransitionApplier split-aware, and add awareness of this to ConfiguredTargetFunction.trimConfigurations. Latebound splits will follow next. -- MOS_MIGRATED_REVID=129480309
* Remove the AF_UNIX client/server communication protocol.Gravatar Lukacs Berki2016-08-05
| | | | | | | | | It has been superseded by gRPC. RELNOTES[INC]: Blaze doesn't support Unix domain sockets for communication between its client and server anymore. Therefore, the --command_port command line argument doesn't accept -1 as a valid value anymore. -- MOS_MIGRATED_REVID=129424092
* Avoid hard-coded extensions for compilation outputs.Gravatar Lukacs Berki2016-08-05
| | | | | | | | | The multi-layered transformation (base -> base.pic -> base.pic.pcm -> base.pic.pcm.d) is kinda ugly, but is preferable to having 22 separate, mostly orthogonal artifact categories. It's actually untested what happens if we put these new name patterns into the CROSSTOOL file. -- MOS_MIGRATED_REVID=129423055
* Make SkylarkClassObject "Bazel-specific".Gravatar Dmitry Lomov2016-08-05
| | | | | | | This in preparation to DeclaredProviders implementation. -- MOS_MIGRATED_REVID=129420617
* Fix Environment.Continuation's tracking of global variablesGravatar Jon Brandvein2016-08-05
| | | | | | | RELNOTES[INC]: Skylark: It is an error to shadow a global variable with a local variable after the global has already been accessed in the function. -- MOS_MIGRATED_REVID=129365195
* Check that deeply nested values in sets are immutableGravatar Jon Brandvein2016-08-04
| | | | | -- MOS_MIGRATED_REVID=129331086
* Enable named arguments for SkylarkCallable annotationGravatar Damien Martin-Guillerez2016-08-04
| | | | | | | | | | This just add the support on the Skylark side, the documentation generator still needs to be updated. -- Change-Id: Ic26547cdb8d2c5c01839a4014c10f1b9b209b92b Reviewed-on: https://bazel-review.googlesource.com/#/c/4247/ MOS_MIGRATED_REVID=129328278
* Create Python executable zip fileGravatar Yun Peng2016-08-04
| | | | | | | | | | using --build_python_zip to specify it, by default it's enabled on Windows and disabled on other platforms. -- Change-Id: Ib992edaf70c08568816b973159a429ff7165eed8 Reviewed-on: https://bazel-review.googlesource.com/#/c/4244 MOS_MIGRATED_REVID=129326115
* Add a necessary dependency to options_test.Gravatar Lukacs Berki2016-08-04
| | | | | -- MOS_MIGRATED_REVID=129316675
* Remove static checks from the parser.Gravatar Laurent Le Brun2016-08-04
| | | | | -- MOS_MIGRATED_REVID=129313959
* Global cleanup change.Gravatar Googler2016-08-03
| | | | | -- MOS_MIGRATED_REVID=129226221
* Refactor CppLinkAction to construct its command line using the crosstool ↵Gravatar Cal Peyser2016-08-03
| | | | | | | instead of a hardcoded switch. Add action configs to CppConfiguration for each link type. -- MOS_MIGRATED_REVID=129221108
* Start removing the parsePython booleanGravatar Laurent Le Brun2016-08-03
| | | | | | | It's still used in one place and should be removed completely in October. -- MOS_MIGRATED_REVID=129207133
* Add an enum representing the specific build file name (WORKSPACE, BUILD) to ↵Gravatar John Cater2016-08-03
| | | | | | | the PackageLookupValue to reduce the number of references to the filename "BUILD". -- MOS_MIGRATED_REVID=129203257
* Preliminary cleanup for removing Blaze-specific code from the environmentGravatar Laurent Le Brun2016-08-03
| | | | | | | | The goal is to remove parse and eval functions from Environment, as well as isSkylark boolean. -- MOS_MIGRATED_REVID=129202204
* Provides a clearer message when target analysis fails because its dynamicGravatar Greg Estren2016-08-03
| | | | | | | | | | | | | | | config is missing required fragments. Before this change, Bazel crashes with the mysterious error: "Fragment foo can't load missing options BarOptions" with no details on which target or dep needed Foo. So figuring out the source of the error is painful. With this change, we instead get: //foo:foo: dependency //bar:bar from attribute "deps" is missing required config fragments: JavaConfiguration -- MOS_MIGRATED_REVID=129143764
* Delete NodeEntryField since it's now superfluous in the presence of the new ↵Gravatar Nathan Harmata2016-08-03
| | | | | | | QueryableGraph.Reason which conveys more information. Add a few more Reason enum values to make this refactor benign. -- MOS_MIGRATED_REVID=129118462
* ExperimentalStateTracker: make suffix gracefully handle negative lengthGravatar Klaus Aehlig2016-08-02
| | | | | | | | | | | | | | When requested to produce a suffix of a string of a string of a given length, gracefully handle the case where the requested length is negative---simply return the empty string in this case. While there, mark this static method as such; also increase visibility to default as it is generally useful and should be tested as an interface of this class. -- Change-Id: I821966f7ba3828809bc6d000358803c131740ec9 Reviewed-on: https://bazel-review.googlesource.com/#/c/4223 MOS_MIGRATED_REVID=129080284
* Move the --define command line option from CppConfiguration to ↵Gravatar Lukacs Berki2016-08-02
| | | | | | | | | | | BuildConfiguration. It makes much more sense there because it does *not* specify C++ #defines but BUILD variables. Also rename the getter method to make that clearer. This allows us to remove BuildConfiguration.Fragment#getCommandLineDefines(). -- MOS_MIGRATED_REVID=129080014