aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/packages
Commit message (Collapse)AuthorAge
* Skylark rules can now declare their required configuration fragmentsGravatar Florian Weikert2015-08-10
| | | | | -- MOS_MIGRATED_REVID=100163482
* Avoid duplicate Path --> PathFragment expansion in Package deserialization.Gravatar Eric Fellheimer2015-08-10
| | | | | -- MOS_MIGRATED_REVID=100138246
* Annotate every single rule with required configuration fragments.Gravatar Ulf Adams2015-08-10
| | | | | | | It's not locked down yet as Skylark rules can't declare required fragments. -- MOS_MIGRATED_REVID=100113647
* Remove dead codeGravatar Kristina Chodorow2015-08-06
| | | | | -- MOS_MIGRATED_REVID=100027280
* Refactor the missing fragment handling code to use a policy enum.Gravatar Ulf Adams2015-08-06
| | | | | | | | Flip the handling such that analysis failure is the default, rather than execution failure (fail action creation). -- MOS_MIGRATED_REVID=100020812
* Annotate AspectDefinition.attributeAspect @SafeVarargs to suppress warnings.Gravatar Ulf Adams2015-08-05
| | | | | -- MOS_MIGRATED_REVID=99904596
* Move MethodLibrary from packages to syntaxGravatar Francois-Rene Rideau2015-07-30
| | | | | -- MOS_MIGRATED_REVID=99396919
* Documented the iteration order of SkylarkNestedSets.Gravatar Florian Weikert2015-07-29
| | | | | | | Also added additional tests that check for the correct behavior regarding order. -- MOS_MIGRATED_REVID=99370126
* Add the default BUILD language functions to the WORKSPACE fileGravatar Damien Martin-Guillerez2015-07-29
| | | | | | | The WORKSPACE file didn't knew how to interpret l[0] where l is a list. -- MOS_MIGRATED_REVID=99366537
* Skylark documentation fixesGravatar Laurent Le Brun2015-07-29
| | | | | -- MOS_MIGRATED_REVID=99283744
* Reduce by 3x number of calls to LexerLocation lookups in package serialization.Gravatar Eric Fellheimer2015-07-29
| | | | | -- MOS_MIGRATED_REVID=99279879
* Add getter for RepositoryName#nameGravatar Michajlo Matijkiw2015-07-28
| | | | | | | | | This makes it easier to identify places where we rely on Repository#name(), as IDEs have an easier time finding occurences of this specific method vs finding occurences of toString(). -- MOS_MIGRATED_REVID=99221130
* Make default values of attributes point to the main repository.Gravatar Lukacs Berki2015-07-27
| | | | | | | Default values of attributes (e.g. "//tools/cpp:malloc" when an attribute declaration says .name("malloc").value("//tools/cpp:malloc")) are now considered as a label inside the main repository and not inside the external repository. This is consistent with how we treat implicit/default attributes and is useful because these are usually tool dependencies. -- MOS_MIGRATED_REVID=99160392
* Renamed Ident to Identifier, added some helper methods and refactored two ↵Gravatar Florian Weikert2015-07-23
| | | | | | | methods. -- MOS_MIGRATED_REVID=98922811
* Make the creation of the external package much simpler.Gravatar Lukacs Berki2015-07-23
| | | | | | | A previous change made the loading-time external label resolution unused, thus, now we can do away with a lot of machinery. The only unfortunate side effect is that instead of a nice and clear "No Android SDK found" error message, you'll get a more cryptic "external label //external:android/sdk is unbound" one. I think it's a fair tradeoff. -- MOS_MIGRATED_REVID=98813719
* Make two Skyframe nodes with the same events and values equal.Gravatar Janak2015-07-13
| | | | | | | | | | | | | | | | | | | | | | We do this by implementing equality for TaggedEvents (and all objects it transitively includes). Before this change, if a Skyframe node re-evaluated to the same value as in the previous build, but had (transitive) events, change pruning would not cut off the evaluation of its parents. This is not a big issue in practice because most nodes that would re-evaluate to the same value (like FileValues or GlobValues) never emit events, and others (like ActionExecutionValues) have secondary caches that mask this effect. Also do a drive-by fix where we were using the hash code of a nested set instead of the shallow hash code (didn't have any bad effects in practice because we never hash these values). (Minor formatting clean-ups from https://bazel-review.googlesource.com/1610 ) -- Change-Id: I751a8479627f0456993c5ec8834528aeb593d736 Reviewed-on: https://bazel-review.googlesource.com/1610 MOS_MIGRATED_REVID=98115908
* Disallow Skylark implicit outputs from referencing attributesGravatar Greg Estren2015-07-13
| | | | | | | | | | | | that use 'select': fail with a clean user error rather than crashing. Rule outputs are "special" in that they need to be defined before select statements can be evaluated (e.g. before the analysis phase begins). -- MOS_MIGRATED_REVID=98000760
* Provide placeholder rule class for deserialized Skylark rulesGravatar Mark Schaller2015-07-10
| | | | | | | | | | | | At this time, Skylark-defined rule classes don't get serialized, and aren't available at package deserialization time. To allow packages with Skylark-defined rule classes to deserialize, we provide a placeholder rule class implementation for deserialized Skylark rules. Resubmitting after previous rollback. -- MOS_MIGRATED_REVID=97972209
* Make globs work in remote repositories.Gravatar Lukacs Berki2015-07-08
| | | | | | | | | | | This involved quite a few changes, mainly changing a bunch of places where we refer to packages by a PathFragment to PackageIdentifier. The only wart is the code in PathPackageLocator: ideally, it would just call into PackageLookupFunction. Unfortunately, it is (through globbing and Parser.include) called from within a Skyframe function, and we don't want to have two eval() calls going on at the same time, so we cannot use that. There is a potential correctness issue there: PathPackageLocator now assumes where external repositories are put and assumes that they are there when it gets control, but my understanding is that the associated RepositoryValue is always evaluated before, so it works out okay. -- MOS_MIGRATED_REVID=97751539
* Rollback of commit 4dbd628dc1384e5dce8c036e2b6bf93dd974bf04.Gravatar Mark Schaller2015-07-08
| | | | | | | | | | | | | | | | | | []*** Reason for rollback *** Large number of newly broken targets found by [] *** Original change description *** Provide placeholder rule class for deserialized Skylark rules At this time, Skylark-defined rule classes don't get serialized, and aren't available at package deserialization time. To allow packages with Skylark-defined rule classes to deserialize, we provide a placeholder rule class implementation for deserialized Skylark rules. -- MOS_MIGRATED_REVID=97716849
* Skylark: Fixed a bug where set.union() was erroneously seen as a global functionGravatar Florian Weikert2015-07-08
| | | | | -- MOS_MIGRATED_REVID=97681893
* Provide placeholder rule class for deserialized Skylark rulesGravatar Mark Schaller2015-07-08
| | | | | | | | | | At this time, Skylark-defined rule classes don't get serialized, and aren't available at package deserialization time. To allow packages with Skylark-defined rule classes to deserialize, we provide a placeholder rule class implementation for deserialized Skylark rules. -- MOS_MIGRATED_REVID=97679963
* Sort dict keys before transforming into ImmutableMap.Gravatar Han-Wen Nienhuys2015-07-07
| | | | | | | | This should fix ordering instability in XML query output for dict attributes. -- MOS_MIGRATED_REVID=97664430
* Allow Skylark rules to be private.Gravatar Laurent Le Brun2015-07-07
| | | | | -- MOS_MIGRATED_REVID=97662036
* Make absolute labels in remote repositories refer to the same repository by ↵Gravatar Lukacs Berki2015-07-07
| | | | | | | | | default. If we do otherwise, this makes it impossible to seamlessly move code from the main repository to another one, because if two targets (one depending another) were moved, the dependency edge would still point back to the main repository. -- MOS_MIGRATED_REVID=97650057
* Rollback of accidentally submitted change.Gravatar Lukacs Berki2015-07-07
| | | | | -- MOS_MIGRATED_REVID=97648982
* Make globs work in remote repositories.Gravatar Lukacs Berki2015-07-07
| | | | | | | | | | | This involved quite a few changes, mainly changing a bunch of places where we refer to packages by a PathFragment to PackageIdentifier. The only wart is the code in PathPackageLocator: ideally, it would just call into PackageLookupFunction. Unfortunately, it is (through globbing and Parser.include) called from within a Skyframe function, and we don't want to have two eval() calls going on at the same time, so we cannot use that. There is a potential correctness issue there: PathPackageLocator now assumes where external repositories are put and assumes that they are there when it gets control, but my understanding is that the associated RepositoryValue is always evaluated before, so it works out okay. -- MOS_MIGRATED_REVID=97647787
* Make the "actual" argument of bind() optional and do not point ↵Gravatar Lukacs Berki2015-07-01
| | | | | | | | | | | //external:android/sdk anywhere so that no Android-specific package is loaded when the user doesn't use an android_sdk_repository rule. To this end, SkyframePackageLoaderWithValueEnvironment.getLoadedTarget() doesn't resolve //external: labels anymore. This was only needed for JVM resolution, which was dealt with by adding and extra RedirectChaser.followRedirect() call to JvmConfigurationLoader. One hack less. On the flip side, BazelConfigurationCollection.collectTransitiveClosure() grew a hack to handle bind(), but that method is awful enough as it is anyway. -- MOS_MIGRATED_REVID=97307779
* Allow / in repository namesGravatar Kristina Chodorow2015-06-29
| | | | | -- MOS_MIGRATED_REVID=97125970
* Refactor the legacy globbing thread pool to make use of more modern ↵Gravatar Eric Fellheimer2015-06-29
| | | | | | | | | concurrency abstractions. Care is taken to maintain the invariant that the glob result returns after all of the work is done, even if there was an exception that cuts the task short. Interruption is an exception to this: In this case, the GlobCache later cancels the task and ensures it is done. -- MOS_MIGRATED_REVID=97000506
* Skylark: Glob argument is exclude, not excludesGravatar Laurent Le Brun2015-06-29
| | | | | -- MOS_MIGRATED_REVID=96991829
* Skylark: re-implemented String#format(), which has the following effects:Gravatar Florian Weikert2015-06-29
| | | | | | | | | - Braces can now be escaped ('{{' and '}}') - In addition to named arguments, both manual ('{0}') and automatic ('{}') positional replacement fields are supported - An error related to specific regex characters (such as '$') was fixed -- MOS_MIGRATED_REVID=96971731
* Make generate_workspace dump transitive dependencies for Maven artifactsGravatar Kristina Chodorow2015-06-25
| | | | | | | | | | | This moves the WORKSPACE-parsing code out of WorkspaceFileFunction.java so generate_workspace can parse a WORKSPACE into an ExternalPackage without having to muck with Skyframe. Addresses issue #89. -- MOS_MIGRATED_REVID=96777708
* rsplit's separator is now being parsed literally. As a result, special regex ↵Gravatar Florian Weikert2015-06-23
| | | | | | | characters (such as '.' or '\w') will no longer match other characters. -- MOS_MIGRATED_REVID=96603729
* Error message when attribute is of the wrong type is misleadingGravatar Laurent Le Brun2015-06-23
| | | | | | | Fixes #241 -- MOS_MIGRATED_REVID=96573740
* Stop "no generating action" exceptions for configurableGravatar Greg Estren2015-06-19
| | | | | | | | | | | | | | | | | | | cc_library "srcs". The underlying problem is that Bazel determines whether or not to generate a .so by the contents of "srcs", but this happens in the loading phase before configurations are known. So, when "srcs" is configurable, it conservatively assumes a .so needs to be generated. In cc_library analysis, when the final values for "srcs" is properly bound, the .so may not actually be needed after all. This cl fixes the discrepancy by registering a FailAction for the .so under those circumstances - we don't actually need the .so anywhere but we still have to ensure it's registered with an owning action. -- MOS_MIGRATED_REVID=96405079
* Cleanup in PackageFactoryGravatar Laurent Le Brun2015-06-19
| | | | | | | | | | | - Remove the subinclude function (subinclude calls should be removed by preprocessor). - Restrict visibility where it makes sense #codehealth -- MOS_MIGRATED_REVID=96389259
* Cleanup in PackageFactory, inline createPackage function.Gravatar Laurent Le Brun2015-06-18
| | | | | | | | | | | createPackage was hard to read (both the definition and the call site) and did nothing useful (just call another function). The name was also confusing: it's not the standard way to create a package, since it's used only for tests. #codehealth -- MOS_MIGRATED_REVID=96288514
* Allow repository rules to provide default bindings for external labels.Gravatar Lukacs Berki2015-06-18
| | | | | | | The idea is that an android_sdk_repository rule would by default bind @external:android/sdk to itself, thus avoiding an unnecessary roundtrip through //tools/android:sdk . If we then also eventually bind that external label to something, we can avoid having the //tools/android:sdk rule altogether. -- MOS_MIGRATED_REVID=96285812
* Skylark: Fix access to undefined label attribute in computed outputs.Gravatar Laurent Le Brun2015-06-17
| | | | | | | | | Label attribute defaults to null (Java) or None (Skylark). When we pass the attribute map to the compute output function, null values were filtered. Put None in the map for consistency with other attributes. -- MOS_MIGRATED_REVID=96207976
* Print an error message when an @foo dep isn't foundGravatar Kristina Chodorow2015-06-17
| | | | | | | | | TransitiveTargetFunction only prints an error message if the package names match, so it was just exiting with "loading failed" when there was an error with external dependencies. -- MOS_MIGRATED_REVID=96204337
* Skylark: support %r format specifierGravatar Francois-Rene Rideau2015-06-17
| | | | | | | | Refactor the implementation of format. Add %r. Improve some error messages. -- MOS_MIGRATED_REVID=96154542
* Get jdk.WORKSPACE into the default WORKSPACE file by reading it as a Java ↵Gravatar Lukacs Berki2015-06-15
| | | | | | | | | | | resource, then passing it to the parser as a string instead of putting it into embedded_binaries then passing a Path to it to the parser. This makes the upcoming default WORKSPACE rules for Android much more palatable. In particular, Android rules won't need to be special cased when building the Bazel binary because the contents are self-contained in BazelRuleClassProvider (and the jdk.WORKSPACE file, which is a simple Java resource) Even better would be not to use a string, but some kind of structured data, but that's probably more effort than it's worth. -- MOS_MIGRATED_REVID=95983199
* Implement Skylark function reprGravatar Francois-Rene Rideau2015-06-15
| | | | | | | | | | | | | | | | | Move printing code from EvalUtils to Printer. Rename functions in Printer: printValue becomes str or print, prettyPrintValue becomes repr or write, formatString becomes format, makeFormattable becomes strFormattable, prettyPrintValues becomes listString. write being self-sufficient is made the reference, and print is the one that is a wrapper around write, rather than the other way around, avoiding mutual recursion. -- MOS_MIGRATED_REVID=95897834
* Remove Path from Location, ParserInputSource and bunch of other low-level ↵Gravatar Lukacs Berki2015-06-12
| | | | | | | | | | | | | | | | | classes. This makes the code cleaner because a lot of places never read the file and thus never needed a Path in the first place. I got to this change in a bit convoluted way: - I wanted the default tools in Android rules to point to //external: - I wanted to make sure that that doesn't cause an error is no Android rules are built, thus I had to add some binding for them in the default WORKSPACE file - I wanted the Android rules not to depend on Bazel core with an eye towards eventually moving them to a separate jar / Skylark code - The default WORKSPACE file is currently composed from files extracted by the Bazel launcher which would make the Android rules depend on a very core mechanism - I couldn't simply pass in jdk.WORKSPACE as a String because Location, ParserInputSource and a bunch of other things needed a Path, which a simple string doesn't have. Thus, this change. -- MOS_MIGRATED_REVID=95828839
* Skylark: make ConversionException an EvalExceptionGravatar Francois-Rene Rideau2015-06-12
| | | | | | | | | This avoids using a RuntimeException (IllegalArgumentException) to circumvent declaration issues, which when we were catching it too well was hiding actual issues of RuntimeException. -- MOS_MIGRATED_REVID=95767534
* Description redacted.Gravatar Lukacs Berki2015-06-10
| | | | | -- MOS_MIGRATED_REVID=95615442
* Skylark: implemented set.union()Gravatar Florian Weikert2015-06-10
| | | | | -- MOS_MIGRATED_REVID=95536484
* 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
* 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