aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/cmdline
Commit message (Collapse)AuthorAge
* 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
* Enable all Label instantiations to use a single intern pool to optimize ↵Gravatar Googler2016-04-01
| | | | | | | | | memory usage Label instances do not share a single intern pool today, as some other objects, such as SkyKey and PackageIdentifier. This change allows all Label instantiations to use a single intern pool for better memory usage. -- MOS_MIGRATED_REVID=118780952
* Do not special-case the //external package so in so that target pattern ↵Gravatar Lukacs Berki2016-03-31
| | | | | | | parsing for it is not broken. -- MOS_MIGRATED_REVID=118654985
* Remove PackageIdentifier#createInDefaultRepo now that all the callers have ↵Gravatar Lukacs Berki2016-03-30
| | | | | | | been migrated. -- MOS_MIGRATED_REVID=118571367
* Don't keep packages in the default repository around after loading.Gravatar Brian Silverman2016-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, this would get thrown when referring to the same package from both the main and default repositories: java.lang.IllegalArgumentException: Multiple entries with same key: tools/cpp=/home/brian/971-Robot-Code and tools/cpp=/home/brian/971-Robot-Code at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:136) at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:98) at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:84) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:295) at com.google.devtools.build.lib.buildtool.BuildTool.transformPackageRoots(BuildTool.java:301) at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:209) at com.google.devtools.build.lib.buildtool.BuildTool.processRequest(BuildTool.java:334) at com.google.devtools.build.lib.runtime.commands.TestCommand.doTest(TestCommand.java:119) at com.google.devtools.build.lib.runtime.commands.TestCommand.exec(TestCommand.java:104) at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:371) at com.google.devtools.build.lib.runtime.BlazeRuntime$3.exec(BlazeRuntime.java:1016) at com.google.devtools.build.lib.server.RPCService.executeRequest(RPCService.java:65) at com.google.devtools.build.lib.server.RPCServer.executeRequest(RPCServer.java:434) at com.google.devtools.build.lib.server.RPCServer.serve(RPCServer.java:229) at com.google.devtools.build.lib.runtime.BlazeRuntime.serverMain(BlazeRuntime.java:975) at com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:772) at com.google.devtools.build.lib.bazel.BazelMain.main(BazelMain.java:55) And this would get thrown for any packages in the main repository loaded from other repositories: java.lang.RuntimeException: Unrecoverable error while evaluating node 'PACKAGE:@//tools/build_rules/go/toolchain' (requested by nodes ) at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:982) at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:499) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: Invalid BUILD file name for package '@//tools/build_rules/go/toolchain': /home/brian/bazel/tools/build_rules/go/toolchain/BUILD at com.google.devtools.build.lib.packages.Package.finishInit(Package.java:299) at com.google.devtools.build.lib.packages.Package$Builder.finishBuild(Package.java:1308) at com.google.devtools.build.lib.skyframe.PackageFunction.compute(PackageFunction.java:501) at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:933) ... 4 more Sponsor's comment: note the abundance of new Label.resolveRepositoryRelative() calls. They are ugly, but it's only making existing ugliness explicit. Yes, we should fix it, especially in the implementation of configurable attributes. Refs #940 -- Change-Id: I8bd7f7b00bec58a7157507595421bc50c81b404c Reviewed-on: https://bazel-review.googlesource.com/#/c/2591 MOS_MIGRATED_REVID=117429733
* Global cleanup change.Gravatar Googler2016-03-08
| | | | | -- MOS_MIGRATED_REVID=116569594
* Clean up absolutize and make it public for use in a subsequent change.Gravatar Nathan Harmata2016-03-02
| | | | | -- MOS_MIGRATED_REVID=116058328
* Parallelize Package retrieval during Sky-query operation. To maintain ↵Gravatar Eric Fellheimer2016-01-29
| | | | | | | type-safety, we now must pass in the exception type of the callback. -- MOS_MIGRATED_REVID=113313312
* Resolve repository-relative labels within the current repositoryGravatar Kristina Chodorow2016-01-28
| | | | | | | | | | | Using $(location //foo) from an external repository was resolving to @//foo, not @repo//foo, which generally wouldn't be in the main repository. This may also fix other cases where getRelative was resolving incorrectly. Fixes #819. -- MOS_MIGRATED_REVID=113256854
* 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
* Remove stray ul tag.Gravatar Alex Humesky2016-01-20
| | | | | -- MOS_MIGRATED_REVID=112562308
* Add a method for getting the root of a rule workspace to the Label methodGravatar Damien Martin-Guillerez2016-01-15
| | | | | | | | This method is exposed to Skylark and will enable correct handling of protobuf skylark files. See #784 -- MOS_MIGRATED_REVID=112235357
* Optimize PackageIdentifier hash code implementation, which has shown up in ↵Gravatar Eric Fellheimer2016-01-15
| | | | | | | some recent profiling. -- MOS_MIGRATED_REVID=112161558
* Store excluded subdirectories as PathFragment instead of String inside ↵Gravatar Janak Ramakrishnan2016-01-14
| | | | | | | | | TargetPatternKey, since that is what is needed by callers. Also, since the PathFragments come from packages, they are guaranteed to be well-formed, so the checks we were doing were unnecessary. -- MOS_MIGRATED_REVID=112059930
* Make package names in the package_group.packages attribute refer to the ↵Gravatar Lukacs Berki2016-01-13
| | | | | | | | | | | | | repository where the package group is. There is currently no way to refer to packages in other repositories and that doesn't seem to be useful, because visibility currently checks the repository name in the label and that can be changed in the main WORKSPACE file. If needed, it'd be pretty easy to implement, though. As a drive-by fix, made the parsing of the package name call into the same logic implemented in the cmdline package because code duplication is bad, mmmkay? Fixes #767. -- MOS_MIGRATED_REVID=112032508
* Make repository-local labels in visibility declarations actually be ↵Gravatar Lukacs Berki2016-01-13
| | | | | | | | | repository-local. Fixes #765. -- MOS_MIGRATED_REVID=112027627
* Stream result of TargetPattern#eval to a callback instead of returning it ↵Gravatar Janak Ramakrishnan2016-01-11
| | | | | | | | | directly, and pass a Query callback in when resolving target patterns. This means that the targets a pattern resolves to can be processed incrementally. This is the fifth step in a series to allow processing large sets of targets in query target patterns via streaming batches rather than all at once. This should improve performance for SkyQueryEnvironment for certain classes of large queries. -- MOS_MIGRATED_REVID=111696713
* Stream TargetPattern#eval implementations' results to a callback rather than ↵Gravatar Janak Ramakrishnan2016-01-07
| | | | | | | | | returning a ResolvedTargets set. This is the second step in a series to allow processing large sets of targets in query target patterns via streaming batches rather than all at once. This should also be a functional no-op. -- MOS_MIGRATED_REVID=111611858
* Stream results of targets below directory to a callback rather than ↵Gravatar Janak Ramakrishnan2016-01-07
| | | | | | | | | returning a ResolvedTargets set. This is the first step in a series to allow processing large sets of targets in query target patterns via streaming batches rather than all at once. This should be a functional no-op. -- MOS_MIGRATED_REVID=111609309
* Avoid double parsing PackageIdentifier PathFragmentsGravatar Michajlo Matijkiw2015-12-28
| | | | | | | | Not the most elegant, but not super intrusive. Can result in extra interned PackageIdentifiers, but in practice this should be very few. -- MOS_MIGRATED_REVID=110794705
* Move annotation classes used for referencing framework Java classes from ↵Gravatar John Field2015-12-16
| | | | | | | | | | | | | | Skylark into their own package. This allows, e.g., classes in the syntax package to access classes in the cmdline package without creating circular dependencies. While we're here: - Removed a couple of unused BUILD deps flagged in []. - Updated SkylarkRuleImplementationFunctionsTest to remove non-ASCII characters and clarify the intent of the test. -- MOS_MIGRATED_REVID=110360763
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Shuffle around all the constants related to the name of the //external ↵Gravatar Lukacs Berki2015-12-10
| | | | | | | | | package and the prefix of external packages in the execroot. This is in preparation for renaming that path segment from "external" to "bazel-external" so that we can provide a symlink to it from the source tree so that the source tree looks like the execroot. -- MOS_MIGRATED_REVID=109882753
* Make Android assets work in external repositories.Gravatar Lukacs Berki2015-11-20
| | | | | -- MOS_MIGRATED_REVID=108258054
* Add an explicit way to get the canonical string-representation of a Label.Gravatar Carmi Grushko2015-11-17
| | | | | | | Motivation: "toString" doesn't describe what representation it returns, and can be called implicitly on string-conversion. Users are then forced to read the javadoc to figure out what they get. -- MOS_MIGRATED_REVID=107946973
* Add a getPathFragment method to RepositoryName; use it in PackageIdentifier.Gravatar Ulf Adams2015-10-30
| | | | | | | Progress towards #445. -- MOS_MIGRATED_REVID=106585570
* Move the check whether a repository name contains a slash to ↵Gravatar Philipp Wollermann2015-10-23
| | | | | | | PackageIdentifier, where it actually belongs. -- MOS_MIGRATED_REVID=106086272
* RELNOTES: Allow dots in package names.Gravatar Han-Wen Nienhuys2015-10-16
| | | | | -- MOS_MIGRATED_REVID=105512492
* Make recursive package wildcards work in remote repositories.Gravatar Lukacs Berki2015-10-15
| | | | | | | Ideally, PrepareDepsOfPatternFunction and maybe even RecursivePkgFunction would also be changed to take a PackageIdentifier instead of RootedPath because the less places we store the set of roots, the better, but I've done enough refactoring in the past weeks to not be thrilled by the idea of doing more. -- MOS_MIGRATED_REVID=105486561
* Pass PackageIdentifier through a bit more code in target parsing in ↵Gravatar Lukacs Berki2015-10-14
| | | | | | | preparation for eventually implementing recursive target patterns for remote repositories. -- MOS_MIGRATED_REVID=105412566
* Reimplement target pattern parsing in Skyframe.Gravatar Ulf Adams2015-10-14
| | | | | | | | This is currently not hooked up, and we're passing (potentially) massive numbers of targets around. -- MOS_MIGRATED_REVID=105395404
* Make RedirectChaser follow redirects through external repositories correctly ↵Gravatar Lukacs Berki2015-10-09
| | | | | | | and implement a "@//" label syntax that always points to the main repository. -- MOS_MIGRATED_REVID=105041493
* Replace strong interning with weak interning for better GC.Gravatar Miguel Alcon Pinto2015-10-02
| | | | | -- MOS_MIGRATED_REVID=104494833
* Intern PackageIdentifiers as a memory optimization.Gravatar Miguel Alcon Pinto2015-10-01
| | | | | -- MOS_MIGRATED_REVID=104403040
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Add a serialization proxy to RepositoryName instead of PackageIdentifier so ↵Gravatar Lukacs Berki2015-09-25
| | | | | | | | | that naked RepositoryName objects can also be serialized properly. Also store the initial offset a target pattern was parsed with. -- MOS_MIGRATED_REVID=103921930
* Make intra-package wildcards work for remote repositories and clean up ↵Gravatar Lukacs Berki2015-09-24
| | | | | | | | | target pattern parsing just a tiny little bit. This wounds #389 dealing 4d6 fire damage (recursive wildcards, e.g. /... and friends still don't work) -- MOS_MIGRATED_REVID=103822319
* Make TargetPatternResolver#{isPackage, getTargetsInPackage} take a ↵Gravatar Lukacs Berki2015-09-22
| | | | | | | | | PackageIdentifier instead of a String. This remarkably fiddly CL is a step towards making wildcards pattern work with remote repositories. I originally wanted to refactor findTargetsBeneathDirectory(), too, but it turns out that it's a much more complicated affair. -- MOS_MIGRATED_REVID=103622420
* Thread the repository name all the way from TargetPatternResolver to ↵Gravatar Lukacs Berki2015-09-22
| | | | | | | | | RecursivePkgFunction. This introduces some redundancy with RootedPath, but only in the case of remote repositories. There doesn't seem to be a good way of removing this redundancy. -- MOS_MIGRATED_REVID=103621610
* Enforce UTF-8 encoding in bootstrappingGravatar Damien Martin-Guillerez2015-09-21
| | | | | | | This is breaking our CI system. Also removed the UTF-8 quotes. -- MOS_MIGRATED_REVID=103534994
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - Label parsing can be simplified - lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change. -- MOS_MIGRATED_REVID=103527877
* Tighten up the requirements on workspace namesGravatar Kristina Chodorow2015-09-21
| | | | | | | | | | Fixes #462. RELNOTES: Workspace names are now restricted to being in their base directory (that is, the names cannot contain up-level references or /./). -- MOS_MIGRATED_REVID=103379893
* Parse the label syntax "@//a:b" so that eventually we can make that the ↵Gravatar Lukacs Berki2015-09-15
| | | | | | | | | syntax that means "refer to the main repository". There isn't an overarching plan for what we are going to do with the cmdline package, which seems to be separated from the .syntax one in all sorts of awkward ways. -- MOS_MIGRATED_REVID=103088960
* Random collection of cleanups.Gravatar Ulf Adams2015-09-08
| | | | | -- MOS_MIGRATED_REVID=102497981
* Minor changes to the label parsing to match the specification more closely.Gravatar Ulf Adams2015-09-08
| | | | | -- MOS_MIGRATED_REVID=102496746
* Fix some warnings.Gravatar Ulf Adams2015-09-04
| | | | | -- MOS_MIGRATED_REVID=102332437
* Move PackageIdentifier to cmdlineGravatar Kristina Chodorow2015-08-31
| | | | | | | | This is necessary to have TargetResolver depend on it without making it depend on the packages target. First step of #389. -- MOS_MIGRATED_REVID=101790345
* Activate interleaved package and transitive target loadingGravatar Mark Schaller2015-07-08
| | | | | | | | Hooks up the recently introduced interleaved loading functions to normal graph loading. -- MOS_MIGRATED_REVID=97679451
* Add support for @foo//:bar-format labels on the command lineGravatar Kristina Chodorow2015-06-01
| | | | | | | | It's annoying how split up the Label parsing code is, but it seems like too much work to bother fixing. Maybe next fixit. -- MOS_MIGRATED_REVID=94758275
* Move target pattern parsing to key construction timeGravatar Mark Schaller2015-05-21
| | | | | | | | | | | | So that a subsequent commit can take advantage of semantic information known only after target patterns have been parsed, this commit moves parsing from pattern evaluation time to pattern key construction time. This leads toward more efficient processing of target patterns in target pattern sequence evaluation. -- MOS_MIGRATED_REVID=94025646