aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Make SelectorList.toString() user-friendly.Gravatar gregce2017-06-01
| | | | | | | | This also guarantees consistency between toString() calls to lib.syntax.SelectorList and lib.packages.BuildType.SelectorList. PiperOrigin-RevId: 157617509
* Remote caching: don't crash for actions with no inputsGravatar Ulf Adams2017-06-01
| | | | | | | | | | | Fixes #3004. Change-Id: I6dcef92e9f23df574e0874a81b2901754042cf9a Closes #3085. Change-Id: I6dcef92e9f23df574e0874a81b2901754042cf9a PiperOrigin-RevId: 157612661
* 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
* Overwrite symlinks when un-tarringGravatar kchodorow2017-06-01
| | | | | | Fixes #2960. PiperOrigin-RevId: 157604844
* Fix aliases for users of label-keyed string dicts.Gravatar mstaib2017-06-01
| | | | | | | | | | | | | | | | | Aliases mess with the assumption that attributeValue.containsKey(target.getLabel()) for every target in the prerequisites of a LABEL_KEYED_STRING_DICT attribute. The solution is to use AliasProvider.getDependencyLabel(target) instead. This fixes it for all current users, including SkylarkRuleContext. This also adjusts config_setting flag_values and Android feature_flags to do intelligent things with aliases in their respective attributes. RELNOTES: None. PiperOrigin-RevId: 157594095
* Add a flag --allow_undefined_configs, with default value true.Gravatar Googler2017-06-01
| | | | | | | | | Setting this flag to false makes Bazel exit with an error on undefined configs. The default value is true, so this change has no impact unless users explicitly pass --noallow_undefined_configs. This change supersedes an unmerged one, I'm taking the problem from fkp@. Credit to him for the original change. PiperOrigin-RevId: 157593338
* BEP: report visibility errorsGravatar Klaus Aehlig2017-06-01
| | | | | | | | On finding a visibility error, report it directly for that target, instead of relying on the implict "abort" message for targets that have not been built. Change-Id: I5e45722a1117afca3bc8eeebd05179425b995172 PiperOrigin-RevId: 157592518
* Don't add -g0 as host copt when host platform is WindowsGravatar pcloudy2017-05-31
| | | | | RELNOTES: None PiperOrigin-RevId: 157578255
* Migrate all tests to Truth (except the ones in the examples).Gravatar lberki2017-05-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 157576492
* Also report stored posts further up in SkyframeGravatar Klaus Aehlig2017-05-31
| | | | | | | | | | As SkyFunctions are supposed to be restartable, e.g., if prerequisites are missing, events generated by them are temporarily stored. So are BuildEvents posted by them. However, once the evaluation of a SkyFunction is finalized, the stored posts need to be reposted. Do this. Change-Id: I4ce20266fbfcbb298e93eb53086fa9916874f5d8 PiperOrigin-RevId: 157575119
* testenv.sh: Use Visual Studio 2017 if it is installed, otherwise fallback to ↵Gravatar philwo2017-05-31
| | | | | | | | VS2015. This makes our Windows shell tests work on Windows systems where only VS2017 is installed. PiperOrigin-RevId: 157573095
* Do not run imported jars through ijar when --nouse_ijars is on the command line.Gravatar lberki2017-05-31
| | | | | RELNOTES: None. PiperOrigin-RevId: 157569836
* Make --aspects a repeatable flag.Gravatar dslomov2017-05-31
| | | | | RELNOTES: '--aspects' can occur more than once on the command line. PiperOrigin-RevId: 157568229
* Automated g4 rollback of commit d894345ed88f8adce600b66a310b5210d0bcb59c.Gravatar laszlocsomor2017-05-31
| | | | | | | | | | | | | *** Reason for rollback *** Breaks Bazel on FreeBSD: http://ci.bazel.io/view/Dashboard/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=freebsd-11/1542/console *** Original change description *** Use cc implementation of singlejar except on Windows. Change-Id: Ie4a2db2a6fa1ea86f4bdd42cd806f6804a0c56d4 PiperOrigin-RevId: 157567871
* fix signedness warnings in blaze_util_posix.ccGravatar Benjamin Peterson2017-05-31
| | | | | | | | | | if (result != count) { ~~~~~~~^~~~~~~~ Of course, problems arising from this are only theoretical. Change-Id: Id045a97623026e005d40940eb4a7d30d73f4ce32 PiperOrigin-RevId: 157561218
* Windows: ignore envvars with degenerate namesGravatar Laszlo Csomor2017-05-31
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/3077 Change-Id: I5f29fdec1f69bdda51fa62be695b8791a45240e9 PiperOrigin-RevId: 157559455
* Simplify the remote workerGravatar ulfjack2017-05-31
| | | | | | | | | | | | - Reduce scope of try-catch blocks - Handle non-zero exit the same as zero exit - Basic infrastructure to handle time outs, currently hard-coded to 15 mins Some of this code is copied from LocalSpawnRunner. Ideally, we'd reuse that implementation instead of writing yet another one, but that will have to wait for some more refactoring. PiperOrigin-RevId: 157506934
* Adds external J2ObjC BUILD files to Bazel's generated embedded_tools directory,Gravatar Googler2017-05-31
| | | | | | | and fixes some of J2ObjC's implicit deps to correctly reference the embedded tools. RELNOTES: Partially fixes external J2ObjC support. PiperOrigin-RevId: 157503022
* When filtering resources in analysis, also filter resource rootsGravatar Googler2017-05-31
| | | | | | | | | | | | | | | | | If all resources from a directory are filtered out, the resource processing action should not receive a reference to that directory. Filtering the entire contents of a directory is uncommon but not impossible. It may be indicative of an error (if the user filters on a language, but only provided resources in other languages - in this case, the build should and will fail during Java compilation when the requested resource does not exist) or of weird but acceptable behavior (placing resources for some default language in one resource directory and resources for all other languages in some other directory, then inheriting both directories and filtering on language) that should be correctly handled. RELNOTES: none PiperOrigin-RevId: 157499745
* Optionally skip fallback to javac-turbineGravatar cushon2017-05-31
| | | | PiperOrigin-RevId: 157494773
* Enable desugaring try-with-resources by default.Gravatar cnsun2017-05-31
| | | | | RELNOTES: none PiperOrigin-RevId: 157490771
* Small optimization to avoid allocating strings in the bind mount loop.Gravatar Googler2017-05-31
| | | | PiperOrigin-RevId: 157479936
* Use cc implementation of singlejar except on Windows.Gravatar Xin Gao2017-05-31
| | | | | Change-Id: Ie4a2db2a6fa1ea86f4bdd42cd806f6804a0c56d4 PiperOrigin-RevId: 157473007
* Remote tests should not depend on lib:runtimeGravatar buchgr2017-05-31
| | | | | | | | Move AuthAndTLSOptions to its own package, so that tests/remote no longer depends on lib:runtime. RELNOTES: None. PiperOrigin-RevId: 157469629
* Fix clean command to not use boolean optionsGravatar Googler2017-05-31
| | | | | | | Using boolean options with expansions on them meant they were still used if in the --no(flag) case. RELNOTES: Clean command no longer uses boolean values for --async, --expunge, and --expunge_async options. PiperOrigin-RevId: 157465859
* Migrate most of the assertions to Truth that the auto-migration tool did not ↵Gravatar lberki2017-05-31
| | | | | | | | | catch. IntelliJ's "replace structurally" command was surprisingly useful. RELNOTES: None. PiperOrigin-RevId: 157463734
* Add FeatureSpecification.Gravatar hlopko2017-05-30
| | | | | RELNOTES: None. PiperOrigin-RevId: 157450873
* Make Bazel build without --cpu=x64_windows_msvcGravatar Yun Peng2017-05-30
| | | | | | | | | | | | | | | | After this change, with a Bazel having MSVC as default toolchain, the command to build a MSVC Bazel on Windows is simply: bazel build //src:bazel although bazel build --cpu=x64_windows_msvc //src:bazel is still supported. And the command to build a MSYS Bazel on Windows is: bazel build --cpu=x64_windows_msys //src:bazel Also made //src/test/cpp:blaze_util_test pass without --cpu=x64_windows_msvc Change-Id: Iaf37513c778768d06fb5700442d5229a5f348964 PiperOrigin-RevId: 157446905
* Migrate Java tests to Truth.Gravatar lberki2017-05-30
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157446717
* BEP: Correctly report test exit code.Gravatar buchgr2017-05-30
| | | | | | | | | | | | | When a test failure occurred the BEP would still report a build_finished event with exit code SUCCESS, even though bazel's exit code was TESTS_FAILED. This is because we would rely on the exit code reported by the BuildCompleteEvent. However, this exit code contains only the build status without taking into account the test status. In this change we introduce the TestingCompleteEvent that reports bazel's final exit code in case of "bazel test". RELNOTES: None. PiperOrigin-RevId: 157445808
* BES: Capture stdout/stderr.Gravatar buchgr2017-05-30
| | | | | | | | The BEP protocol currently does not include stdout/stderr when sent over BES. This change makes the BuildEventStreamer created by the BuildEventServiceModule listen in on stdout/stderr. RELNOTES: None. PiperOrigin-RevId: 157439952
* RemoteSpawnStrategy: don't round-trip through StringGravatar ulfjack2017-05-30
| | | | | | Instead, print the downloaded bytes directly to stdout / stderr. PiperOrigin-RevId: 157435933
* Change ProtobufSupport to use CrosstoolCompilationSupport if ↵Gravatar Googler2017-05-30
| | | | | | experimental_objc_crosstool=all PiperOrigin-RevId: 157421008
* java_stub_template: create classpath jar if neededGravatar László Csomor2017-05-30
| | | | | | | | | | | | | | Create a jar with a classpath in it if the classpath is too long. We have already been using this trick on Windows but need it on Linux/Darwin too, because OpenJDK and ZuluJDK don't support parameter file syntax. Fixes https://github.com/bazelbuild/bazel/issues/3069 Change-Id: I57c981ba798dd687118feb98ccf7f61b38b03ff4 PiperOrigin-RevId: 157403379
* Remote worker: skip non-existent files after action executionGravatar ulfjack2017-05-30
| | | | | | | | | | | | | | | | | Tests basically always finish with non-existent files, and this is not an error on the server side. Instead, the client (Bazel) checks whether all the files it expects are present. The test didn't catch this because it was silently falling back to local execution. Non-existent files were leading to an IOException, which caused the remote worker to log nothing, and silently return an error with no output. Log errors in the remote worker to make future debugging easier. Fixes #2887. PiperOrigin-RevId: 157400131
* experimental UI: don't double track pending transportsGravatar Klaus Aehlig2017-05-29
| | | | | | | | | | As the state tracker keeps track of which transports we still have to wait for, make the event handler just ask the state tracker. In this way, we also handle gracefully if the closing of a transport is reported more than once. Change-Id: I0e1959d827268319ec00541994314c9325ef2307 PiperOrigin-RevId: 157395608
* Mark //s/t/s/integration:skylark_flag_test manualGravatar László Csomor2017-05-29
| | | | | | | | | This should fix Bazel CI / bazel-tests. See https://github.com/bazelbuild/bazel/issues/3072 Change-Id: I6fe2247d99d11e4e544c4066c132a251652bd2ce PiperOrigin-RevId: 157386938
* Experimental UI: Support multiple BuildEventTransportAnnouncedEventsGravatar buchgr2017-05-29
| | | | | | | | We initially didn't consider that multiple BuildEventStreamer instances might exist during a build. RELNOTES: None. PiperOrigin-RevId: 157385069
* BEP: also report make variablesGravatar Klaus Aehlig2017-05-29
| | | | | | | | | An important part of a configuration are the "make variables", containing values such as TARGET_CPU. Report them as part of the description of the configuration. Change-Id: Id918cc340acac87cf95cc66581345f8060cb4877 PiperOrigin-RevId: 157378950
* Migrate tests to Truth.Gravatar lberki2017-05-29
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157378037
* Migrate tests to Truth.Gravatar lberki2017-05-29
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157374805
* Keep "srcs", "hdrs" and "textual_hdrs" separate.Gravatar Googler2017-05-29
| | | | | | | | | | Each can has slightly different semantics for the IDE, and it is better to use the information on which files belong to which group from BUILD file rather than use heuristics like file extension to determine it. The contents of "textual_hdrs" are added by the prefetcher. RELNOTES: None. PiperOrigin-RevId: 157256048
* Delete ios_framework native rule.Gravatar cparsons2017-05-29
| | | | | RELNOTES: 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. PiperOrigin-RevId: 157246539
* Propagate objc_library SDK Frameworks through cc_library edgesGravatar cparsons2017-05-29
| | | | | RELNOTES: None. PiperOrigin-RevId: 157235505
* Make workspace cycle reporting a little more flexibleGravatar kchodorow2017-05-29
| | | | | | Fixes #2999. PiperOrigin-RevId: 157222957
* For objc rules, generated headers are mandatory inputs to CppCompileAction.Gravatar cpeyser2017-05-26
| | | | PiperOrigin-RevId: 157218175
* BEP: report more test-result files and add a constants classGravatar aehlig2017-05-26
| | | | | | | | | | | In a test result, report more standard files, if present. Also, add a class with the constants used to name those files. Note that we have to identify files generated by a test with strings rather than an enum, as we want to support extensions of bazel to add their own files reported by tests. RELNOTES: None. PiperOrigin-RevId: 157204042
* Use FeatureConfiguration to compute value of CC_FLAGS make variableGravatar hlopko2017-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | This cl introduces new action_config type for Crosstool named 'generic'. This can be used to set the value of CC_FLAGS make variable using much more expressive mechanism (action_configs + features) than previous make_variable Crosstool messages. This has been requested by the C++ LPT. However, as FeatureConfiguration needs RuleContext, CC_FLAGS cannot be computed using configuration only anymore. Also, FeatureConfiguration is C++ rules specific class, and Bazel build-base cannot depend on it. Therefore we cannot use FeatureConfiguration for ExtraActions, for example. Because it cannot be made perfect, this cl is not updating all the possible places that expand make variables but limits the scope to: * genrule (the only widely used rule that often expands make variables) * *_test (CC_FLAGS is used by Tensorflow in the 'args' attribute) * cc_rules (people sometimes set 'copts' to something like: "-DCC_STRING=\\\"$(CC)\\\" -DCC_FLAGS_STRING=\"$(CC_FLAGS)\"" The long term plan is to use Skylark C++ API to get C++ command lines, so CC_FLAGS together with this inconsistent solution will be removed. RELNOTES: CC_FLAGS can be defined using 'generic' action_config in CROSSTOOL PiperOrigin-RevId: 157202883
* Use the correct extension_safe copt for extension_safe attributeGravatar cparsons2017-05-26
| | | | | | | The previous copt was in error, and was not caught due to only causing warnings to be omitted. Tests are now updated to throw an error in such cases of warning. RELNOTES: None. PiperOrigin-RevId: 157150798
* Make platform providers creatable from Skylark.Gravatar John Cater2017-05-26
| | | | | | | This will allow custom rules to interact more fully with the platform system. Change-Id: I22dd2efab55b1c6e6129b1ba99fb5f0aa9c2d6b2 PiperOrigin-RevId: 157145828