aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google
Commit message (Collapse)AuthorAge
* WorkspaceASTFunction returns a list of ASTs so we can split the AST before ↵Gravatar Damien Martin-Guillerez2016-02-07
| | | | | | | | | load statements Issue #824 Step 2. -- MOS_MIGRATED_REVID=113986176
* Add an intermediate SkyFunction for resolving the external packageGravatar Damien Martin-Guillerez2016-02-07
| | | | | | | | | | | | | | The WORKSPACE file parsing needs to be separated into several parts to enable load of labels in the WORKSPACE file. This change adds an intermediate SkyFunction, ExternalPackageFunction, that requires all the WORKSPACE file part to be parsed to resolve //external: labels. Issue #824 Step 1. -- MOS_MIGRATED_REVID=113984026
* Add Truth subject for ErrorInfo and improve one for EvaluationResult.Gravatar Janak Ramakrishnan2016-02-05
| | | | | -- MOS_MIGRATED_REVID=113911470
* Move ObjC compilation actions for J2ObjC-translated code from binary level ↵Gravatar Rumou Duan2016-02-05
| | | | | | | | | | | | to the edges (J2ObjcAspect and J2ObjcProtoAspect). RELNOTES[INC]: ObjC compile actions for J2ObjC-translated code now only has access to headers from the java deps of the associated original java rule. These compile actions no longer takes the compiler options specified in "copts" attribute on objc_binary/ios_test rules. J2ObjC dead code removal (enabled through flag "--j2objc_dead_code_removal") now happens *after* ObjC compilation. -- MOS_MIGRATED_REVID=113910545
* Move the Globber interface into its own file.Gravatar Nathan Harmata2016-02-05
| | | | | -- MOS_MIGRATED_REVID=113893917
* Make Skylark "license"-type attributes non-configurable.Gravatar Greg Estren2016-02-05
| | | | | | | | | Bazel has custom loading-phase logic checking "licenses" attributes. Without this change, that logic fails with a "licenses is potentially configurable" error. -- MOS_MIGRATED_REVID=113890489
* Add jdeps support to AndroidStudioInfoAspect.Gravatar Googler2016-02-04
| | | | | | | This can be used for classpath reduction on the IDE side. -- MOS_MIGRATED_REVID=113861117
* Allow switching on header processing (parse_headers or preprocess_headers)Gravatar Manuel Klimek2016-02-04
| | | | | | | | | | | for targets in the transitive closure of a target that is built. Rollback of commit e01291a1a3d65cd706190c9bf0c8cfc585f38eb7. Added an additional test to check that the configuration value is actually effectively used. -- MOS_MIGRATED_REVID=113836105
* Add additional inputs as compilation prerequisites. Tools that buildGravatar Manuel Klimek2016-02-04
| | | | | | | | | | with --compilation_prerequisites_only do rely on all prerequisites being available. RELNOTES: Make C++ modules compatible with tools using --compilation_prerequisites_only -- MOS_MIGRATED_REVID=113829249
* Add support for downloading .tar.xz files to http_archive rules.Gravatar David Chen2016-02-04
| | | | | | | | | Fixes #845 RELNOTES: Add support for .tar.xz archives to http_archive rules. -- MOS_MIGRATED_REVID=113829042
* Fix configuration error handling for the interleaved case.Gravatar Ulf Adams2016-02-04
| | | | | | | | In the interleaved case, loading errors can occur during configuration creation and we need to correctly report such errors in that case. -- MOS_MIGRATED_REVID=113826273
* Have GlobFunction make use of the assumption that the glob's package exists ↵Gravatar Nathan Harmata2016-02-04
| | | | | | | | | by having it not declare a dep on the PackageLookupValue for the package. This optimization means that a BUILD file edit doesn't (necessarily) invalidate all the globs in the package; the PackageLookupValue node would get change-pruned but we still pay the very small cost of invalidating unnecessarily. Also slightly improve variable naming in GlobFunctionTest. -- MOS_MIGRATED_REVID=113799936
* Do not compile source files mentioned in 'hdrs'.Gravatar Manuel Klimek2016-02-03
| | | | | | | | | | | | Currently for a library: cc_library(name='a', hdrs=['a.cc']) we compile a.cc into a.pic.o and link that into its reverse dependencies. With this change, a .cc file in hdrs will be treated like a .inc file or a file in textual_hd... -- MOS_MIGRATED_REVID=113773418
* Add unit-er tests for genruleGravatar Kristina Chodorow2016-02-03
| | | | | -- MOS_MIGRATED_REVID=113765603
* Make The Build Faster: Drop the describeStrategy() and strategyLocality() ↵Gravatar Philipp Wollermann2016-02-03
| | | | | | | | | methods, as we can simply pass an ActionStatusMessage to the EventBus instead. All SpawnActionContexts now send an appropriate message when they execute a Spawn. This also gets rid of the idiom that an Action knows which strategy will be used to execute it - this decision and knowledge belongs to the executor, not the action. -- MOS_MIGRATED_REVID=113731846
* Global cleanup change.Gravatar Googler2016-02-03
| | | | | -- MOS_MIGRATED_REVID=113718154
* Correctly flag loading errors in the interleaved case.Gravatar Ulf Adams2016-02-03
| | | | | | | | | | | | | | | In the interleaved case, loading errors can now also be discovered during the analysis phase. Add a boolean flag to the SkyframeAnalysisResult to indicate that such an error happened, and pass it through in BuildView. Also refactor BuildView to simplify the code a bit - simply pass the SkyframeAnalysisResult to the createResult method. There is already an integration test for this - I'm adding a faster unit test in BuildViewTest, as this is part of the BuildView contract. -- MOS_MIGRATED_REVID=113716870
* Include .dwp file in the runfiles for cc_test when building with Fission.Gravatar Googler2016-02-03
| | | | | -- MOS_MIGRATED_REVID=113660258
* Add back documentation and better error message for workspace namesGravatar Kristina Chodorow2016-02-03
| | | | | -- MOS_MIGRATED_REVID=113658912
* Export some more tests as open source.Gravatar Ulf Adams2016-02-03
| | | | | -- MOS_MIGRATED_REVID=113649677
* Move the bad STL loading phase test to CcCommonConfiguredTargetTest.Gravatar Ulf Adams2016-02-02
| | | | | -- MOS_MIGRATED_REVID=113608435
* Trim the BuildOptions input of ConfigurationFragment.key to only thoseGravatar Greg Estren2016-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | options actually needed by the fragment. This protects against, e.g., unnecessarily duplicating CppConfiguration instances when only Java flags change. This is a recommit of ca1b21ac6d8a58041db822725b42de151b163dee which was rolled back because it broke LIPO. This change is particularly important for dynamic configurations, which may mix and match fragments arbitrarily throughout a build. This not only has performance implications, but also correctness implications: code that expects two configured targets to have the same fragment (value) shouldn't break just because the second CT's configuration is a trimmed version of the first's. The original change breaks FDO/LIPO because CppConfiguration can't be shared across configurations. That's because it mutates state when prepareHook() is called, and each configuration calls prepareHook. We should ultimately solve this by refactoring the FDO/LIPO implementation but don't want to block dynamic configuration progress on that. So this change only enables trimming for dynamic configurations. -- MOS_MIGRATED_REVID=113570250
* Rollback of commit 16444baf21780c4bff00b9736b268e97157e6bc2.Gravatar Carmi Grushko2016-02-02
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks targets. See [] Manually verified this unbreaks the target mentioned in the bug. *** Original change description *** Do not compile source files mentioned in 'hdrs'. Currently for a library: cc_library(name='a', hdrs=['a.cc']) we compile a.cc into a.pic.o and link that into its reverse dependencies. With this change, a .cc file in hdrs will be treated like a .inc file or a file in textual_hdrs. -- MOS_MIGRATED_REVID=113568452
* Rollback of commit 4fdd66db55d36c923b1e9fa30a158e1596408670.Gravatar Michajlo Matijkiw2016-02-02
| | | | | | | | | *** Reason for rollback *** The change this relies on is to be rolled back. -- MOS_MIGRATED_REVID=113564031
* Move tests from SkyframeLoadingAndAnalysisTest to LoadingPhaseRunnerTest.Gravatar Ulf Adams2016-02-02
| | | | | | | | This exposes an issue with the new Skyframe-based implementation, which is fixed here as well. -- MOS_MIGRATED_REVID=113556169
* Rollback of commit f941d56acfad5f8c819c81b494f806ea74ea7fd8.Gravatar Carmi Grushko2016-02-02
| | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks many targets, see [] *** Original change description *** Reinstate mutable SkylarkDict Add <String, Object> annotation to optionMap invocation in SkylarkAttr, to make JDK 1.7 happy. Give the visible name "aspect" to class SkylarkAspect. -- MOS_MIGRATED_REVID=113543873
* Fix "put the colon here" message for non-default repositories.Gravatar Brian Silverman2016-02-02
| | | | | | | -- Change-Id: I86b90ff6eda6a16c2efeb8fffca301e2594c254e Reviewed-on: https://bazel-review.googlesource.com/#/c/2784/ MOS_MIGRATED_REVID=113529297
* In attr_aspects, make ``_attr`` mean both implicit and late-bound attributes.Gravatar Dmitry Lomov2016-02-02
| | | | | -- MOS_MIGRATED_REVID=113527098
* Add a test that asserts aspects propagating along implicit deps.Gravatar Dmitry Lomov2016-02-02
| | | | | | | Fix a minor bug in the process. -- MOS_MIGRATED_REVID=113519574
* Implement proper error handling for interleaved loading and analysis.Gravatar Ulf Adams2016-02-02
| | | | | | | | Add test coverage by re-running BuildViewTest with the new Skyframe loading phase runner. -- MOS_MIGRATED_REVID=113517509
* Fix wrapping of GlobList into SkylarkListGravatar Francois-Rene Rideau2016-02-01
| | | | | | | | | | | Make sure to wrap a GlobList into a MutableList in convertToSkylark. Indeed, GlobList is somehow a SkylarkValue, but is not actually acceptable as a Skylark value. Until this is cleaned up, tweak convertToSkylark. Also, robustify ClassObject by eagerly calling convertToSkylark on values. -- MOS_MIGRATED_REVID=113421790
* Reinstate mutable SkylarkDictGravatar Francois-Rene Rideau2016-02-01
| | | | | | | | | | Add <String, Object> annotation to optionMap invocation in SkylarkAttr, to make JDK 1.7 happy. Give the visible name "aspect" to class SkylarkAspect. -- MOS_MIGRATED_REVID=113394826
* RELNOTES[INC]: Remove JAVAC "Make" variableGravatar Liam Miller-Cushon2016-02-01
| | | | | | | | | | | | | | The JAVAC "Make" variable is the javac packaged with the host JDK, which is not necessarily the same version used to compile java_library rules. Users should typically use java_library directly. If a manual javac invocation is required, BazelJavac uses the same javac version and flags as java_library. In the rare cases where the host JDK's compiler is actually desired, prefer `$(JAVABASE)/bin/javac` to `$(JAVAC)` for clarity. -- MOS_MIGRATED_REVID=113386241
* Add test for side-effecting a list contained in a dictGravatar Francois-Rene Rideau2016-02-01
| | | | | -- MOS_MIGRATED_REVID=113369821
* Rollback of commit c0a8c58b9230a1f5d76269eb7dc6b11e18f19686.Gravatar Damien Martin-Guillerez2016-01-29
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Break Java 1.7 builds of Bazel. See http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.7,PLATFORM_NAME=linux-x86_64/327/console Test: git clone ... && git revert c0a8c58 && export JAVA_VERSION=1.7 && export BAZEL_COMPILE_TARGET=compile && bash -c "source scripts/ci/build.sh; bazel_build" *** Original change description *** Make Skylark dicts mutable Represent Skylark dict using a new subclass SkylarkDict<K, V> of Map<K, V>. Back it with a TreeMap to provide a deterministic iteration order. Also make SkylarkList generic in its element type <E>. Have Artifact implement Comparable<Object> so it can be used as TreeMap key. -- MOS_MIGRATED_REVID=113359718
* Parse the workspace name when a repository is loadedGravatar Kristina Chodorow2016-01-29
| | | | | | | | | Moved RepositoryValue to RepositoryDirectoryValue so that it could be cached (and not re-downloaded) even if the WorkspaceAST caused a Skyframe restart (as mentioned in https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java#L130-L133). -- MOS_MIGRATED_REVID=113358489
* Rollback of commit e379f28f464faacc4db21f4fed3a48fa6d4d23f0.Gravatar Googler2016-01-29
| | | | | | | | | | | | | *** Reason for rollback *** The new test apparently breaks some targets. Rolling back to fix the build. *** Original change description *** Include .dwp file in the runfiles for cc_test when building with Fission. -- MOS_MIGRATED_REVID=113310353
* Clear up some confusion about glob prefetching (the old comment was wrong). ↵Gravatar Nathan Harmata2016-01-29
| | | | | | | | | Also add some TODOs for potentially improving package loading performance. This CL has no semantic impact. -- MOS_MIGRATED_REVID=113301656
* Include .dwp file in the runfiles for cc_test when building with Fission.Gravatar Googler2016-01-29
| | | | | -- MOS_MIGRATED_REVID=113295790
* Make Skylark dicts mutableGravatar Francois-Rene Rideau2016-01-29
| | | | | | | | | | Represent Skylark dict using a new subclass SkylarkDict<K, V> of Map<K, V>. Back it with a TreeMap to provide a deterministic iteration order. Also make SkylarkList generic in its element type <E>. Have Artifact implement Comparable<Object> so it can be used as TreeMap key. -- MOS_MIGRATED_REVID=113277489
* Refactor DependencyResolver to collect and return loading errors.Gravatar Ulf Adams2016-01-28
| | | | | | | | | This should never be triggered in production, where we always run a loading phase first and only analyze targets that load successfully. I.e., this is just plumbing which will be hooked up in a subsequent change. -- MOS_MIGRATED_REVID=113258593
* 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
* Rename native.rule and native.rules to {existing_rule,existing_rules}Gravatar Han-Wen Nienhuys2016-01-28
| | | | | | | | | | | | This is to avoid confusion between rule(), which declares a new build rules, and native.rule(), which can only be used in macros to inspect the BUILD file processed so far. native.{rule,rules} is maintained and marked deprecated to smooth the transition for early adopters. -- MOS_MIGRATED_REVID=113250194
* Intern IntVersions.Gravatar Janak Ramakrishnan2016-01-28
| | | | | -- MOS_MIGRATED_REVID=113197641
* Ensure repository names are valid workspace namesGravatar Kristina Chodorow2016-01-28
| | | | | | | RELNOTES: Repository rules must use names that are valid workspace names. -- MOS_MIGRATED_REVID=113197588
* Fix SkyframeBuilder's error handling, and change the contract of ↵Gravatar Janak Ramakrishnan2016-01-28
| | | | | | | | | | | EvaluationResult to return true for hasError() iff errorMap is non-empty or there is a catastrophe. There was no good reason for the previous behavior of saying hasError even if there was a transitive recovered-from error, since callers shouldn't care. This was a latent bug that was only benign since none of the consumers of hasError were invoking Skyframe with recoverable SkyFunctions. Also add an EvaluationResultSubject so that tests can more fluently assert things about EvaluationResult objects going forward. -- MOS_MIGRATED_REVID=113192415
* Fix: return an error from the analysis phase with keep_going in error cases.Gravatar Ulf Adams2016-01-27
| | | | | | | | | | | - if there are failed top-level aspects - if there are conflicting actions I ended up rewriting how errors are signaled from the SkyframeBuildView. I think this is safe, but please review carefully. -- MOS_MIGRATED_REVID=113150100
* Store data about aspect configurations on Dependencies.Gravatar Michael Staib2016-01-27
| | | | | | | | | | | | | | | | | | | | Dependencies are the data structure which needs to propagate the configuration for each aspect as created by trimConfigurations down to the point where it's actually used. We need this to store different configurations for different aspects in a world where aspects have their own configurations, which may have more fragments than the target they're attached to. That world is on its way. Also in this CL: * Refactor Dependency to be an abstract parent class with separate implementations for Attribute.Transitions and BuildConfigurations, as well as null configurations, to avoid having to check nullness in various places. Users of the API will not see this, but get factory methods instead of constructors. As a consequence of this, refactor Dependency to be its own top-level class instead of a nested class in DependencyResolver. -- MOS_MIGRATED_REVID=113109615
* Rename FilesystemUtils to NativePosixFiles.Gravatar Lukacs Berki2016-01-27
| | | | | | | This helps avoid confusion with File*S*ystemUtils, which differs in only the case of a character but is a completely different class. -- MOS_MIGRATED_REVID=113054116
* Return opaque value for native.rule() on a select() statement.Gravatar Han-Wen Nienhuys2016-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | This is imperfect in many ways: 1) the value is opaque, and not a BUILD value, so it cannot be used in rule arguments 2) its representation has a pointer address, so it breaks hermeticity. Despite its problem, we return this value because otherwise native.rules() fails if there is any rule using a select() in the BUILD file. A future solution would be to convert BuildType.SelectorList back to syntax.SelectorList. To do so, we would have to 1) recurse into the Selector contents of SelectorList, so those values are run through skylarkifyValue too 2) get the right Class<?> value. We could probably get at that by looking at ((SelectorList)val).getSelectors().first().getEntries().first().getClass(). -- MOS_MIGRATED_REVID=113051612