aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/packages
Commit message (Collapse)AuthorAge
* Rename bazel-user-manual.html into user-manual.htmlGravatar dmarting2017-09-04
| | | | PiperOrigin-RevId: 167477112
* Automated rollback of commit 2b983bdf508e010a3d4ee9dbaf446b7666749799.Gravatar cpeyser2017-09-01
| | | | | | | | | | | | *** Reason for rollback *** Breaks rules_go CI *** Original change description *** Rollforward of c++ toolchain-relevant BUILD file and Bazel mocking changes. That is, a c++ toolchain is added, but a Bazel dependency on that toolchain is not. PiperOrigin-RevId: 167198874
* Rollforward of c++ toolchain-relevant BUILD file and Bazel mocking changes. ↵Gravatar cpeyser2017-08-31
| | | | | | That is, a c++ toolchain is added, but a Bazel dependency on that toolchain is not. PiperOrigin-RevId: 167006332
* Automated rollback of commit 9d5bce66280094c0531ddfde2752e596d0d78c79.Gravatar plf2017-08-30
| | | | PiperOrigin-RevId: 166966182
* Add a new toolchain type for c++. In order to do this, ↵Gravatar cpeyser2017-08-29
| | | | | | | | PlatformConfiguration is made a legal configuration fragment for every rule class. Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests. PiperOrigin-RevId: 166854893
* Automated rollback of commit 363413110f3a63a11d900864be1852adbaed2899.Gravatar cpeyser2017-08-29
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks //src/test/shell/bazel:bazel_bootstrap_distfile_test: INFO: You can skip this first step by providing a path to the bazel binary as second argument: INFO: ./compile.sh compile /path/to/bazel 🍃 Building Bazel from scratch...... 🍃 Building Bazel with Bazel. .WARNING: /tmp/bazel_cHivhPBc/out/external/bazel_tools/WORKSPACE:1: Workspace name in /tmp/bazel_cHivhPBc/out/external/bazel_tools/WORKSPACE (@io_bazel) does not match the name given in the repository's definition (@bazel_tools); this will cause a build error in future versions. ERROR: in target '//external:cc_toolchain': error loading package '@local_config_cc//': Extension file not found. Unable to load file '@local_config_cc//:dummy_toolchain.bzl': file doesn't exist or isn't a file. INFO: Elapsed time: 3.343s ERROR: Could not build Bazel Found by git bisect. *** Original change description *** Add a new toolchain type for c++. In order to do this, PlatformConfiguration is made a legal configuration fragment for every rule class. Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests. PiperOrigin-RevId: 166750885
* Open source some objc tests. Most notably, proto and j2objc tests still ↵Gravatar cparsons2017-08-28
| | | | | | | remain, but will follow. RELNOTES: None. PiperOrigin-RevId: 166635306
* Add a new toolchain type for c++. In order to do this, ↵Gravatar cpeyser2017-08-28
| | | | | | | | PlatformConfiguration is made a legal configuration fragment for every rule class. Add a default "dummy" c++ toolchain to prevent resolution errors when legacy toolchain selection logic is used. Add toolchain mocks to java and shell tests. PiperOrigin-RevId: 166509298
* Implement field declarations for declared providers.Gravatar dslomov2017-08-25
| | | | | RELNOTES: Skylark providers can specify allowed fields and their documentation. PiperOrigin-RevId: 166446104
* Remove RuleClass.Configurator and obsolete LIPO_ON_DEMAND uses.Gravatar gregce2017-08-18
| | | | | | | | Dynamic configs use RuleTransitionFactory instead. Part of the static config cleanup effort. PiperOrigin-RevId: 165590679
* Workaround for ld bug that causes flakiness when using -bitcode_symbol_map.Gravatar allevato2017-08-14
| | | | | RELNOTES: PiperOrigin-RevId: 165012363
* Use java.time.Duration for timeoutsGravatar ulfjack2017-08-09
| | | | PiperOrigin-RevId: 164577062
* Required toolchains set on rule classes are inherited.Gravatar cpeyser2017-08-07
| | | | PiperOrigin-RevId: 164281027
* Make sure copts is the last feature in osx crosstoolsGravatar hlopko2017-08-04
| | | | | | | | | | | | | Change https://github.com/bazelbuild/bazel/commit/646cfd81793fc3b87979089aab873310d14e95e6 moved copts to the build variable and in order to keep the ordering of the flags as before the copts feature needs to be the last feature in the toolchain. Osx crosstool generator sometimes appended additional features, that broke this assumption. This cl makes sure copts is the last feature. In addition, flags directly from action_config will be added first, not last as they were before. RELNOTES: Flags from action_config get added first to the command line first, before the flags from features. PiperOrigin-RevId: 164257469
* Use feature configuration to construct command line for 'strip' actionGravatar hlopko2017-08-03
| | | | | | | | | | This cl introduces new action_config named 'strip' for the strip action. While at it, it fixes support for executionRequirements. Fixed #209 RELNOTES: 'strip' action is now configured via feature configuration PiperOrigin-RevId: 164110478
* CppLinkAction decides execution platform based on action_configs.Gravatar cpeyser2017-08-03
| | | | PiperOrigin-RevId: 164066205
* Use RequiredProviders to validate rule prerequisites in RuleContext.Gravatar dslomov2017-08-03
| | | | | | | | | We now use a unified way to check provider requirements everywhere. Reland of https://github.com/bazelbuild/bazel/commit/c32e1b1efcd703b3780de47fba62974123593d71. RELNOTES: None. PiperOrigin-RevId: 164038621
* Cleanup mock action_configs in MockCcSupportGravatar hlopko2017-08-02
| | | | | RELNOTES: None. PiperOrigin-RevId: 163947365
* Simplify copts handling and expose them as a build variableGravatar hlopko2017-08-02
| | | | | | | | | | | This cl changes copts to be immutable (and changes addCopts methods into setCopts, so it's simpler to reason about copts) and exposes copts as a build variable. It also introduces CompileBuildVariablesTest, similar to LinkBuildVariablesTest, to test that right build variables are exposed for right actions. RELNOTES: None. PiperOrigin-RevId: 163876774
* Automated rollback of commit c32e1b1efcd703b3780de47fba62974123593d71.Gravatar dslomov2017-08-02
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks depot b/64250728 *** Original change description *** Use RequiredProviders to validate rule prerequisites in RuleContext. We now use a unified way to check provider requirements everywhere. RELNOTES: None. PiperOrigin-RevId: 163862067
* Implement user experience for LIPO / ThinLTO users.Gravatar klimek2017-08-01
| | | | | | | | | | | | | | | | | | | | | Add flag --convert_lipo_to_thinlto, which allows builds with LLVM to use ThinLTO when the user specifies LIPO + FDO flags; if that flag is not set, and the user requests a build with LLVM, the compile will now fail. Add an attribute supports_lipo to the DefaultCpuToolchain crosstool proto and skip default toolchains that do not support LIPO when the user has specified LIPO flags in the toolchain selection; this enables CROSSTOOL files to cause an implicit fallback to a hybrid / LIPO toolchain when using an LLVM toolchain as the default. Add a CrosstoolBuilder to MockCcSupport and add a new method setupCrosstoolFromScratch that allows unit tests to fully control the setup. The other methods available in MockCcSupport will always load in a default CROSSTOOL file and may show different unit test results depending on the content of that file. RELNOTES: None. PiperOrigin-RevId: 163819246
* Better names for declared providers-related classes.Gravatar dslomov2017-08-01
| | | | | | | | Follows https://docs.google.com/document/d/1aAIVWvHPERDz2cv_PCFGwr8dvh5FcAkENFoRsNS4clk/. RELNOTES: None. PiperOrigin-RevId: 163728291
* Use RequiredProviders to validate rule prerequisites in RuleContext.Gravatar dslomov2017-07-31
| | | | | | | We now use a unified way to check provider requirements everywhere. RELNOTES: None. PiperOrigin-RevId: 163710961
* Fix confusing semantics for Attribute.Builder.allowedRuleClasses.Gravatar gregce2017-07-28
| | | | | | | | | | 1) Update the javadocs. 2) Clarify that allowedRuleClases and allowedRuleClassesWithWarning must be disjoint sets. 3) Enforce 2). 4) Fix error messaging when only "with warnings" is set. PiperOrigin-RevId: 163379567
* Define an outgoing rule transition interface.Gravatar gregce2017-07-27
| | | | | | | | | | This lets a parent choose a transition for its dep based on the dep's rule class. Implement (experimental) dynamic Android resource filtering trimming with this. PiperOrigin-RevId: 163259052
* 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
* 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
* Add register_toolchains function to the WORKSPACE for registering toolchains ↵Gravatar John Cater2017-07-11
| | | | | | | | | to use. Part of #2219. Change-Id: Id6dfe6ec102f609bb19461242a098bf977be29ae PiperOrigin-RevId: 161527986
* Make native declared providers type-safe.Gravatar dslomov2017-07-10
| | | | | RELNOTES: None. PiperOrigin-RevId: 161395570
* Do not NPE crash when C++ actions are not configured in crosstoolGravatar hlopko2017-07-07
| | | | | | | Show meaningful message instead. RELNOTES: None. PiperOrigin-RevId: 161196096
* Improve error message when calling a builtin function with wrong typeGravatar laurentlb2017-07-07
| | | | | | | Error message is simpler and doesn't show the type of all arguments. RELNOTES: None. PiperOrigin-RevId: 161187134
* Open source unit tests for the objc rules.Gravatar cpeyser2017-07-06
| | | | PiperOrigin-RevId: 161010594
* Remove the ToolchainConstructor class and change uses to be either aGravatar John Cater2017-07-06
| | | | | | | | | Label or a ToolchainInfo provider. Part of #2219. Change-Id: Ia09070717f54eea10e1ab0303253714b58768548 PiperOrigin-RevId: 160995546
* Assume crosstools that don't have 'no_legacy_features' feature need patchingGravatar hlopko2017-07-06
| | | | | | | | | | | | | Right now there are 2 ways how to control crosstool patches. If there is 'no_legacy_features' feature defined, no patching will be performed. If there is not, then depending on whether any c++ action_config is defined one set of patches is applied, or other set of patches is applied. It's a mess, and in the most cases, crosstools that do not define 'no_legacy_features' need the full patching. This cl fixes the crosstools that need the partial patching. RELNOTES: Crosstool patches are only applied if the toolchain doesn't define 'no_legacy_features' feature. PiperOrigin-RevId: 160979463
* Remove implicit iteration from CrosstoolGravatar hlopko2017-07-05
| | | | | | | | | | | | | | | | | Up until now we allowed implicit iteration, e.g.: flag_group { flag: '%{some_sequence_variable}' } From now on, snippet above will raise an error. We require explicit 'iterate_over' message, e.g.: flag_group { iterate_over: 'some_sequence_variable' flag: '%{some_sequence_variable}' } RELNOTES: Implicit iteration in the CROSSTOOL has been removed, use explicit 'iterate_over' message. PiperOrigin-RevId: 160871888
* Inline AttributeContainer.ATTRIBUTE_CONTAINER_FACTORY and ↵Gravatar laurentlb2017-07-03
| | | | | | | PathFragment.TO_PATH_FRAGMENT RELNOTES: None. PiperOrigin-RevId: 160668541
* Refactor PrinterGravatar vladmos2017-07-03
| | | | | | | It's now easier to customize Printer if in different situations objects should be printed differently. Also its API is cleaner now. Names of methods of SkylarkValue objects now reflect names of Skylark functions: SkylarkValue#repr and SkylarkPrintableValue#str. PiperOrigin-RevId: 160635154
* Forbid duplicate keys in dictionary literalsGravatar laurentlb2017-06-26
| | | | | | | RELNOTES: When using the dictionary literal syntax, it is now an error to have duplicated keys (e.g. {'ab': 3, 'ab': 5}). PiperOrigin-RevId: 159945431
* Allow "[", "]", "{", and "}" in globs in BUILD files. (#3048)Gravatar Jonathan Bluett-Duncan2017-06-22
| | | | | | | | | | | | PR #2679 allowed parentheses ("(" and ")") in globs, but other bracket style characters were not allowed at the time. It was decided in issues #2583 and #3048 that other bracket characters should be allowed as well, since there is no apparent historical reason for disallowing them in the first place. Closes #3166. PiperOrigin-RevId: 159691498
* Change TestTimeout's rangeMax values so that isInRangeFuzzy will flag tests ↵Gravatar Googler2017-06-19
| | | | | | | | | that are potentially timeout flaky and getSuggestedTestTimeout is less likely to suggest timeouts that can result in timeout flakiness. Also modernized and refactored TestTimeout to be more understandable. RELNOTES: Adjust the thresholds for --test_verbose_timeout_warnings so that it can recommending timeout increases and won't recommend timeouts that are too close to the actual timeout. PiperOrigin-RevId: 159222380
* Propagate postable events further upGravatar Klaus Aehlig2017-06-14
| | | | | | | | | | | | With the introduction of the ExtendedEventHandler, SkyFunctions were given the possibility to post additional Postable events in addition to the standard events. As SkyFunctions have to be restartable, events are collected first and only posted after the function is finished. Make sure that this also applies to postable events and they are not dropped. Change-Id: Ie1c3a0134935c75ea984fa2cc924e7327a9da81f PiperOrigin-RevId: 158964337
* Init absent action configs for CppCompile actionsGravatar hlopko2017-06-12
| | | | | | | | | | So far only link actions were initialized in CppLinkActionConfigs. This cl changes this class to also initialize CppCompile actions. This is needed for our ongoing work removing hard-coded flags from Bazel and moving them into Crosstool. RELNOTES: None. PiperOrigin-RevId: 158715986
* 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
* Add //external:has_androidsdk config_setting.Gravatar ajmichael2017-06-01
| | | | | | | | | | | | | | | | | | This will be used to add some tests and targets to the Bazel codebase that build and run successfully when android_sdk_repository is in the WORKSPACE and silently skip if it is not. Example deps of a library that links against dx.jar: ``` deps = select({ "//external:has_androidsdk": ["//external:android/dx_jar_import"], "//conditions:default": [], }), ``` Also adds tests that config_setting works as expected when propagated through an alias or bind rule. RELNOTES: None PiperOrigin-RevId: 157627472
* Restructure site/ directory into docs/ which only contains Bazel documentation.Gravatar dzc2017-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The new docs/ directory in the bazel source tree will only contain the Bazel docs site, which is hosted at docs.bazel.build. This change deletes the marketing site and blog, which have been migrated to the bazel-website and bazel-blog GitHub repositories respectively. This change also updates the serve-docs.sh and ci/build.sh under scripts/ in preparation for publishing the docs site. Note that to help make reviews more manageable, this change is limited to moving files to their new locations. Here are the follow-up changes: * Update all links in docs to remove versions/master in paths and to add correct bazel.build subdomain when linking to pages on the marketing site or the blog. * Set up versioned directories on GCS bucket and add tooling for versioning docs This change is also coordinated with https://bazel-review.googlesource.com/c/11568/ to have the PublishSite job publish to docs.bazel.build rather than www.bazel.build. Issue #2397 RELNOTES: None PiperOrigin-RevId: 157612651
* Migrate all tests to Truth (except the ones in the examples).Gravatar lberki2017-05-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 157576492
* Migrate Java tests to Truth.Gravatar lberki2017-05-30
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157446717
* Fixes incorrectly-ordered arguments to calls to assertEqualsGravatar Googler2017-05-19
| | | | | | | | | | | | | | | [] This change has been automatically generated by an Error Prone check that detects incorrect argument ordering on calls to assertEquals-style methods. See [] Cleanup change automatically generated by javacflume/refactory Refactoring: third_party/java_src/error_prone/project/core/src/main/java/com/google/errorprone/bugpatterns/argumentselectiondefects:AssertEqualsArgumentOrderChecker_refactoring Tested: TAP --sample for global presubmit queue [] PiperOrigin-RevId: 156539781