aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/pkgcache
Commit message (Collapse)AuthorAge
* BEP: assert event orderings explicitlyGravatar Klaus Aehlig2018-02-12
| | | | | | | | | | | ...even where they should be clear from the evaluation order. Since reporting sometimes happens in different threads, there might be races on the event bus. Explicit order constraints allow the BuildEventStreamer to reorder those events correctly in the case of a lost race. Change-Id: Ib5211341c2016527e9268e8fdbd1677d4255b23c PiperOrigin-RevId: 185345738
* Fix error handling in skyframe target pattern parsingGravatar ulfjack2018-02-02
| | | | | | | | | Bazel completely swallowed errors in some cases, e.g., if the pattern is invalid like bazel build foo//bar:baz. Note that it previously silently ignored empty targets if --experimental_skyframe_target_pattern_evaluator was passed, and now fails (which is consistent with legacy behavior). This is an intentional change, but may break users who are using the experimental flag and are passing empty strings to Bazel. PiperOrigin-RevId: 184282856
* Add codecs for SkyKeys that are needed for null build.Gravatar janakr2018-01-24
| | | | PiperOrigin-RevId: 183102476
* Add codec for TestFilter, and clean up some things: use ↵Gravatar janakr2018-01-22
| | | | | | java.util.function.Predicate and move some code that was only called by TestFilter inside it. PiperOrigin-RevId: 182884550
* Introduce Root class.Gravatar tomlu2018-01-17
| | | | | | | | | | | This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759
* Implement --(no)expand_test_suites flag.Gravatar dslomov2017-12-13
| | | | | | | | | --noexpand_test_suites flag will suppress expansion of test_suite targets into constituent tests, so that command-line aspects can analyze test_suite targets. RELNOTES: Added --(no)expand_test_suites flag. PiperOrigin-RevId: 178892829
* Expose utility method in PathPackageLocator for inserting workspace name.Gravatar janakr2017-12-06
| | | | PiperOrigin-RevId: 178105914
* Fix getBuildFiles to not assume BUILD is the name of the build file.Gravatar John Cater2017-12-04
| | | | | | | Fixes #4056. Change-Id: Ia7425c2146f15e9293605ee3da53007805e82275 PiperOrigin-RevId: 177813070
* Minor fixes to spacing in help messagesGravatar Mike Morearty2017-11-29
| | | | | | | | A few help messages were missing a space after the period at the end of a sentence. Closes #4094. PiperOrigin-RevId: 177282132
* Update PathPackageLocator to take a list of potential build file names,Gravatar John Cater2017-11-28
| | | | | | | | | | | | | | instead of assuming BUILD. - Default the list to the same value as PackageLookupFunction: BUILD.bazel, BUILD. - Move BuildFileNames to the packages package, so it is more generally available. Part of #4056. Change-Id: Ie12512b492cd7d47a9e56ec3bc209f829feaf4b5 PiperOrigin-RevId: 177261295
* Remove the hardcoded exclusion of the top-level //experimental directory. ↵Gravatar nharmata2017-11-21
| | | | | | | | | This is only relevant for things like 'bazel build //...' in workspaces that have a top-level //experimental directory. As such, this hardcoded exclusion is unlikely to be desired, especially by bazel users externally. Fixes #3822. RELNOTES: None PiperOrigin-RevId: 176569346
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Fix bug where all three implementations of ↵Gravatar nharmata2017-10-31
| | | | | | | | | RecursivePackageProvider#getPackagesUnderDirectory assumed that the given directory needed to be strictly underneath all directories in the given blacklistedSubdirectories set, yet the callsites were calling this method such that the given directory was not-necessarily-strictly underneath the blacklistedSubdirectories. N.B. There is no end-to-end bug in EnvironmentBackedRecursivePackageProvider because TargetPatternFunction's usage of TargetPattern#eval is always with blacklistedSubdirectories=ImmutableSet.of(). Also note that the existing fast-path in GraphBackedRecursivePackageProvider is dead code because the Preconditions check would fail first :( RELNOTES: None PiperOrigin-RevId: 173924216
* Rename Label.EXTERNAL_PACKAGE_FILE_NAME to WORKSPACE_FILE_NAMEGravatar ulfjack2017-10-27
| | | | | | | This more clearly indicates what this is. Also change some hard-coded uses to use the constant instead. PiperOrigin-RevId: 173658659
* Enable experimental UI by default.Gravatar twerth2017-10-18
| | | | | RELNOTES: Enable experimental UI by default. PiperOrigin-RevId: 172432464
* Generalize some of methods in TargetPattern, PrepareDepsOfPatternValue, and ↵Gravatar nharmata2017-07-26
| | | | | | | RecursivePackageProvider dealing with the concept of "excluded directories". RELNOTES: None PiperOrigin-RevId: 163074794
* Refactor TargetPatternPhaseFunctionGravatar ulfjack2017-07-19
| | | | | | | | - Make TargetPatternPhaseKey implement SkyKey - Move the TargetParsingCompleteEvent posting into the function - Split the time reporting out into TargetParsingPhaseTimeEvent PiperOrigin-RevId: 162475743
* Rework LoadingPhaseCompleteEvent & AnalysisPhaseCompleteEvent to account for ↵Gravatar nharmata2017-07-19
| | | | | | | the fact that loading and analysis is now interleaved. RELNOTES: None PiperOrigin-RevId: 162388460
* Make the @Option annotation depend on the java version of the tagging enums.Gravatar ccalvarin2017-07-18
| | | | | | | The option filters proto dependency can be removed from the OptionsParser. This is in response to option parser users that want to avoid the bazel-internal proto file in their dependencies. RELNOTES: None. PiperOrigin-RevId: 162249778
* Remove ParseFailureListener in favor of posting to EventBus directlyGravatar ulfjack2017-07-18
| | | | | | | We now have the ExtendedEventHandler, which is available in all the relevant code paths, so we just post the event directly. PiperOrigin-RevId: 162200923
* Fold OptionUsageRestrictions into OptionDocumentationCategory and ↵Gravatar ccalvarin2017-07-11
| | | | | | | | | | OptionMetadataTags. These are similar, no need to have both fields. Removing the "DOCUMENTED" default, the absence of UNDOCUMENTED will be used instead. Since requiring a documentation category for undocumented options doesn't make sense, list that as one of the OptionDocumentationCategories, but list HIDDEN and INTERNAL as part of OptionMetadata. These options should list UNDOCUMENTED as their category. PiperOrigin-RevId: 161515674
* Automated conversion to Java 8Gravatar laurentlb2017-06-30
| | | | | | | With a few manual fixes for readability. RELNOTES: None. PiperOrigin-RevId: 160582556
* Add the default category and tag to all options.Gravatar ccalvarin2017-06-28
| | | | | | | | Move the default from the annotation to every mention. This makes the incompleteness explicit. Will add the defaults to test targets in a separate change. Once all dependencies are cleaned up, the Option annotation will no longer allow options without the documentationCategory or effectTag, to prevent new options being added without categories while we migrate to the new option categorization. PiperOrigin-RevId: 160281252
* Refactor SkyQueryEnvironment to allow preprocessing or postprocessing targetsGravatar Googler2017-06-27
| | | | | | | | Refactor SkyQueryEnvironment and a few other query helpers to make it easier to work with targets. RELNOTES: None PiperOrigin-RevId: 160165398
* experimental_skyframe_target_pattern_evaluator: Use UNDOCUMENTED instead of ↵Gravatar philwo2017-06-09
| | | | | | HIDDEN. PiperOrigin-RevId: 158524495
* Expose the target map from Package.Gravatar carmi2017-05-19
| | | | | | | | This doesn't really expose new information, because one can iterate over the existing getTargets() and recreate the map. Moreover, the map is immutable, so there's no risk in returning it to the user. RELNOTES: None PiperOrigin-RevId: 156349797
* BEP: report configurations for targetsGravatar Klaus Aehlig2017-05-09
| | | | | | | | | | | In multi-architecture builds, a target might be built several times, for the different architectures. Make the target completion events for those distinguishable by indicating the architecture for which the target was built. Also add the needed event for the expansion of a target to target-configuration pairs. Change-Id: I95ef2c81166077163dd686db4671f672160efe1d PiperOrigin-RevId: 155491076
* Automated g4 rollback of commit 7beadb7277453efec7e12b925005e7f0e003b592.Gravatar nharmata2017-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Original CL was rolled backed incorrectly. See post-submit discussion on http://https://github.com/bazelbuild/bazel/commit/7beadb7277453efec7e12b925005e7f0e003b592. *** Original change description *** Automated g4 rollback of commit 38b835097f9ae9a6062172b8a33ec2e2d1edde20. *** Reason for rollback *** Breaking Bazel build on linux, see http://ci.bazel.io/job/bazel-tests/733/ Repro: bazel build //src/test/java/com/google/devtools/build/lib:packages_test Found by bisecting. *** Original change description *** Only allocate some formerly frequently allocated PathFragment objects once. This reduces both gc churn and retained memory usage. RELNOTES: None PiperOrigin-RevId: 154839279
* Automated g4 rollback of commit 38b835097f9ae9a6062172b8a33ec2e2d1edde20.Gravatar dmarting2017-05-02
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaking Bazel build on linux, see http://ci.bazel.io/job/bazel-tests/733/ Repro: bazel build //src/test/java/com/google/devtools/build/lib:packages_test Found by bisecting. *** Original change description *** Only allocate some formerly frequently allocated PathFragment objects once. This reduces both gc churn and retained memory usage. RELNOTES: None PiperOrigin-RevId: 154821457
* Only allocate some formerly frequently allocated PathFragment objects once.Gravatar nharmata2017-05-02
| | | | | | This reduces both gc churn and retained memory usage. PiperOrigin-RevId: 154718782
* Split out option usage restriction from option category.Gravatar ccalvarin2017-04-18
| | | | | | | | | These are two different concepts. Do not remove category overload compatibility in this CL, to keep this change limited to converting the current uses of category. With some flyby formatting fixes on affected OptionsBases. RELNOTES: None. PiperOrigin-RevId: 153390002
* Migrate UnixGlob to Path#statIfFound() instead of #statNullable(). The ↵Gravatar felly2017-04-18
| | | | | | | | | latter swallows all filesystem failures, and does not disambiguate missing files from filesystem problems. The syscall cache now tracks IOExceptions if they are present, just as it does with readdir(). RELNOTES: None PiperOrigin-RevId: 153185433
* Refactor all ctor callsites of PathFragment to instead call a static ↵Gravatar nharmata2017-04-05
| | | | | | | | | | | | 'create' method. This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment). This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations. RELNOTES: None PiperOrigin-RevId: 152145768
* BEP: provide events a generic converter classGravatar aehlig2017-04-04
| | | | | | | | | | | Change the BuildEvent interface to accept a generic class of converters. In this way, we won't have to change it again in the future, once more converters are needed. In fact, a new converter is needed right now (will be added in a follow-up patch) to allow build events to know the name of named artifact groups already reported in the stream. Change-Id: Ibb32ea5fff361e21bcf2d34818d8351a1da7a2e3 PiperOrigin-RevId: 152131870
* Add "--build_manual_tests" options that forces manual tests to be built.Gravatar dslomov2017-04-04
| | | | | | | | | This is useful for IDEs and other tools utilizing command-line aspects for reflection over build graph. RELNOTES: None. PiperOrigin-RevId: 152038248
* Remove some unused bookkeeping things about the no-longer-existent PackageCache.Gravatar nharmata2017-03-31
| | | | | | RELNOTES: None PiperOrigin-RevId: 151729291
* Improve query error msg when a package has a broken Skylark loadGravatar Mark Schaller2017-03-12
| | | | | | | | | | | | | | | | | | | | | | | | The error message logged during query (and build) when a package has a broken Skylark load statement was not specific. Previously, it said "package contains errors:" and then the package name. Also, this error message was not emitted when using SkyQueryEnvironment and evaluating a query containing a "TargetsBelowDirectory" pattern (such as //foo/...) when a package below the specified directory had such an error. The approach taken by this CL is to include any package loading error message in the SkyValue produced by CollectPackagesUnderDirectoryFunction, and report them during evaluation of a TargetsBelowDirectory pattern. RELNOTES: Evaluation of commands on TargetsBelowDirectory patterns (e.g. //foo/...) matching packages that fail to load now report more detailed error messages in keep_going mode. -- PiperOrigin-RevId: 149802362 MOS_MIGRATED_REVID=149802362
* Global cleanup change.Gravatar Googler2017-03-09
| | | | | | -- PiperOrigin-RevId: 149652245 MOS_MIGRATED_REVID=149652245
* Clean up event busGravatar Klaus Aehlig2017-02-27
| | | | | | | | ...now that the ExtendedEventHandler can serve the same purpose. -- PiperOrigin-RevId: 148640618 MOS_MIGRATED_REVID=148640618
* Provide more reporting options to SkyFunctions Gravatar Klaus Aehlig2017-02-27
| | | | | | | | | | | | | With more specific information to be reported by Skyfunctions, e.g., to inform the build-event protocol on missing files, the EventHandler interface is no longer enough. Therefore, provide an enriched context for reporting events. -- Change-Id: I2d06166fe4d5b9054e24ad8c752fafc039e3f9f8 Reviewed-on: https://cr.bazel.build/8794 PiperOrigin-RevId: 148463437 MOS_MIGRATED_REVID=148463437
* Remove type checking requirement from AttributeMap.has.Gravatar Greg Estren2017-02-15
| | | | | | | | | | | | | | This overrides the traditional has(String name, Type<>T> type) with has(String name) and removes the type check outright from isConfigurable. Ideally we'd remove the old version in this same change. But there are enough uses of it that that's not a risk-free change and is safer as followup changes. -- PiperOrigin-RevId: 147513593 MOS_MIGRATED_REVID=147513593
* Remove dead code - unused method in PackageManager interfaceGravatar Ulf Adams2017-02-09
| | | | | | -- PiperOrigin-RevId: 147018240 MOS_MIGRATED_REVID=147018240
* Remove dead code in SkyframeLabelVisitorGravatar Ulf Adams2017-02-07
| | | | | | | | | | Two of the functions are never used, several of the parameter are not used or can be simplified (require callers to convert from Target -> Label). -- PiperOrigin-RevId: 146787380 MOS_MIGRATED_REVID=146787380
* Support mapping of Paths to URIsGravatar Klaus Aehlig2017-01-18
| | | | | | | | | | | Bazel-created files (like log files of test runs) are internally reported as Paths. However, this is not always the most useful representation of the location of that artifact for a consumer of build events. Therefore, support a mapping of paths to more useful URIs. -- PiperOrigin-RevId: 144843525 MOS_MIGRATED_REVID=144843525
* Make build events correctly report target expansionGravatar Klaus Aehlig2016-12-05
| | | | | | | | | | | In particular, correctly report the expansion of a test suite even if only requested to build (but not test). -- Change-Id: Ia25305a4f5ed53118cbb1970a8055d156e8e50be Reviewed-on: https://cr.bazel.build/7535 PiperOrigin-RevId: 141027655 MOS_MIGRATED_REVID=141027655
* Refactor LegacyLoadingPhaseRunner to be more like SkyframeLoadingPhaseRunner.Gravatar Ulf Adams2016-11-22
| | | | | | | | This is in preparation for extracting some common reporting code, and also a step towards interleaving target pattern eval and config creation. -- MOS_MIGRATED_REVID=139890205
* Run the analysis phase with as many threads as the user wants. In order to ↵Gravatar Janak Ramakrishnan2016-11-18
| | | | | | | | | avoid memory blow-up intra-configured-target analysis, use a semaphore to ensure that CPU-bound work only occurs on #CPU-many threads. RELNOTES: Use --loading_phase_threads to control the number of threads used during the loading/analysis phase. -- MOS_MIGRATED_REVID=139477645
* Code cleanup for interleaving target pattern eval and config creation.Gravatar Ulf Adams2016-11-16
| | | | | -- MOS_MIGRATED_REVID=139209942
* Short-circuit deleted package retrieval if list is empty.Gravatar Janak Ramakrishnan2016-11-15
| | | | | -- MOS_MIGRATED_REVID=139127910
* Implement build tag filtering.Gravatar Lukacs Berki2016-11-11
| | | | | | | If the --build_tag_filters option is specified, targets built will be filtered according to their tags (at least one included, none excluded) -- MOS_MIGRATED_REVID=138856195