aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/pkgcache
Commit message (Collapse)AuthorAge
* Properly report errors as errors.Gravatar nharmata2017-10-16
| | | | | RELNOTES: None PiperOrigin-RevId: 172133468
* Move SkylarkSemanticsOptions to the packages/ directory, alongside ↵Gravatar brandjon2017-10-07
| | | | | | | | | SkylarkSemanticsCodec Note that the syntax package and its test package still depend indirectly on the options parser via other Bazel-specific packages. RELNOTES: None PiperOrigin-RevId: 171342823
* Stop injecting embedded artifacts. They're never used by anyone in Skyframe, ↵Gravatar janakr2017-09-26
| | | | | | and error-checking for their existence is already done by the client. PiperOrigin-RevId: 169966701
* Remove unused "extraPrecomputedValues" from WorkspaceBuilder, and therefore ↵Gravatar janakr2017-09-25
| | | | | | | | remove all "precomputed values for analysis" from SkyframeExecutor. We use SkyframeExecutor#injectExtraPrecomputedValues these days. This simplifies logic around when to inject precomputed values, and makes the graph more consistent. PiperOrigin-RevId: 169733304
* Remove product name precomputed value.Gravatar janakr2017-09-25
| | | | PiperOrigin-RevId: 169723724
* Inject BlazeDirectories into FdoSupportFunction directly, instead of ↵Gravatar janakr2017-09-25
| | | | | | | | depending on a precomputed value. BlazeDirectories don't change over the lifetime of the Blaze server, and certainly not over the lifetime of a SkyframeExecutor instance, which already had a reference to them. The goal is getting rid of the precomputed value entirely, but since this change necessitated a fair number of testing changes, I'm mailing this out as a first step. PiperOrigin-RevId: 169705474
* Automatic code cleanup.Gravatar cushon2017-09-15
| | | | PiperOrigin-RevId: 168802886
* Remove deepExecRoot from BlazeDirectories. It is now the default. Also ↵Gravatar janakr2017-09-14
| | | | | | inline constructor that did ServerDirectories creation inline: don't pollute production code for tests' convenience. PiperOrigin-RevId: 168652349
* More BUILD file refactorings.Gravatar philwo2017-09-06
| | | | | | | | | Split collect, concurrent, vfs, windows into package-level BUILD files. Move clock classes out of "util", into their own Java package. Move CompactHashSet into its own Java package to break a dependency cycle. Give nestedset and inmemoryfs their own package-level BUILD files. PiperOrigin-RevId: 167702127
* Change WalkableGraphFactory#prepareAndGet to take multiple SkyKeys as graph ↵Gravatar Googler2017-08-17
| | | | | | | | | | roots It also changes a few accessors of utility methods in Skyframe library. It refactors the QueryExpressionMapper to use a general QueryExpressionVisitor. RELNOTES: None PiperOrigin-RevId: 165534908
* Add hook to process SkyframeExecutor in tests. Also add sentinel exception ↵Gravatar janakr2017-07-25
| | | | | | to indicate unserializability, improve error message in Path when serialization fails, and add some test-only methods to SkyframeExecutor and PackageFactory. PiperOrigin-RevId: 162993806
* Reduce to one SequencedSkyframeExecutor#create method. The others were minor ↵Gravatar janakr2017-07-20
| | | | | | convenience methods that didn't (IMO) carry their weight. PiperOrigin-RevId: 162528716
* Move ParsingFailureEvent reporting to TargetPatternFunctionGravatar ulfjack2017-07-18
| | | | | | | We're parsing the target pattern before we create the SkyKey, so all callers of the key creation also need to report this event. PiperOrigin-RevId: 162326973
* 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
* If globbing throws an IOException, fail to construct the package instead of ↵Gravatar janakr2017-07-14
| | | | | | | | constructing the package with an error. Prior to this change, if a Package.Builder object was constructed, it was guaranteed that a Package (possibly with errors) would be created. This is no longer true: if an IOException is set on the Package.Builder object, it will throw a NoSuchPackageException during #build(). PiperOrigin-RevId: 161832111
* Move InvocationPolicy to the options parser package.Gravatar ccalvarin2017-06-09
| | | | | | | | | | | | | | It was originally included in runtime due to external dependencies, and a desire to keep the options parser a general options library. These dependencies have been or will be removed, and there are plenty of other general flag libraries. InvocationPolicy is fundamentally acting on the properties of this specific OptionsParser and needs proper access to it for the proper solution to a number of existing bugs, which means having access to things that should be package private. PiperOrigin-RevId: 158523111
* Factor out Bazel-specific ctor constants in SequencedSkyframeExecutor into a ↵Gravatar nharmata2017-06-06
| | | | | | | separate class. They're currently passed in around various callsites in the codebase and tests. RELNOTES: None PiperOrigin-RevId: 158139074
* Migrate Java tests to Truth.Gravatar lberki2017-05-30
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157446717
* Migrate tests to Truth.Gravatar lberki2017-05-29
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157378037
* PiperOrigin-RevId: 156331430Gravatar nharmata2017-05-19
|
* Change FileContentsProxy to use ctime instead of mtimeGravatar ulfjack2017-05-09
| | | | | | | | | This gives us better reliability for detecting file changes; especially in cases where tools intentionally do not update mtime. Fixes #1525. PiperOrigin-RevId: 155490849
* Automated g4 rollback of commit 9dec9a09d1e4d27e7cff73c440195a32d3b90752.Gravatar plf2017-05-05
| | | | PiperOrigin-RevId: 155194438
* Introduce BazelPackageLoader.Gravatar nharmata2017-05-04
| | | | | | | | | This is a standalone library for loading packages. It is intended to be used by clients outside of Bazel (for now, Kythe). Perform BazelPackageLoader#loadPackage in the testing hook used in all of Bazel's unit tests and integration tests. This gives us very good test coverage for BazelPackageLoader. RELNOTES: None PiperOrigin-RevId: 155004070
* Store Skylark command-line flags in SkyframeGravatar brandjon2017-04-28
| | | | | | | | | This is the first of two CLs for making command line options able to affect the Skylark interpreter. It introduces SkylarkSemanticsOptions, and stores it as a precomputed (injected) value in Skyframe. The next CL will read these options from Skyframe when constructing the Skylark environment. This CL affects the dataflow from command/test initialization to Skyframe. Some code paths, like those used for testing, use the default SkylarkSemanticsOptions and therefore won't be able to use (for example) --incompatible_* flags. The call sites to update were found by searching for uses of defaultVisibility and working upward from there. RELNOTES: None PiperOrigin-RevId: 154432058
* Delete Preprocessor.Factory.SupplierGravatar laurentlb2017-04-12
| | | | | RELNOTES: None. PiperOrigin-RevId: 152882585
* 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
* 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
* Fix more cases of PathPackageLocator test flakiness on Windows due to ↵Gravatar John Cater2017-03-27
| | | | | | | | case-insensitive paths. -- PiperOrigin-RevId: 151137308 MOS_MIGRATED_REVID=151137308
* Fix PathPackageLocatorTest to do case-insensitive string checks.Gravatar John Cater2017-03-20
| | | | | | -- PiperOrigin-RevId: 150467024 MOS_MIGRATED_REVID=150467024
* 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
* Introduce a Skyframe function: ActionEnvironmentFunction Gravatar Damien Martin-Guillerez2017-02-08
| | | | | | | | | | | | | | | | | | ActionEnvironmentFunction returns the list of environment variable with the one overwritten by --action_env being replaced. This let other Skyframe function declares dependency to any value of the environment and being influenced by the --action_env flag. This will be used to declare dependency of remote repositories on environment variables (step 3 of https://bazel.build/designs/2016/10/18/repository-invalidation.html) -- Change-Id: I1ed3fb6f48e8e17d4d64c903fccecb6ed7596350 Reviewed-on: https://cr.bazel.build/7974 PiperOrigin-RevId: 146918603 MOS_MIGRATED_REVID=146918603
* Remove some dead codeGravatar Ulf Adams2017-02-07
| | | | | | -- PiperOrigin-RevId: 146755491 MOS_MIGRATED_REVID=146755491
* With interleaving now enabled, clean up our tests.Gravatar Ulf Adams2017-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | Remove many calls from tests to SkyframeLabelVisitor.sync, which is generally no longer necessary. In particular, BuildViewTestCase.ensureTarget(s)Visited was calling it, so removing that, as well as simulateLoadingPhase. I moved some tests for TransitiveTargetFunction to the corresponding test class, where they belong. I also made sure that we have test coverage in the BuildViewTest for some cases that were previously only tested with TTF. I dropped some tests which no longer seem applicable / for which we have coverage elsewhere. Also, as a drive-by change, I fixed some warnings in BuildViewTestCase. Note that TTF is only used for genquery and in an experimental code path, but generally superseded by ConfiguredTargetFunction, which has taken over the responsibility for loading in all other cases (and interleaves loading and analysis). Some of the tests are not externally visible yet. -- PiperOrigin-RevId: 144813237 MOS_MIGRATED_REVID=144813237
* Code cleanup for interleaving target pattern eval and config creation.Gravatar Ulf Adams2016-11-16
| | | | | -- MOS_MIGRATED_REVID=139209942
* Update package lookup to check for files named BUILD.bazel before files namedGravatar John Cater2016-11-11
| | | | | | | | | | | BUILD. Fixes #552. RELNOTES[NEW]: Packages are defined in BUILD.bazel as well as BUILD files. -- MOS_MIGRATED_REVID=138828981
* Make --watchfs a common command option.Gravatar Ulf Adams2016-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | Adding an options parameter to DiffAwareness#getCurrentView seems like the simplest way to achieve that. Alternatives considered: 1. Making the diff awareness modules stateful. However, I did not want to do so as I've also been working on improving the module API to reduce state, or at least to have a proper lifecycle management for any necessary state. 2. Making the watchFs flag a constructor parameter. However, that would also invalidate any implementations that don't use the flag (of which we have several). 3. Only passing in a single boolean flag instead of an options class provider; however, this is a more principled, futureproof API, which allows other modules / awareness implementations to use their own options. RELNOTES: --watchfs is now a command option; the startup option of the same name is deprecated. I.e., use bazel build --watchfs, not blaze --watchfs build. -- MOS_MIGRATED_REVID=136154395
* Rollback of commit 2891ec527eed27d0c6460d66f51cb66a43373b6a.Gravatar Damien Martin-Guillerez2016-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Causes our integration tests on Darwin to time out *** Original change description *** Make --watchfs a common command option. Adding an options parameter to DiffAwareness#getCurrentView seems like the simplest way to achieve that. Alternatives considered: 1. Making the diff awareness modules stateful. However, I did not want to do so as I've also been working on improving the module API to reduce state, or at least to have a proper lifecycle management for any necessary state. 2. Making the watchFs flag a constructor parameter. However, that would also invalidate any implement... *** -- MOS_MIGRATED_REVID=136070807
* Make --watchfs a common command option.Gravatar Ulf Adams2016-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | Adding an options parameter to DiffAwareness#getCurrentView seems like the simplest way to achieve that. Alternatives considered: 1. Making the diff awareness modules stateful. However, I did not want to do so as I've also been working on improving the module API to reduce state, or at least to have a proper lifecycle management for any necessary state. 2. Making the watchFs flag a constructor parameter. However, that would also invalidate any implementations that don't use the flag (of which we have several). 3. Only passing in a single boolean flag instead of an options class provider; however, this is a more principled, futureproof API, which allows other modules / awareness implementations to use their own options. RELNOTES: --watchfs is now a command option; the startup option of the same name is deprecated. I.e., use bazel build --watchfs, not blaze --watchfs build. -- MOS_MIGRATED_REVID=136026835
* Adds an enum to describe how PackageLookupFunction should handle package labelsGravatar John Cater2016-10-13
| | | | | | | which cross into a sub-repository. Part of #1592. -- MOS_MIGRATED_REVID=135931868
* Fall back to compiling header-only libraries with --compile_one_dependency.Gravatar Googler2016-10-10
| | | | | | | | | | | | | | In toolchains that support parse_headers, this is the desired action. For other toolchains, this change makes blaze try to build a header-only library which creates the error that the header only library is not a supported target kind. Seems like either error message is not useful/actionable. In theory, it would be better to actually analyze whether a parse_headers is activated, but that requires refactoring a lot of code that is currently C++ specific. -- MOS_MIGRATED_REVID=135554761
* Refactor SkyframeExecutor#preparePackageLoading to pass all ↵Gravatar Janak Ramakrishnan2016-09-27
| | | | | | | | | PackageCacheOptions as a bundle. This will allow me to thread a new flag through more easily in the future. -- MOS_MIGRATED_REVID=134406676
* Add type annotations for the benefit of Java 7Gravatar Klaus Aehlig2016-09-14
| | | | | -- MOS_MIGRATED_REVID=133119463
* Track client environment in SkyframeGravatar Klaus Aehlig2016-09-14
| | | | | | | | | | | | | ...to determine which actions have to be recomputed based on changes to the client environment. Note that this change does it the simple way and reconsideres all actions on a changed client environment, while still only reexecuting those, where the part that was inherited from the environment actually did change. -- Change-Id: Ie1116d094642165e5e959447a6fcf49d19b37d6e Reviewed-on: https://bazel-review.googlesource.com/#/c/5431 MOS_MIGRATED_REVID=133010705
* Make --experimental_interleave_loading_and_analysis a no-op.Gravatar Ulf Adams2016-09-06
| | | | | | | | | | | | This is now enabled by default, and this change removes the code path where it's disabled. Remove a few tests that were testing the removed code, and rewrite some others that still seem useful. We still drop configured targets on configuration changes, so we use that to check that things are dropped from Skyframe. -- MOS_MIGRATED_REVID=132226208
* Allow CompileOneDependencyTransformer#transformCompileOneDependency to throw ↵Gravatar Janak Ramakrishnan2016-08-19
| | | | | | | InterruptedException instead of wrapping as a TargetParsingException. -- MOS_MIGRATED_REVID=130660310
* Allow ImplicitOutputsFunctions to be overriden on Rule creation.Gravatar Michajlo Matijkiw2016-08-10
| | | | | -- MOS_MIGRATED_REVID=129787305
* Move more things from TestConstants to AnalysisMock and LoadingMock.Gravatar Ulf Adams2016-07-14
| | | | | | | Also remove other uses of TestConstants. -- MOS_MIGRATED_REVID=127327339
* Introduce TestConstants#PACKAGE_FACTORY_FACTORY_FOR_TESTING for the sake of ↵Gravatar Nathan Harmata2016-06-10
| | | | | | | making it easier to create PackageFactory instances in unit tests. -- MOS_MIGRATED_REVID=124566862
* Make a 'did you mean' suggestion when referencing a non-existent label.Gravatar Laurent Le Brun2016-06-06
| | | | | | | It works for both labels on the command-line and labels in BUILD files. -- MOS_MIGRATED_REVID=123967347