aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java
Commit message (Collapse)AuthorAge
* Allow modules to inject a custom AttributeContainer.Gravatar Janak Ramakrishnan2016-05-04
| | | | | -- MOS_MIGRATED_REVID=121497233
* Switch to using ../repo-name syntax for runfilesGravatar Kristina Chodorow2016-05-04
| | | | | -- MOS_MIGRATED_REVID=121475668
* Adds the compiler to the key for selecting the cc_toolchain label inGravatar Alex Humesky2016-05-04
| | | | | | | | | | | cc_toolchain_suite. This will allow selecting the correct toolchain based on --compiler / --android_compiler. RELNOTES: The key for the map to cc_toolchain_suite.toolchains is now a string of the form "cpu|compiler" (previously, it was just "cpu"). -- MOS_MIGRATED_REVID=121418076
* Remove a dependency on dart_library rule from ↵Gravatar Dmitry Lomov2016-05-03
| | | | | | | ConfiguredTargetTransitivePackagesTest. -- MOS_MIGRATED_REVID=121398365
* When creating the exec root symlink forest, take account of the empty ↵Gravatar Janak Ramakrishnan2016-05-03
| | | | | | | | | package's package root when creating top-level directories. Otherwise, if the empty package references files in those top-level directories, they would be hidden. Fixes #1221 -- MOS_MIGRATED_REVID=121392128
* Port tests using abi_deps to select.Gravatar Greg Estren2016-05-03
| | | | | | | "abi" / "abi_deps" are being removed imminently. -- MOS_MIGRATED_REVID=121380507
* Add a //file target to external jar repositoriesGravatar Colin Marc2016-05-03
| | | | | | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/990. It's sometimes useful to be able to access the file pulled down with maven_jar; for example, scala macro jars don't work with ijar, so it's necessary to pull them into the compile-time classpath unharmed. -- Change-Id: I1d9e1cb30ea6fa56c18cbfcc68ee9b203524dfd4 Reviewed-on: https://bazel-review.googlesource.com/#/c/3550 MOS_MIGRATED_REVID=121379551
* Set the default workspace name to __main__Gravatar Kristina Chodorow2016-05-03
| | | | | | | | | | | | | See https://github.com/bazelbuild/bazel/wiki/Updating-the-runfiles-tree-structure for more details about this change. RELNOTES[INC]: Bazel will now default to using __main__ as the workspace name (instead of "", as previously) if a project does not provide a workspace name in the WORKSPACE file. The repository's runfiles will appear under x.runfiles/__main__/. -- MOS_MIGRATED_REVID=121376094
* --Gravatar Googler2016-05-03
| | | | MOS_MIGRATED_REVID=121373163
* Prioritize kwarg presence error in invokeObjectMethod.Gravatar Googler2016-05-03
| | | | | | | | | | | I believe the original intention of this error check was to always fail if kwargs were present (while Skylark doesn't support kwargs, at least). However, the current code will most likely fail at findJavaMethod because only the args (i.e. not the kwargs) are used to find a matching method. This issue has already been encountered on the bazel-discuss group (g/bazel-discuss/hHyf2txlS70). With the proposed modification, I believe any kwargs provided to Skylark methods will cause the kwarg-specific error. -- MOS_MIGRATED_REVID=121345719
* Set workspace name for http_file, http_jar, and maven_jarGravatar Kristina Chodorow2016-05-03
| | | | | | | | | | | | | | | | Fixes #1166. While I was here, I also: * Renamed the implementations of Decompressor to show that they are Decompressors, not SkyFunctions (they used to be, it's confusing to have them still have the -Function suffix). * Added a unit test and moved the testing target to the rule/repository subdirectory, since it was a good chance to break off a tiny chunk of the monolithic BUILD file in lib/. -- MOS_MIGRATED_REVID=121306165
* In InvocationPolicyEnforcer#enforce, instead of just checking the direct ↵Gravatar Janak Ramakrishnan2016-05-02
| | | | | | | | | | | command to see if a flag policy applies, check whether the flag applies by seeing if its list of commands matches one of the commands in the hierarchy. This avoids the tedious and brittle specification of all commands that may use a flag, while providing better filtering out of inapplicable flags. RELNOTES: A FlagPolicy specified via the --invocation_policy flag will now match the current command if any of its commands matches any of the commands the current command inherits from, as opposed to just the current command. -- MOS_MIGRATED_REVID=121159131
* Push some functionality from FoundationTestCase to where it's actually used.Gravatar Ulf Adams2016-04-29
| | | | | -- MOS_MIGRATED_REVID=121116897
* Let select() "unset" values via: select({"//some:condition: None }).Gravatar Greg Estren2016-04-29
| | | | | | | | | | | | | | This not only uses the default value when applicable, but also causes ConfiguredAttributeMapper.isAttributeValueExplicitlySpecified to return false. Note the default value can come from two places: from the rule definition if specified, otherwise from the type default. RELNOTES[NEW]: select({"//some:condition: None }) is now possible (this "unsets" the attribute). -- MOS_MIGRATED_REVID=121029815
* Inject the Constants.TOOLS_REPOSITORY in SkylarkRuleClassFunctions.testBaseRule Gravatar Luis Fernando Pino Duque2016-04-29
| | | | | | | | | | | | | via the Skylark and delete the constant. Also, change the isLoadingPhase in the Skylark environment an enum Phase in order to: - Decide whether testRules are enabled or not and, - Check that the toolsRepository is set when in the LOADING phase. Finally, a few tests that were using ConfiguredRuleClassProvider directly had to be updated to set a tools repository, otherwise createGlobals() fails. -- MOS_MIGRATED_REVID=121022804
* Allows network in sandbox, when --java_debug. Fixes #393.Gravatar Yue Gan2016-04-28
| | | | | -- MOS_MIGRATED_REVID=121002371
* Precompute defaults package content to save ~milliseconds every time ↵Gravatar Janak Ramakrishnan2016-04-28
| | | | | | | | | BlazeRuntime#getDefaultsPackageContent is called. Thanks to nharmata for the suggestion. -- MOS_MIGRATED_REVID=120984951
* Add random-access indexing into GroupedList. Intended to be a no-op, ↵Gravatar Janak Ramakrishnan2016-04-28
| | | | | | | allowing for future work that may want to access a particular group in the GroupedList without advancing the iterator. -- MOS_MIGRATED_REVID=120933039
* Set Bazel's workspace nameGravatar Kristina Chodorow2016-04-27
| | | | | | | | | | RELNOTES: Bazel's workspace name is now io_bazel. If you are using Bazel's source as an external repository, then you may want to update the name you're referring to it as or you'll begin seeing warnings about name mismatches in your code. -- MOS_MIGRATED_REVID=120926179
* Delete the interface NativeAspectFactory and make native aspects extend from ↵Gravatar Luis Fernando Pino Duque2016-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NativeAspectClass. This a large refactoring of the aspects, currently we have the following: - AspectClasses: The interface AspectClass is a implemented by either SkylarkAspectClass or NativeAspectClass<NativeAspectFactory>. They are wrappers for the AspectFactories and they hold the information about the Class<> of the factory. - AspectFactories (FooAspect.java): Represented by the interfaces ConfiguredAspectFactory and NativeAspectFactory, also by the interface ConfiguredNativeAspectFactory which is the union of the two aforementioned interfaces. All aspects implement ConfiguredNativeAspectFactory except Skylark aspects which implement only ConfiguredAspectFactory. After this CL the distinction between NativeAspectFactories and NativeAspectClasses dissappear, namely aspect that extends NativeAspectClass is considered native and if it implements ConfiguredAspectFactory it is configured. Therefore the interfaces NativeAspectFactory and ConfiguredNativeAspectFactory both disappear. With this refactoring the aspectFactoryMap in the ConfiguredRuleClassProvider changes its type from (String -> Class<? extends NativeAspectClass>) to (String -> NativeAspectClass) which means it is now able to have an instance of the aspect instead of its Class only. By doing this, it is now possible to pass parameters when creating an aspect in the ConfiguredRuleClassProvider. -- MOS_MIGRATED_REVID=120819647
* Fix a race condition introduced in unknown commit (that is, the January of ↵Gravatar Lukacs Berki2016-04-26
| | | | | | | | | | | | | 2009!). If a "blaze clean --expunge" was run concurrently with another command (that was waiting for the lock), it's possible that the clean command deletes the lock file, the new server starts up, then the JVM shutdown hooks delete the PID files from the *new* server. There is still a slight possibility of a race condition if the lock is deleted then IOException occurs which prevents the BlazeShutdownException from being raised, but I'd rather not introduce another channel from command implementations to RPCServer to close that loophole. This issue was triggered by commit 5a78166ee4edbd295f5d5fdb94785025285e764b, after which the PID files for the new server are written a bit more early, thus increasing the time window in which the race condition can happen. -- MOS_MIGRATED_REVID=120805163
* Fix the documentation generator to use rule definition instances instead of ↵Gravatar Luis Fernando Pino Duque2016-04-26
| | | | | | | classes. -- MOS_MIGRATED_REVID=120794657
* Split ActionMetadata into ActionAnalysisMetadata and ActionExecutionMetadata.Gravatar Rumou Duan2016-04-26
| | | | | | | Except in action execution logic (ActionExecutionFunction, SkyframeActionExecutor, etc.), switch Action interface references to either ActionAnalysisMetadata if possible or ActionExecutionMetadata. -- MOS_MIGRATED_REVID=120723431
* Create runfiles at both .runfiles/ws/external/repo and .runfiles/repoGravatar Kristina Chodorow2016-04-26
| | | | | | | | | The major piece of #848. RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles. -- MOS_MIGRATED_REVID=120722312
* Add mechanism to crosstool language to specify action-specific execution ↵Gravatar Cal Peyser2016-04-25
| | | | | | | requirements. Uses this mechanism to configure c/c++ compilation and linking for darwin execution from the crosstool. -- MOS_MIGRATED_REVID=120701108
* Fix target parsing bug with targets in the empty package (e.g. "blah" was ↵Gravatar Nathan Harmata2016-04-22
| | | | | | | | | | | | | incorrectly not being parsed as "//:blah"). Also add tests for parsing absolute labels in the empty package. The empty package has been a thing in Bazel for a while now. Note that the old error message in this case "couldn't determine target for filename 'blah'" was almost always misleading and unhelpful since we were (almost certainly incorrectly) assuming the user intended for 'blah' to be an input file in the empty package. Now the error message would be "no such target '//:blah'") which is similarly misleading and unhelpful but probably marginally less so. If we desire to improve this, a future cleanup can introduce smarter error messages. -- MOS_MIGRATED_REVID=120566819
* Check for additions to the directory in new_local_repositoryGravatar Kristina Chodorow2016-04-22
| | | | | | | | | | Fixes #806. RELNOTES: External repository correctness fix: adding a new file/directory as a child of a new_local_repository is now noticed. -- MOS_MIGRATED_REVID=120557511
* Make aspects work through bind(). Gravatar Lukacs Berki2016-04-22
| | | | | | | | | | | bind() is assumed to be able to provide any provider. This is suboptimal, but beats the alternative of traversing the dependency graph to an arbitrary depth. The reason for the removal of the iteration ability in TransitiveInfoCollection is that now aspects can be attached to BindConfiguredTarget, too, which is not a RuleConfiguredTarget. Whereas I could have implemented the iterator, it was used only in BindConfiguredTarget anyway, so there didn't seem to be much reason to. Some work towards #952. -- MOS_MIGRATED_REVID=120549877
* Skylark aspects should always output to bin directory.Gravatar Dmitry Lomov2016-04-22
| | | | | -- MOS_MIGRATED_REVID=120539216
* Automated [] rollback of commit 857cda2c45a5cc68c3fa398311c48c571a64915d and ↵Gravatar Damien Martin-Guillerez2016-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit 790d2f6009d47fe92cf0cd92a1473bbf0141f32e. *** Reason for rollback *** Broke non-Bazel projects on ci.bazel.io Fixes #1168 *** Original change description *** Move the runfiles for external repositories to under the x.runfiles/ directory This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles.... *** -- MOS_MIGRATED_REVID=120535721
* Actions for rules that do not have 'use_header_modules' enabled should not haveGravatar Manuel Klimek2016-04-22
| | | | | | | header modules as inputs. -- MOS_MIGRATED_REVID=120473286
* Make constraints and select() work well with each other.Gravatar Greg Estren2016-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements most of a design proposal that splits constraint checking into two pieces: *static* checks, which apply the standard constraint checking done today, and *refined* checks, which selectively prune environments based on select paths and check that not every environment gets pruned out. As a result of this change, dependencies like: java_library( name = "lib", restricted_to = [":A", ":B"], deps = select({ ":config_a": [":depA"], ":config_b": [":depB"], })) java_library( name = "depA", restricted_to = [":A"]) java_library( name = "depB", restricted_to = [":B"]) are allowed. Specifically, even though neither "depA" nor "depB" supports [":A", ":B"], the combination of the two does. So the select as a whole supports all environments declared in lib, even though only one of those environments actually gets chosen for a given build. Refinement makes lib "match" the chosen path. So for "config_a" builds, lib's environment set is "refined" down to [":A"], meaning [":B"]-restricted rules cannot depend on it. Likewise, for "config_b" builds, lib's environment set is "refined" down to [":B"], meaning [":A"]-restricted rules cannot depend on it. This guarantees that the restrictions imposed by the chosen select path propagate faithfully up the dependency chain. See new documentation in ConstraintSemantics.java for more details. -- MOS_MIGRATED_REVID=120464241
* Refactor the Event class; always construct through static methods.Gravatar Ulf Adams2016-04-21
| | | | | -- MOS_MIGRATED_REVID=120418505
* --Gravatar Michael Staib2016-04-21
| | | | MOS_MIGRATED_REVID=120353718
* Disable the generating .gcno files for .pcm compile actions. These can conflictGravatar Googler2016-04-21
| | | | | | | with the .gcno files for the actual .cc files. -- MOS_MIGRATED_REVID=120338906
* Add nullable variants to Fingerprint.Gravatar Ulf Adams2016-04-20
| | | | | -- MOS_MIGRATED_REVID=120325869
* Delete the defaultMultipleValue field from options and refactor the logic ↵Gravatar Luis Fernando Pino Duque2016-04-20
| | | | | | | | | | | | | | | | for retrieving the default values of options. The field defaultMultipleValue was introduced in commit 51a491b89a9cd5f15c9a093a5693bc37e696e6e1 to allow defining a default value for options that set allowMultiple. However due to the limitations of the optionsParser end up being not useful since we cannot guarantee that an option that allows multiple has a converter that returns a list of values. Thus this CL deletes code that may confuse even more and clarifies the mechanism that the options currently use to obtain their default values. -- MOS_MIGRATED_REVID=120317261
* Introduce SplitTransitionProvider, to determine the split transition on an ↵Gravatar Chris Parsons2016-04-20
| | | | | | | attribute based on the Rule itself (the transition may thus be determined based on the values of other attributes of the rule) -- MOS_MIGRATED_REVID=120275649
* Block when another command is running on the server and not on the client ↵Gravatar Lukacs Berki2016-04-20
| | | | | | | when in gRPC mode. -- MOS_MIGRATED_REVID=120233121
* Move the runfiles for external repositories to under the x.runfiles/ directoryGravatar Kristina Chodorow2016-04-20
| | | | | | | | | | | | | | | This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles. --- Furthermore, if a Bazel project does not provide a workspace name in the WORKSPACE file, Bazel will now default to using __main__ as the workspace name (instead of "", as previously). The repository's runfiles will appear under x.runfiles/__main__/. -- MOS_MIGRATED_REVID=120224534
* Allow external repositories to have includes attributes that point to ↵Gravatar Janak Ramakrishnan2016-04-19
| | | | | | | | | packages not in third_party. We don't need to police users' external repositories. Fixes #1151 -- MOS_MIGRATED_REVID=120222222
* Add mechanism to crosstool language to specify action-specific execution ↵Gravatar Cal Peyser2016-04-19
| | | | | | | requirements. Uses this mechanism to configure c/c++ compilation and linking for darwin execution from the crosstool. -- MOS_MIGRATED_REVID=120218079
* Review a number of action subclasses and update them according to the spec.Gravatar Ulf Adams2016-04-19
| | | | | | | | | | Second pass. Consists of adding @Immutable annotations, adding final modifiers, and changing the types of fields to immutable types. -- MOS_MIGRATED_REVID=120216592
* Rename LateBoundLabel#getDefault(Rule, AttributeMap, T) to #resolve().Gravatar Lukacs Berki2016-04-19
| | | | | | | Its old name was confusing because resolve() and getDefault() do radically different things: getDefault() returns a good enough lie for when BuildConfiguration is not available, and resolve() resolves the dependency when we do have a BuildConfiguration. -- MOS_MIGRATED_REVID=120212630
* Do not start the AF_UNIX server when in gRPC mode.Gravatar Lukacs Berki2016-04-19
| | | | | | | Work towards #930. With this, it's conceivable that server mode works on Windows to some degree (I haven't tried, though, because there are many issues that need to be fixed) -- MOS_MIGRATED_REVID=120202037
* Deprecate top-level Java toolchain flags in favour of java_toolchainGravatar Liam Miller-Cushon2016-04-19
| | | | | | | | | | | | | This change disables --java_langtools, --javabuilder_top, --singlejar_top, --genclass_top, and --ijar_top, and finishes replacing them with java_toolchain.{javac,javabuilder,singlejar,genclass,ijar}. RELNOTES: Replace --java_langtools, --javabuilder_top, --singlejar_top, --genclass_top, and --ijar_top with java_toolchain.{javac,javabuilder,singlejar,genclass,ijar} -- MOS_MIGRATED_REVID=120154954
* Change misleading warning when an error is encountered while loading a ↵Gravatar Janak Ramakrishnan2016-04-19
| | | | | | | target. We also no longer say that the target will not be built because it may well happen during a query, when no building is happening anyway. -- MOS_MIGRATED_REVID=120130554
* Add sanity unit test for options classes that are subclasses of other ↵Gravatar Nathan Harmata2016-04-19
| | | | | | | options classes. -- MOS_MIGRATED_REVID=120125572
* Tolerate NoSuchPackageException when processing subdirectories.Gravatar Janak Ramakrishnan2016-04-18
| | | | | | | | | | | In RecursiveDirectoryTraversalFunction, we must tolerate NoSuchPackageException being thrown by subdirectories' nodes, since that can happen in a nokeep_going build. -- Change-Id: Id9a48256aa209775f27130186c58e03c788d20a9 Reviewed-on: https://bazel-review.googlesource.com/#/c/3392/5 MOS_MIGRATED_REVID=120081575
* Make ExperimentalStateTracker aim for target widthGravatar Klaus Aehlig2016-04-18
| | | | | | | | | | | | Optionally support a target width for the experimental state tracker; if given, it will try to produce a status bar with lines shorter than that limit, if possible, so that the status bar does not have to be broken. -- Change-Id: Ic5843285300ec10cf3e21b9b7402a6557f6bdb5e Reviewed-on: https://bazel-review.googlesource.com/#/c/3374 MOS_MIGRATED_REVID=119954289