aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* 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
* Fix link in the menuGravatar laurentlb2017-07-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 162512994
* Update documentation of `dict`, mention it's mutable.Gravatar laurentlb2017-07-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 162505701
* Move some best practices to the BUILD file style guide.Gravatar laurentlb2017-07-20
| | | | | RELNOTES: None. PiperOrigin-RevId: 162501299
* 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
* Move Backward compatibility to a separate page.Gravatar laurentlb2017-07-19
| | | | | RELNOTES: None PiperOrigin-RevId: 162476598
* 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
* Add more of our common targets to the IJWB project file.Gravatar Philipp Wollermann2017-07-19
| | | | | | | | | | | | This will make it easier to work on Bazel's core tools like buildjar, singlejar and the JUnit test runner. Also correctly mark their tests as test code in the project. RELNOTES: None. Change-Id: Id79810b4c78b73d92b9c01b1d33f77b7504eab3d PiperOrigin-RevId: 162472964
* 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
* Fix link to the Building Python on Windows doc.Gravatar Yilei (Dolee) Yang2017-07-19
| | | | | | Closes #3411. PiperOrigin-RevId: 162464151
* 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
* Clean up ConfigFeatureFlagProvider.Gravatar mstaib2017-07-19
| | | | | | | | | | | | Restrict visibility of the Skylark constructor to the package, which is still necessary because ConfigSkylarkCommon exposes it, otherwise it would be private. It matters less now that these providers are type-safe, but it's still slightly cleaner. RELNOTES: None. PiperOrigin-RevId: 162367759
* Fix string representation for the Root classGravatar vladmos2017-07-19
| | | | | | | It can be accessed as ctx.genfiles_dir and should be printed as before for compatibility. PiperOrigin-RevId: 162360940
* Now that SkyKey is an interface, accept Iterable<? extends SkyKey>Gravatar ulfjack2017-07-19
| | | | | | | A subsequent CL makes TargetPatternKey implement SkyKey, and it's much nicer if I can pass lists of TargetPatternKey to the various Skyframe APIs. PiperOrigin-RevId: 162359843
* Implement toolchain resolution via constraint checks.Gravatar John Cater2017-07-19
| | | | | | | Part of #2219. Change-Id: I5777e9b6cafbb7586cbbfb5b300344fd4417513d PiperOrigin-RevId: 162359389
* Add --extra_toolchains flag to register additional toolchain labels.Gravatar John Cater2017-07-19
| | | | | | | Fixes https://github.com/katre/bazel/issues/4. Change-Id: I664aaeb0d2aa4f36ecd0f1a5f13b5d7f25dcc8d6 PiperOrigin-RevId: 162355466
* Don't differentiate genfiles and bin in artifactsToStrings().Gravatar lberki2017-07-19
| | | | | | | This fixes the majority of Java test failures with --noexperimental_separate_genfiles_directory . RELNOTES: None. PiperOrigin-RevId: 162350591
* Fix #1027: XML test output missing for tests that timeoutGravatar philwo2017-07-19
| | | | | | The sandbox execution strategies were not passing the timeout grace period specified via --local_termination_grace_seconds, resulting in process-wrapper defaulting to just 5 seconds and linux-sandbox not using any grace period at all, instead directly SIGKILLing the child on timeout. PiperOrigin-RevId: 162349919
* CustomCommandLine: add emptiness checksGravatar laszlocsomor2017-07-19
| | | | | | | | | | | | | | | | | | | | | This is a semantic roll-forward of https://github.com/bazelbuild/bazel/commit/a76c94be7c56b93fc5a2f9ececfba7ac1f61f69c which was rolled back in https://github.com/bazelbuild/bazel/commit/33cd68e18f554b98194b4ce924580d3333ab9217 due to memory regressions. In this commit: - add @Nullable annotations to CustomCommandLine.Builder.add* methods where it makes sense - add Preconditions.checkNotNull for non-nullable arguments - add emptiness checks for Iterables in add(String, Iterable) style methods, to avoid adding the argument when the Iterable is empty and so the argument would not be followed by any values RELNOTES: none PiperOrigin-RevId: 162349842
* generate_bash_completion.sh: add explict end-of-options for exprGravatar aehlig2017-07-19
| | | | | | | | | Some implementations of expr(1) get confused if the first argument is not an option argument but starts with a minus sign. To make this script more portable, add an explict '--' argument, signaling "end of options", which seems to be understood by most implementations. PiperOrigin-RevId: 162349479
* Report error when action_config for given C++ compile action is not definedGravatar hlopko2017-07-19
| | | | | RELNOTES: None. PiperOrigin-RevId: 162344071
* Add more unit tests for java_common.create_provider.Gravatar elenairina2017-07-19
| | | | PiperOrigin-RevId: 162336470
* Remove the unused class NoSuchConfiguredTargetException.Gravatar lberki2017-07-19
| | | | | | | It was apparently created by me in May 2011. RIP. RELNOTES: None. PiperOrigin-RevId: 162334525
* Add an option to remove the toolchain identifier from the name of the output ↵Gravatar lberki2017-07-18
| | | | | | | | | directory. This will probably need some more work so that there are no name clashes with e.g. Android output directory names, but let's take one step at a time. RELNOTES: None. PiperOrigin-RevId: 162328750
* 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
* RELNOTES: None.Gravatar Googler2017-07-18
| | | | PiperOrigin-RevId: 162325932
* Add an undocumented option to remove the separation between the bin and ↵Gravatar lberki2017-07-18
| | | | | | | genfiles directories. RELNOTES: None. PiperOrigin-RevId: 162325236
* Fix Postable forwarding and replayGravatar ulfjack2017-07-18
| | | | | | | We were previously duplicate-posting Postable events posted to the Skyframe environment. PiperOrigin-RevId: 162323598
* Automated rollback of commit 6d6e87297fe8818e4c374fdfabfbcf538bca898a.Gravatar dmarting2017-07-18
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Does not work so well, see https://storage.googleapis.com/bazel/0.5.3/rc1/index.html *** Original change description *** Release script: generate the index.html from the commit message Do not rely on the README.md anymore, because it relies on log still existing forever on Jenkins. Incoming change will just provides the log as a file that will be archived on GCS. Change-Id: Ib962c249145d222bf9909070698c5d419b34db4c PiperOrigin-RevId: 162321172
* Automated rollback of commit a76c94be7c56b93fc5a2f9ececfba7ac1f61f69c.Gravatar laszlocsomor2017-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Caused memory regression. *** Original change description *** CustomCommandLine.Builder: clean up its interface In this commit: - remove unused methods and classes - turn CustomCommandLine.ArgvFragment into an interface - remove the CustomCommandLine.TreeFileArtifactArgvFragment abstract class; it only had one remaining subclass - add @Nullable annotations where nulls are fine - add Precondition checks for non-nullable args - simplify the interface by removing add* methods that can be composed of other add* methods; this makes it easier to see... *** RELNOTES: none PiperOrigin-RevId: 162320031