aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* Add the default category and tag to all options.Gravatar ccalvarin2017-06-28
| | | | | | | | Move the default from the annotation to every mention. This makes the incompleteness explicit. Will add the defaults to test targets in a separate change. Once all dependencies are cleaned up, the Option annotation will no longer allow options without the documentationCategory or effectTag, to prevent new options being added without categories while we migrate to the new option categorization. PiperOrigin-RevId: 160281252
* Bazel docs: Fix Edit buttonGravatar steren2017-06-28
| | | | | | | | | | The new doc website has a new URL structure. This change adapts the page extraction code. It also restores the CSS for the edit button which got deleted during refactoring. Fix #3272 RELNOTES: None PiperOrigin-RevId: 160279009
* BEP: Gracefully handle null configurationsGravatar Klaus Aehlig2017-06-28
| | | | | | | Those may occur, e.g., if the target is simply a source file. Change-Id: Ia64c54e8543dd93712b00428c443922c67e2b6cd PiperOrigin-RevId: 160278149
* Create and example of how to change the default on inherited attributesGravatar Pweaver (Paul Weaver)2017-06-28
| | | | | | | | I found it confusing how to create a test rule with a different default size and had to dig through a lot of example code to figure this out. This pull request adds and example to the docs. Closes #3233. PiperOrigin-RevId: 160276727
* Add more helpers to ParserGravatar brandjon2017-06-28
| | | | | | | This simplifies parsing a lone statement or expression in unit tests. RELNOTES: None PiperOrigin-RevId: 160276410
* Tests + cleanup + docs for ctx.actions.declare_{file,directory}Gravatar dslomov2017-06-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 160273273
* cpp: add unit tests for MakeAbsolute()Gravatar Thiago Farina2017-06-28
| | | | | | | | | | | While fixing its TODO. Tested with the following command line: $ bazel test //src/test/cpp/... Change-Id: I62d5d0f19b7242fd2eeae7901e1e236c782ebfb5 PiperOrigin-RevId: 160270960
* Fix typo in JsonFormatFileTransport.javaGravatar Eric Dobson2017-06-28
| | | | | | | | Invlaid -> Invalid Closes #3119. PiperOrigin-RevId: 160270924
* BEP: also report test sizesGravatar Klaus Aehlig2017-06-28
| | | | | | | The size of a test is a relevant property of a test target. Report it. Change-Id: Ia529a11f4a6920bca7d233e3493640d319cca5ae PiperOrigin-RevId: 160268370
* Add 'ctx.actions.declare_directory'Gravatar dslomov2017-06-28
| | | | | RELNOTES: None. PiperOrigin-RevId: 160267763
* Fixes #3188: Implement sandboxing for remote_worker on Linux.Gravatar Philipp Wollermann2017-06-28
| | | | | | | RELNOTES: Bazel's remote_worker backend for remote execution supports sandboxing on Linux now. Check https://github.com/bazelbuild/bazel/blob/master/src/tools/remote_worker/README.md for details. Change-Id: I918b0291472c8c7d4884850d9ca0f03674ef2f31 PiperOrigin-RevId: 160266742
* Turn unary minus into a proper AST nodeGravatar brandjon2017-06-28
| | | | | | | This unifies unary minus with NotExpression, and moves the minus logic from a fake builtin function into the interpreter proper. RELNOTES: None PiperOrigin-RevId: 160266266
* Release 0.5.2 (2017-06-27)Gravatar Bazel Release System2017-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Baseline: e78ad83ded6e9c6d639793827e27b6570e6e9f65 Cherry picks: + 68028317c1d3d831a24f90e2b25d1410ce045c54: experimental UI: move stopUpdateThread() out of synchronized, again + 019935dfbb61e61d08d1351b0365fb4e2d0df305: Fix bug in URI computation in RemoteModule + e9424cf9b9d72b98594966d5ac0f15bb018ec639: Automated rollback of commit 7dec00574aa91327693f6ba7e90bff5bc834253e. + 9eea05d068a06ab642dd9d86d46ee5fa2e36b02e: Switching to Watcher API instead of wait_for_completion, in preparation for deprecating the wait_for_completion field. + 89659810e3048782dfb5e308e39aa8a0727e464e: Set correct execroot for info + 716b527266f47f59a2b7fb2e5fc52cb45e1691b1: Only create a single per-build instance of the remote cache / executor + 1d82d199f82409f217a42bcefebb96f723f91caa: protobuf: Update protobuf jars to be binary compatible with Java 6. Fixes #3198 + 524b90d9e5acc4fa568f215c9415eaa902e979f8: Change CAS URI to use the "bytestream" scheme instead of being scheme-less + 4929ad79865f8c13ef3b33c827040f4a037e4afe: Automated g4 rollback of commit 923d7df521f67d031b288180560848bd35e20976. + 68b9a7e2dc17e32b194238d287e79bee1ba035b9: Automated g4 rollback of commit da56606563ee9df438db93392f681bf2abb4ac97. + 2ba693ffbe824136a0ca5f47d34710612f6302c3: Automated rollback of commit ce7c4deda60a307bba5f0c9421738e2a375cf44e. Incompatible changes: - Blaze no longer generates xcode projects. Use tulsi.bazel.build instead. Important changes: - Keyword-only syntax in a function definition is deprecated (e.g. `def foo(a, *, b)` or `def foo(a, *b, c)`) and will be removed in the future. - Attempting to build an Android target without setting up android_sdk_repository will now produce a helpful error message. - Adds a sha256 attribute to git_repository and new_git_repository. This can only be used if the remote is a public GitHub repository. It forces Bazel to download the repository as a tarball, which will often be faster and more robust than cloning it. - Sandboxing is now enabled by default on FreeBSD (via processwrapper-sandbox). - android_test may use manifest placeholders with 'manifest_merger = "android"'. - load() statements should be called at the top of .bzl files, before any other statement. This convention will be enforced in the future. - Effectively remove sysroot from CppConfiguration and allow it to use select statements. - proto_library.strict_proto_deps no longer exists. - Flag --explicit_jre_deps is now a noop. - The 'legacy' Android manifest merger is deprecated. Please upgrade to the 'android' manifest merger, which is the same merger used by Gradle. https://developer.android.com/studio/build/manifest-merge.html - Using $(CC_FLAGS) in a GenRule adds a dependency to the c++ toolchain - add one-version enforcement to android_local_test - Skylark support (apple_common.dotted_version(string)) for building DottedVersion objects to interface with native apple rules - CC_FLAGS can be defined using 'cc-flags-make-variable' action_config in CROSSTOOL - ios_framework native rule has been removed. This rule had been essentially broken for several months now; users should be using the skylark ios framework rule. https://github.com/bazelbuild/rules_apple has details. - Clean command no longer uses boolean values for --async, --expunge, and --expunge_async options. - Partially fixes external J2ObjC support. - '--aspects' can occur more than once on the command line. - --no_ prefix no longer recognized. - Use action_config in crosstool for static library archiving, remove ar_flag. - Added a new flag --sandbox_writable_path, which asks the sandbox to make an existing directory writable when running actions. - bazel test now also computes a default instrumentation filter if --collect_code_coverage is enabled - n/na - In .bzl files, top-level `if` statements are deprecated and will be forbidden in the future. Move them in a function body instead (or use a conditional expression instead: `x if condition else y`). - ios_device and ios_test are deprecated. Please use the new testing rules in https://github.com/bazelbuild/rules_apple instead. - bazel query --output package now displays packages from external repository with the format "@reponame//package". Packages in the main repository continue to have the format "package". - ctx.expand_make_variables is deprecated. - Bazel posts links to the CAS to the BEP if remote caching / execution is enabled - `bazel info execution_root` returns the corrrect directory name for the execution root.
* Move the docker tests in src/test/dockerGravatar dmarting2017-06-27
| | | | | | | | | | | | This is a better location and tools/cpp is packaged in embedded_tools that make the test ends-up in embedded_tools, which is requiring network access to build embedded_tools! Side-effect: have to correctly mock the bazel workspace file on a couple of tests. This is blocking on https://bazel-review.googlesource.com/c/12350/ PiperOrigin-RevId: 160265524
* Bazel, python tests: add more context to failuresGravatar Laszlo Csomor2017-06-27
| | | | | | | | | | The Python integration tests will now print the stderr if the inner Bazel failed. This should help diagnosing test failures on CI. Change-Id: I138c1a6327cc263ba6a6e2c720c39ec5d4858d87 PiperOrigin-RevId: 160265298
* Enable connection pooling for the remote REST cacheGravatar Benjamin Peterson2017-06-27
| | | | | | | | | | | | | | | | | Connection pooling is a useful optimization for REST caches that are far away as it avoids constantly redoing the TCP handshake. It also prevents large builds from exhausting the local interface's source ports through tens of thousands of one-transaction connections. The default connection pool size of 20 is fairly arbitrary. Users probably want to set this to something close to the value of --jobs. We introduce some generic infrastructure for closing remote cache instances and use it to cleanly shutdown the connection pool between builds. Change-Id: I73adc29ecae15cc10a1217ffbaa483892bcd4f9a PiperOrigin-RevId: 160264681
* Add 'ctx.actions' and implement 'ctx.action.declare_file'.Gravatar dslomov2017-06-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 160264501
* BuildEventStreamUtils: update TODO to reflect the new plan of actionGravatar aehlig2017-06-27
| | | | | | | | | It seems preferable to make the TestStatus in the build event protocol the primary one. So update the TODO entry to reflect the new plan to get rid of the old BlazeTestStatus. RELNOTES: None PiperOrigin-RevId: 160263709
* Minor Bash improvementsGravatar Androbin2017-06-27
| | | | | | | | | | | | | | | | | Based on output of static analysis tool. https://github.com/koalaman/shellcheck/wiki/SC2166 https://github.com/koalaman/shellcheck/wiki/SC2207 https://github.com/koalaman/shellcheck/wiki/SC2145 https://github.com/koalaman/shellcheck/wiki/SC2001 https://github.com/koalaman/shellcheck/wiki/SC2129 https://github.com/koalaman/shellcheck/wiki/SC2128 https://github.com/koalaman/shellcheck/wiki/SC2004 https://github.com/koalaman/shellcheck/wiki/SC2048 Closes #3162. PiperOrigin-RevId: 160261247
* use procstat_getpathname to get self pathGravatar Jov2017-06-27
| | | | | | | | Use procstat_getpathname instead of /proc/curproc/file to get self path, as /proc do not always exists, and need root privilege to mount. procstat_getpathname is preferred on FreeBSD. Closes #3179. PiperOrigin-RevId: 160260464
* Simplify the RemoteActionCache interfaceGravatar ulfjack2017-06-27
| | | | | | | | | | | | | | | | | | | - merge all the inputs upload functionality into a single ensureInputsPresent method - merge all of the action result upload functionality into a single upload method - merge all the download functionality into a single download method This significantly simplifies the caller of this interface, and opens the door for additional performance improvements in implementations which now have more control over the upload / download flows; in particular, in the gRPC case, we can upload stdout / stderr using the existing chunker - upload of stdout / stderr is no longer serialized with file upload. In particular, the CachedLocalSpawnRunner test becomes much simpler, since it no longer needs to handle the previous more complex upload code path. PiperOrigin-RevId: 160260161
* BlazeCommandDispatcher: make parseArgsAndConfigs not take a CommandEnvironmentGravatar ulfjack2017-06-27
| | | | | | | | | | | | | Accept an ExtendedEventHandler in ProjectFileSupport, and use an ExtendedEventHandler in BlazeCommandDispatcher that captures the posts, and delay posting the GotProjectFileEvent until the initialization is complete. This is a small step towards simplifying the BlazeModule API - the plan is to merge beforeCommand, checkEnvironment, and handleOptions into a single method, but introduce a new method (commandInit) to participate in the early command initialization. PiperOrigin-RevId: 160259628
* give the duration of test in the fallback xml fileGravatar Benjamin Peterson2017-06-27
| | | | | | | | | A common extension to junitxml is to provide the duration of each test case in seconds. Here, we add the duration to the xml file that test-setup.sh provides if the test driver doesn't generate one. Change-Id: I25f94f10bb99db7078919f3e0bcdf7bd3cbb637d PiperOrigin-RevId: 160252993
* Don't set the +x bit by default on WriteFile().Gravatar lberki2017-06-27
| | | | | | | This change is a spiritual successor of https://bazel-review.googlesource.com/c/7410/ . That one had a merge conflict and it was small enough that a rewrite was easier than updating it. RELNOTES: None. PiperOrigin-RevId: 160251282
* Single quote the release messageGravatar Damien Martin-Guillerez2017-06-27
| | | | | | | | | | Double quoting make bash interpret the backquote and bazel is not on the path of the resulting process, showing error on the console. To cherry-pick for #3086. Change-Id: I15a4cdbd349300c87bd90d56ecb8df63ecf62dfb PiperOrigin-RevId: 160250275
* Remove jdk7 variant of the APT repositoryGravatar Damien Martin-Guillerez2017-06-27
| | | | | | | To cherry-pick for #3086. Change-Id: I05db2aef04a7cd6cec22c918f00e4b47bae3a1f4 PiperOrigin-RevId: 160249482
* Stop adding python paths into INCLUDE and LIBGravatar Yun Peng2017-06-27
| | | | | | | See https://github.com/bazelbuild/bazel/issues/3237 Change-Id: I4befad7a329695a952f792605b4936b93cfa2a7f PiperOrigin-RevId: 160249037
* Add alias in bazel_tools for jni_md_header-windowsGravatar pcloudy2017-06-27
| | | | | | | | | | Some projects, eg. TF depends on @bazel_tools//tools/jdk:jni_md_header-<platform> https://github.com/tensorflow/tensorflow/blob/master/tensorflow/java/src/main/native/BUILD#L70 We already have this for darwin, linux and freebsd, should also provide it for Windows. RELNOTES: None. PiperOrigin-RevId: 160248449
* Fix the name of a flag in an error messageGravatar dmarting2017-06-27
| | | | | | | The name of the flag was camelCased whereas the correct name is underscore separated. PiperOrigin-RevId: 160245462
* LLVM FDO zipped profiles contain the LLVM raw profile file whose contentsGravatar Googler2017-06-27
| | | | | | | | | | | | | are named fdocontrolz_gen_profile.profraw. LLVM zipped profiles are obtained via fdocontrolz which names the raw profile file fdocontrol_gen_profile.profraw. Previously, this file was named to be identical to the zip file but that had to be changed as users want to retain the ability to rename the zip file. RELNOTES[NEW]: Change to handle LLVM FDO zipped profile contents correctly. PiperOrigin-RevId: 160230719
* Fix RuleContext documentation typo.Gravatar gregce2017-06-27
| | | | PiperOrigin-RevId: 160191135
* Add idl_preprocessed field to android_library.Gravatar Googler2017-06-27
| | | | | RELNOTES: Add idl_preprocessed attribute to android_library, so that preprocessed aidl files can be passed to android_library for compiling PiperOrigin-RevId: 160185474
* Add option tagging and categorizing enums.Gravatar ccalvarin2017-06-27
| | | | | | | | | | | | | | Begin work of transferring option categorization to a sustainable, documented setup. DocumentationCategories will replace the existing string category field, and will group flags in generated documentation. Each flag must belong to exactly 1 DocumentationCategory, whichever is most applicable or a new one. OptionEffectTags will document the effects of tags and will be used for filtering flags. These tags, unlike the categories, should be complete. All options that do affect Bazel's output should be tagged as affecting Bazel's output, for example. This is necessary for them to be useful when trying to isolate the cause of an issue or behavior by allowing irrelevant options to be filtered out. Each flag must have at least 1 intended behavior, so should have 1+ OptionEffectTag. If no effect tag applies, find a general tag that would apply and add it to all relevant options. OptionMetadataTags will hold information about the flag itself. Information about the lifecycle of a flag, for example, should belong in an OptionMetadataTag. It is useful for filtering, since it describes how trustworthy we might think the flag would be, but does not actually describe the “intent” or “meaning” of a flag. This can be an empty list, but options can also have multiple OptionMetadataTags All options will be switched from the old "category" field to this new system. A few general OptionsBases are provided as an example. PiperOrigin-RevId: 160180328
* Add the ability to provide source_jars to java_common.create_providerGravatar Googler2017-06-27
| | | | | | | | This should allow macros using 'custom rule' + java_import to move the full java_import logic into their rule implementation. Also, fix the definition so that the default values work and the keyword args can be omitted. PiperOrigin-RevId: 160167191
* Refactor SkyQueryEnvironment to allow preprocessing or postprocessing targetsGravatar Googler2017-06-27
| | | | | | | | Refactor SkyQueryEnvironment and a few other query helpers to make it easier to work with targets. RELNOTES: None PiperOrigin-RevId: 160165398
* remove @bazel_tools//tools/build_rules:gensrcjar targetGravatar ajmichael2017-06-27
| | | | | RELNOTES: None PiperOrigin-RevId: 160156249
* Internal changeGravatar Googler2017-06-27
| | | | PiperOrigin-RevId: 160155305
* Forbid octal sequences greater than \377 (0xff) in strings.Gravatar laurentlb2017-06-26
| | | | | | | | RELNOTES[INC]: In strings, octal sequences greater than \377 are now forbidden (e.g. "\\600"). Previously, Blaze had the same behavior as Python 2, where "\\450" == "\050". PiperOrigin-RevId: 160147169
* Add JavaSkylarkApiProvider to aar_import rule.Gravatar Googler2017-06-26
| | | | | | | Without this, aar_import targets will not have java attribute in skylark, therefore not able to generate any ide info by intellij_info_aspect in intellij_info.bzl. RELNOTES: None. PiperOrigin-RevId: 160146803
* Enabling Aapt2 processing:Gravatar corysmith2017-06-26
| | | | | | | | | | | | * Add a new aapt_version attribute to android_binary * Add a new android_aapt_version flag to control the version of aapt used. * Add a new implicit output for aapt2 produced static libraries. * Add a new implicit output for aapt2 produced .flat files zip. RELNOTES: New property on android_sdk: aapt2 Choose the version of aapt on android_binary PiperOrigin-RevId: 160145530
* Remove usage of --ios_cpu from Bazel.Gravatar cpeyser2017-06-26
| | | | PiperOrigin-RevId: 160143322
* ResourceFilter properly handles special language qualifiersGravatar Googler2017-06-26
| | | | | | | | | | | | | | | | | | | | Two special types of language qualifiers are commonly used: Serbian can be written in Latin or Cyrillic characters. Serbian in Latin characters is referred to as sr-Latn (or, with a misplaced region prefix, sr-rLatn, or with the permutation common in some code for the old verions of regions supported by Aapt, sr_Latn). Spanish spoken across Latin America and the Caribbean can be represented by es-419 (or, using the permutation for old qualifier formats, es_419). For both of these, transform the resource qualifier into an appropriate BCP-47 representation that can be handled by FolderConfiguration. Also, add attribute warnings when these qualifiers are used in their specially-handled form (instead of in BCP-47 form). RELNOTES: none PiperOrigin-RevId: 160143247
* Remove remaining xcodegen references.Gravatar schmitt2017-06-26
| | | | | | | Deletes last code references to xcodegen tool as well as tool itself. RELNOTES: None. PiperOrigin-RevId: 160137807
* Make BuildEventStreamer flushable before first eventGravatar Klaus Aehlig2017-06-26
| | | | | | | | | | | | | | | Make the BuildEventStreamer capable of handling the flush() method, even before the initial build event is seen. This happens, if a lot (more than 10240 bytes) of output is produced before the BuildStartingEvent is generated- This is not unlikely, as the whole option processing happens before the build starts. As the promise of flush() is that the OutErrProvider is cleared, and that all output between two flush() get into separate events, numbered in order, we have to temporarily store a list of stdout/stderr String pairs. RELNOTES: None. PiperOrigin-RevId: 160137478
* Use relative paths in links in docs.Gravatar dzc2017-06-26
| | | | | | | | | | | | | | | | This change fixes links among Bazel docs to use relative paths links instead of absolute path (either full URL or absolute from site root). This way, versioned documentation will link to other pages within the same versioned directory rather than to the site root, which will point to the latest version of the page from HEAD. Future improvements may include adding a lint tool to check links in documentation to ensure that the correct convention is followed such that all links to pages within a version of the docs will point to pages within the same version. RELNOTES: None PiperOrigin-RevId: 160117865
* Make Metadata an interface for FileArtifactValueGravatar ulfjack2017-06-26
| | | | | | | | | | Replace all previous uses of Metadata with FileArtifactValue (or a simple inner class in the case of ActionCacheChecker.CONSTANT_METADATA). Care was taken to make the equals method obey the equals contract, even in the presence of multiple implementations. PiperOrigin-RevId: 160115080
* Automated rollback of commit 68b9a7e2dc17e32b194238d287e79bee1ba035b9.Gravatar cushon2017-06-26
| | | | | | | | | *** Reason for rollback *** The depot is fixed RELNOTES: None. PiperOrigin-RevId: 160115070
* BlazeCommandDispatcher: all options parsing and editing in one placeGravatar ulfjack2017-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The invocation policy must be the last step in determining the active options for the current command. Take precautions to prevent accidental options editing of options after the policy is applied by declaring the options as an OptionsProvider (interface has no mutating methods); technically, this could be circumvented by casting to OptionsParser, but it's at least safer than before. As part of this, I'm moving the BlazeCommand.editOptions call to before the invocation policy, and also making minor changes to the CommandEnvironment. Commands that expect to have the last word on options could therefore see options changes after this commit. There are three commands that override editOptions: 1. TestCommand Current behavior: if test_output=streamed is set, also sets --test_sharding_strategy=disabled and --test_strategy=exclusive. Overriding --test_sharding_strategy is not a concern; in fact, maybe we shouldn't be setting that in the first place, since it can cause tests to timeout (timeout is usually applied per shard, so a 10-way sharded test will very likely timeout). If you override the test_strategy to local or standalone, then you may get interleaved stdout / stderr output from tests that run in parallel - a bit surprising, but no showstopper. If you override the test_strategy to remote, you won't get streamed output, because no remote strategy currently supports that. You may get interleaved output, if multiple tests finish very close to each other. There are no correctness concerns, it's just a slightly worse user experience. The code is safe in all cases, AFAICT. We could consider changing streamed to not require serialized execution, and instead use something like a lock - the first test to produce output gets streamed, and all others get delayed until the lock is released, but could still execute concurrently. However, it's unlikely that that's the desired behavior for most users. 2. CoverageCommand Current behavior: sets --collect_code_coverage, increases default --test_timeout. bazel coverage --nocollect_code_coverage is effectively bazel test. You can actually now run bazel test --collect_code_coverage --test_timeout and it will behave exactly the same way as bazel coverage. It's mostly a convenience thing. Note that CoverageCommand inherits TestCommand, so the case above also applies. 3. MobileInstallCommand Current behavior: sets --aspects, and --output_groups. If you override the aspect or output_groups, then the command will fail or run an old binary from a previous build. Not what you'd expect, but no correctness concerns. Summary: IMO, the impact on the existing commands is minor. The advantage of this change is that it's more secure, and gives us an escape hatch if a command ever overrides options in a way that turns out to be wrong or broken in some way. RELNOTES: None. PiperOrigin-RevId: 160114902
* Correct test name in bazel_server_mode_test.pyGravatar pcloudy2017-06-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 160113701
* Internal changeGravatar Googler2017-06-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 160111047