aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Support multiple --define's in config_setting.Gravatar gregce2017-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the problem that config_setting( name = "a_and_b", values = { "define": "a=c", "define": "b=d" }) doesn't work as expected because BUILD parsing removes duplicate dictionary keys in accordance with Pythonic behavior. Even worse, Skylark will soon enforce this more aggressively by making this an outright error. This change introduces the define_values attribute: config_setting( name = "a_and_b", values = { "normal_flag": "normal_value", }, define_values = { "a: "c", "b": "d" }) This is equivalent to "$ bazel build ... --normal_flag=normal_value --define a=c --define b=d" at the command line. Also tried to clean up some ConfigSetting naming for clarity around the different kind of flags. PiperOrigin-RevId: 162627180
* Improve documentation in MethodLibrary, add examples for builtins.Gravatar laurentlb2017-07-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 162623144
* Tolerate injected nodes having deps.Gravatar janakr2017-07-21
| | | | | | | | | | We don't check explicitly that these are the only two ways, but this can happen if the error transience node is a dep of a node that's being injected, or if an injected node is an "external" file that needs to depend on an external package. The first possibility can happen if there was an IOException reading the node on the previous build. We handle the situation by just dirtying the node, not injecting it. Actual evaluation can handle the re-stat. PiperOrigin-RevId: 162622092
* Improve logging on batch stat issues.Gravatar felly2017-07-21
| | | | PiperOrigin-RevId: 162618754
* Add --toolchain_resolution_override to allow specifying the toolchain for a ↵Gravatar John Cater2017-07-21
| | | | | | | | | given type. Fixes https://github.com/katre/bazel/issues/6. Change-Id: I6c6e303384277b013bdc27eb80743aa51f2fb98a PiperOrigin-RevId: 162618674
* Allow the aapt2 code paths to be enabled by either flag or attribute.Gravatar corysmith2017-07-21
| | | | | RELNOTES: None PiperOrigin-RevId: 162613289
* Use new actions API in docs.Gravatar Dmitry Lomov2017-07-21
| | | | | Change-Id: Ibbc41193ca3f577fbbd1674e9dd1c7f04a246e93 PiperOrigin-RevId: 162612615
* Improve documentation for 'actions.write' and 'actions.expand_template'.Gravatar laurentlb2017-07-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 162609583
* PiperOrigin-RevId: 162607273Gravatar plf2017-07-21
|
* Skylark documentation: Replace "set" and "List" plain-text return types with ↵Gravatar fwe2017-07-21
| | | | | | links to "deptset" and "list". PiperOrigin-RevId: 162607082
* Include the JavaPluginInforProvider from java_library in JavaProvider.Gravatar elenairina2017-07-21
| | | | PiperOrigin-RevId: 162606464
* Turn off checking for filegroup "data" attributes.Gravatar cpovirk2017-07-20
| | | | | | Evidently the blanket disabling for all "data" attributes doesn't apply there. PiperOrigin-RevId: 162602015
* Internal changeGravatar aehlig2017-07-20
| | | | PiperOrigin-RevId: 162601644
* Automated rollback of commit b8514f533d4546d3bfbec3700012f2bbeffd1c37.Gravatar dmarting2017-07-20
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks XML format when there is weird characters in the output (Jenkins fails to read XML output for re2 test) *** Original change description *** Add stdout to default XML file and generate XML file on timeout This should fix #1027 and get better error result on Jenkins. Change-Id: I5ce30b64f634e01dd350af10748c4a9455a6bea8 PiperOrigin-RevId: 162598130
* Automated rollback of commit e5f970906594d9097bb7c3736b2de1750cc8655f.Gravatar dmarting2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Break apple test on darwin. *** Original change description *** Refactor docker tests to be buildable without docker. This make this build a bit non-deterministic since the way it will be built depend on wether docker is installed or not. We now use the docker_pull from bazelbuild/continuous-integration to generate the base docker images and generate a fake docker binary that just error out when docker is not found so test will fails. Note that the docker_pull is set to timeout after an hour and can be extremely slow... *** PiperOrigin-RevId: 162598046
* Do not depend on the Java launcher if java_binary.create_executable=0 ↵Gravatar lberki2017-07-20
| | | | | | | because it's not used anyway. RELNOTES: None. PiperOrigin-RevId: 162589013
* Automated rollback of commit 01ddfb7bf418b371859de62f4eab2f41ea9a4a4a.Gravatar laszlocsomor2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial rollback. I restored the old flags (with PathListConverter), added the new ones, added deprecation warnings and annotations, and added code to concat the values of new and old. Existing released versions of Bazel should keep working with the new code until 2018-01-31, i.e. for the next ~6 months. After that I'll remove the old flags and the PathListConverter. *** Reason for rollback *** Fixed broken integration with release Blaze. *** Original change description *** Automated rollback of commit 5752463ece84ebb4fb074888cba57412ab8d86b3. *** Reason for rollback *** Broke too many targets. *** RELNOTES: none PiperOrigin-RevId: 162587548
* Windows: clean up error reportingGravatar Laszlo Csomor2017-07-20
| | | | | | | | | | | | | | | | | | | In this commit: - remove blaze::PrintError in favor of blaze_util::PrintError - remove Ijar's PrintLastErrorMessage in favor of blaze_util::PrintError - use pdie every time path conversion fails, because that indicates a fatal error (bad user input for a path flag, or downright bug) - remove explicitly printing GetLastErrror; pdie and PrintError do it already - unify the pdie/PrintError message formats Fixes https://github.com/bazelbuild/bazel/issues/2935 Change-Id: I5feaf73885cab95c43a28c529ada6942e037b162 PiperOrigin-RevId: 162587490
* Fix typos in messages.Gravatar dslomov2017-07-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 162586748
* Automated rollback of commit 6e72f78e1c2e573787ec862e671f3b3b4c33dc96.Gravatar kush2017-07-20
| | | | | | | | | | | | | | *** Reason for rollback *** Causing TGP issues with tool failures: b/63839245 Was finally able to repro the issue at HEAD, and didn't occur without this change. *** Original change description *** Small changes to skyframe package. RELNOTES: None PiperOrigin-RevId: 162565994
* Deprecate dynamic config OFF and NOTRIM_PARTIAL modes.Gravatar gregce2017-07-20
| | | | | | | | | | | | | --experimental_dynamic_configs=off --experimental_dynamic_configs=notrim_partial are now aliases for --experimental_dynamic_configs=notrim (the default). Also remove outdated --nodistinct_host_configuration warning. PiperOrigin-RevId: 162549307
* Be more precise in which values we're looking for in the histogram: just ↵Gravatar janakr2017-07-20
| | | | | | GlobValue objects, not any others. PiperOrigin-RevId: 162533962
* Internal changeGravatar Googler2017-07-20
| | | | PiperOrigin-RevId: 162532778
* 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
* Add test framework for OptionsBase classes and their Converters.Gravatar mstaib2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because OptionsBase implements equals() as a final method, subclasses can only add fields in certain ways for OptionsBase to properly obey equals() semantics. Specifically, all fields must be public and @Option annotated. The OptionsTester checks for these two things. Additionally, Converters must make sure to always return equals() values on equals() (or equivalent) input. The OptionsTester includes a check that all Converters named by the OptionsBase subclass being tested have matching ConverterTesters, and if valid default values are specified (i.e., on Options which are not multi-valued or default null), that these defaults are among the values tested by the ConverterTesters. The ConverterTesters themselves are wrapped EqualsTesters, testing that the output of a Converter obeys equals() as expected for the same input (or equivalent ones), and is consistent across calls to the same Converter instance or different Converter instances. Between these two, OptionsBase subclasses can have reasonable certainty that two instances of themselves which were parsed equally - or underwent equivalent transformations - will be equal. This does not actually test any OptionsBase subclasses or Converter implementations; it merely adds a framework. Future changes will cover automatically testing all of the OptionsBase subclasses in a RuleClassProvider, but naturally, this requires writing test data for each Converter in the Bazel codebase first. RELNOTES: None. PiperOrigin-RevId: 162522445
* Use double-quotes instead of single-quotes for consistency.Gravatar laurentlb2017-07-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 162518452
* Update documentation of `dict`, mention it's mutable.Gravatar laurentlb2017-07-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 162505701
* Document that javabase accepts java_runtime_suiteGravatar Dan Fabulich2017-07-19
| | | | | Change-Id: Ib8e91dce28f615a5376b38cb7d858ea361e86b92 PiperOrigin-RevId: 162483331
* Update jacoco coverage runner to consider some edge cases.Gravatar elenairina2017-07-19
| | | | | | | | | | After running the new coverage implementation on some real targets I found the following. 1. Inner classes with the same name could be added from different jars. Addressed this by analyzing classes with the same name exactly once. 2. Auto-generated files were added to the coverage report. This is resolved first on the blaze/bazel side by adding to the files with the exec paths of the instrumented files only those that are source files and on the coverage runner side by discarding all the files that are not in that file. PiperOrigin-RevId: 162478894
* Add //third_party/py/six to embedded_tools.Gravatar Joe Finney2017-07-19
| | | | | | | | | https://github.com/bazelbuild/bazel/pull/3363#issuecomment-314774384 Closes #3369. Change-Id: I52c7c39db13131bfc343666fbd05840815ee7fa8 PiperOrigin-RevId: 162478002
* Use C++ iterators and iteration during rc file parsing.Gravatar Benjamin Peterson2017-07-19
| | | | | | | | | | | | | | This is a bit more idiomatic and fixes these GCC complaints: src/main/cpp/option_processor.cc: In static member function 'static blaze_exit_code::ExitCode blaze::OptionProcessor::RcFile::Parse(const string&, const string&, int, const blaze::WorkspaceLayout*, std::vector<blaze::OptionProcessor::RcFile*>*, std::map<std::__cxx11::basic_string<char>, std::vector<blaze::OptionProcessor::RcOption> >*, std::__cxx11::list<std::__cxx11::basic_string<char> >*, std::__cxx11::string*)': src/main/cpp/option_processor.cc:92:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int line = 0; line < lines.size(); ++line) { ~~~~~^~~~~~~~~~~~~~ src/main/cpp/option_processor.cc:151:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (int word = 1; word < words.size(); ++word) { ~~~~~^~~~~~~~~~~~~~ Change-Id: Ieb0e8f89194fe802f79c729eb7a851ea2dfad665 PiperOrigin-RevId: 162477025
* Refactor docker tests to be buildable without docker.Gravatar Damien Martin-Guillerez2017-07-19
| | | | | | | | | | | | | | | | | This make this build a bit non-deterministic since the way it will be built depend on wether docker is installed or not. We now use the docker_pull from bazelbuild/continuous-integration to generate the base docker images and generate a fake docker binary that just error out when docker is not found so test will fails. Note that the docker_pull is set to timeout after an hour and can be extremely slow so we also set it to non quiet. Fixes #3278. Change-Id: I98d5b436e424f53981e113c1a4fd1346a5564df7 PiperOrigin-RevId: 162476033
* 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
* Mark PACKAGE_NAME and REPOSITORY_NAME as deprecated.Gravatar laurentlb2017-07-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 162475651
* Add stdout to default XML file and generate XML file on timeoutGravatar Damien Martin-Guillerez2017-07-19
| | | | | | | This should fix #1027 and get better error result on Jenkins. Change-Id: I5ce30b64f634e01dd350af10748c4a9455a6bea8 PiperOrigin-RevId: 162474168
* Remove TransitiveTargetValue.transitive{S,Uns}uccessfulPkgsGravatar ulfjack2017-07-19
| | | | | | | It was only used by GenQuery, for which we can use getTransitiveRootCauses() and getTransitiveTargets() instead. PiperOrigin-RevId: 162471592
* Make sure FeatureConfiguration is always set in C++ action buildersGravatar hlopko2017-07-19
| | | | | | | | One less thing to worry about. C++ action builders cannot be used without FeatureConfiguration anyway. RELNOTES: None. PiperOrigin-RevId: 162471228
* Fix sandboxing when spawn outputs differ from action outputs.Gravatar Benjamin Peterson2017-07-19
| | | | | | | | | | | | TestRunner actions are special because their action outputs are different from their spawn outputs. If there's a spawn output that's not an action output, SymlinkExecroot can't rely on the parent directories for that output existing in the real execroot. Thus, copyOutputs() must ensure the real execroot has the relevant ancestral directories before copying the output over. Change-Id: I84fd69cd51628c51de9c8993b6a4407bbff038a0 PiperOrigin-RevId: 162470058
* Implement bash.exe detection logic.Gravatar Dmitry Lomov2017-07-19
| | | | | | | | | | | | | | | | The logic is as follows: 1) search for msys installation 2) search got git-on-Windows installation 3) search in PATH. This happens on every client startup unless BAZEL_SH enviornment variable is set. My measurements show that the time required for this detection is negligible (<10 msec in the worst case). Change-Id: If130e2491a9df5a23954d303f2ccdb932eeed1db PiperOrigin-RevId: 162466913
* Allow java_runtime rules to have no srcs.Gravatar lberki2017-07-19
| | | | | | | Fixes #3408. RELNOTES: None. PiperOrigin-RevId: 162464669
* Make TargetPatternKey implement SkyKey instead of wrapping in LegacySkyKeyGravatar ulfjack2017-07-19
| | | | | | Makes for much nicer client code. PiperOrigin-RevId: 162454439
* Fix a bunch of test cases that break if genfiles == bin.Gravatar lberki2017-07-19
| | | | | | | A few are left, but they will require actual code changes (as opposed to changes to test cases only) RELNOTES: None. PiperOrigin-RevId: 162453092
* Make the ClifMatchRule produce .d files.Gravatar Googler2017-07-19
| | | | PiperOrigin-RevId: 162422934
* Open source j2objc tests.Gravatar cpeyser2017-07-19
| | | | PiperOrigin-RevId: 162411695
* RELNOTES: Ignore --glibc in the Android transition.Gravatar Googler2017-07-19
| | | | PiperOrigin-RevId: 162408227
* Rework LoadingPhaseCompleteEvent & AnalysisPhaseCompleteEvent to account for ↵Gravatar nharmata2017-07-19
| | | | | | | the fact that loading and analysis is now interleaved. RELNOTES: None PiperOrigin-RevId: 162388460
* Turn on objc crosstool use in Bazel by default.Gravatar cpeyser2017-07-19
| | | | PiperOrigin-RevId: 162388184
* Split invocation policy from the optionsparser target.Gravatar ccalvarin2017-07-19
| | | | | | //src/main/java/com/google/devtools/common/options:options is now free of bazel protos, once again. PiperOrigin-RevId: 162385612
* Clean up a few Skylark-Skyframe structuresGravatar brandjon2017-07-19
| | | | | | | Add value-class methods to SkylarkFileDependency and SkylarkImportLookupValue. Remove Java serialization hack from Extension. RELNOTES: None PiperOrigin-RevId: 162383283
* Ignore case in documentation indexGravatar laurentlb2017-07-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 162373757