aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
Commit message (Collapse)AuthorAge
* Restrict aspects visible to other aspects according to their advertised ↵Gravatar Dmitry Lomov2017-02-15
| | | | | | | | providers. -- PiperOrigin-RevId: 147526961 MOS_MIGRATED_REVID=147526961
* Clarify documentation of PACKAGE_NAMEGravatar Laurent Le Brun2017-02-15
| | | | | | -- PiperOrigin-RevId: 147517743 MOS_MIGRATED_REVID=147517743
* Correct support for TreeArtifacts with ObjC header thinning feature.Gravatar Googler2017-02-15
| | | | | | -- PiperOrigin-RevId: 147515806 MOS_MIGRATED_REVID=147515806
* Remove type checking requirement from AttributeMap.has.Gravatar Greg Estren2017-02-15
| | | | | | | | | | | | | | This overrides the traditional has(String name, Type<>T> type) with has(String name) and removes the type check outright from isConfigurable. Ideally we'd remove the old version in this same change. But there are enough uses of it that that's not a risk-free change and is safer as followup changes. -- PiperOrigin-RevId: 147513593 MOS_MIGRATED_REVID=147513593
* Rollback of commit 03d1255df1805ed1e5f7512bf0336f71c595791b.Gravatar Googler2017-02-15
| | | | | | | | | | *** Reason for rollback *** Vanilla roll forward -- PiperOrigin-RevId: 147512649 MOS_MIGRATED_REVID=147512649
* Avoid putting objc linkopts and copts in Set, as their order and ↵Gravatar Chris Parsons2017-02-15
| | | | | | | | | | duplicate-args need to be preserved. (Example: "-iquote foo -iquote bar" is a legitimate series of flags) -- PiperOrigin-RevId: 147512419 MOS_MIGRATED_REVID=147512419
* Some minor logging improvements related to diff awareness:Gravatar Nathan Harmata2017-02-15
| | | | | | | | | | | | (i) Log [the first 100] external [non external-repo] file paths when we encounter them in skyframe [when externalFileAction is not ASSUME_NON_EXISTENT_AND_IMMUTABLE_FOR_EXTERNAL_PATHS]. These caveats are to prevent log spam. (ii) Fix grammar when logging the results of handleDiffsWithMissingDiffInformation in the case when all package paths have known diff information and we're merely checking external/output/external-repo files. (iii) Log the purpose of each skyframe graph scan we do (see (ii)). -- PiperOrigin-RevId: 147508404 MOS_MIGRATED_REVID=147508404
* Flips the default value of --explicit_jre_deps to true.Gravatar Googler2017-02-15
| | | | | | | | RELNOTES: Flips --explicit_jre_deps flag on by default. -- PiperOrigin-RevId: 147497803 MOS_MIGRATED_REVID=147497803
* BuildFileAST.eval() doesn't execute the code when there's a static error.Gravatar Laurent Le Brun2017-02-15
| | | | | | | | | | | This has no visible effect on Bazel (eval is used just for internal expressions that don't fail), and is therefore not tested. It will be tested when we add tests to the standalone Skylark interpreter. -- PiperOrigin-RevId: 147495990 MOS_MIGRATED_REVID=147495990
* Adds --[no]use_action_cache startup option to disable the action cache.Gravatar Googler2017-02-15
| | | | | | | | | Disabling the action cache is helpful in contexts where incremental builds are not required, or where actions need to be repeatedly executed for debugging. -- PiperOrigin-RevId: 147485055 MOS_MIGRATED_REVID=147485055
* Default Bazel builds to nontrimmed dynamic configurations (except LIPO).Gravatar Greg Estren2017-02-15
| | | | | | | | | | LIPO is still not ready yet. Details: https://docs.google.com/document/d/1uoU8t7loTOu6uyzez-ilhcYgEXg4xjViJu0aqrf69TY/edit -- PiperOrigin-RevId: 147478165 MOS_MIGRATED_REVID=147478165
* Refactoring: Types report what class of labels they contain.Gravatar Michael Staib2017-02-14
| | | | | | | | | | | | | | | | | | | | | Currently label-type attributes are detected in many places across the codebase by simply reference-comparing against each of the label types. This CL aims to generalize most of these cases, moving the encoding of this logic into a single place (Type/BuildType itself). Not all of these cases can be made general without further refactoring, and some perhaps shouldn't be - serialization and Skylark rule context, for example, need to do exotic things based on the type. But most sites can avoid having to enumerate all the types they work with explicitly. This causes LABEL_DICT_UNARY to start being treated like the other label types, which means that CcToolchainSuiteRule and JavaRuntimeSuiteRule need to include a set of allowed file types (none, in their case). Skylark will continue treating it as a dictionary from String to Label in its rule context, however, to avoid visible behavior changes. -- PiperOrigin-RevId: 147471542 MOS_MIGRATED_REVID=147471542
* Make Bazel work with Visual Studio 2017 Gravatar Yun Peng2017-02-14
| | | | | | | | | | | | | | | Now Bazel can detect MSVC from Visual Studio 2017 or Visual C++ build tools 2017. Also modified build_windows_jni.sh to make it work with VS 2017. Fixed: https://github.com/bazelbuild/bazel/issues/2440 -- Change-Id: I4afbce809ff74634f32fab87efe5e7f0b3f60c95 Reviewed-on: https://cr.bazel.build/8890 PiperOrigin-RevId: 147467993 MOS_MIGRATED_REVID=147467993
* Use the test's PATH to resolve the --run_under commandGravatar Ulf Adams2017-02-14
| | | | | | | | | | | | | | | | | | | The change that originally introduced local PATH lookup was made a very long time ago, and it's unclear what the exact reasons were. This change makes the local and remote test execution code paths more consistent, which minimizes surprises. Bazel currently forwards the local PATH by default, so this should be a no-op. Ideally, we'd require PATH forwarding to be explicit, e.g., with --action_env=PATH, --test_env=PATH, or --run_under=$(which command). RELNOTES[INC]: Bazel now uses the test's PATH for commands specified as --run_under; this can affect users who explicitly set PATH to a more restrictive value than the default, which is to forward the local PATH -- PiperOrigin-RevId: 147457058 MOS_MIGRATED_REVID=147457058
* Fix the documentation of set/depsetGravatar Vladimir Moskva2017-02-14
| | | | | | -- PiperOrigin-RevId: 147456653 MOS_MIGRATED_REVID=147456653
* Reinstate idleness checks where the server self-terminates when it's idle ↵Gravatar Lukacs Berki2017-02-14
| | | | | | | | | | and there is either too much memory pressure or the workspace directory is gone. Arguably, it should kill itself when the workspace directory is gone regardless of whether it's idle or not, but let's first get us back to a known good state, then we can think about improvements. -- PiperOrigin-RevId: 147454329 MOS_MIGRATED_REVID=147454329
* Windows JNI, refactor: move OpenDirectory to JNIGravatar Laszlo Csomor2017-02-14
| | | | | | | | | | | | Move the OpenDirectory helper method into the JNI library. We'll need it there; a subsequent change will make use of it there. See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 147448792 MOS_MIGRATED_REVID=147448792
* Remove special handling of name attribute. Fixes #278Gravatar Googler2017-02-14
| | | | | | | | | | | | | | | | | | | | | | | | | The name attribute gets special treatment in the codebase, in that it's not simply yet another attribute but stored in it's own field. Thus, every callside dealing with attributes needs to be aware of this special case and explicitly handle the name attribute. It's easy to see that this can lead to bugs. For example, querying for the name attribute is currently broken due the querying code not being aware of the special case [1]. Discussions with experienced bazel developers came to the conclusion that there is no need (anymore) to treat the name attribute specially and thus we decided it's best to remove the special treatment and handle the name attribute as any other attribute. This change removes the handling of name attributes and also adds a test case to verify that bug [1] is fixed. [1] https://github.com/bazelbuild/bazel/issues/278 -- PiperOrigin-RevId: 147446345 MOS_MIGRATED_REVID=147446345
* Make android_device pass --android_sdk_path to unified launcher.Gravatar Adam Michael2017-02-14
| | | | | | | | Creates filegroup containing sdk path in Bazel embedded Android SDK repository. -- PiperOrigin-RevId: 147426838 MOS_MIGRATED_REVID=147426838
* Exposes generated manifest artifact (this is the resulting artifact after ↵Gravatar Googler2017-02-14
| | | | | | | | the merge step) to Skylark. -- PiperOrigin-RevId: 147417110 MOS_MIGRATED_REVID=147417110
* Rollback of commit 51d245879ed2729f15c6c6a35b319a4277e7cd64.Gravatar Carmi Grushko2017-02-14
| | | | | | -- PiperOrigin-RevId: 147416635 MOS_MIGRATED_REVID=147416635
* Rollback of commit e15a31a3281ae386935d33f857351adea767b420.Gravatar Liam Miller-Cushon2017-02-14
| | | | | | | | | | *** Reason for rollback *** JavaBuilder 0.1 is obsolesced unknown commit -- PiperOrigin-RevId: 147398785 MOS_MIGRATED_REVID=147398785
* Rollback of commit cdbad585187dfe7bbb4d69ad68a1baf852beb691.Gravatar Michael Staib2017-02-14
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Skylark aspects running over rules with LABEL_DICT_UNARY attributes. *** Original change description *** Refactoring: Types report what class of labels they contain. Currently label-type attributes are detected in many places across the codebase by simply reference-comparing against each of the label types. This CL aims to generalize most of these cases, moving the encoding of this logic into a single place (Type/BuildType itself). Not all of these cases can be made general without further refactoring, and some perhaps shouldn't be - serialization and Skylark rule context, for example, need to do... -- PiperOrigin-RevId: 147385072 MOS_MIGRATED_REVID=147385072
* Clarify that load() statements do not respect visibility.Gravatar Laurent Le Brun2017-02-14
| | | | | | -- PiperOrigin-RevId: 147384211 MOS_MIGRATED_REVID=147384211
* Allow objc.signing_certificate_name to return None in Skylark.Gravatar Googler2017-02-14
| | | | | | -- PiperOrigin-RevId: 147375812 MOS_MIGRATED_REVID=147375812
* Stop retrieving FdoSupport statically from hard-coded attribute ↵Gravatar Rumou Duan2017-02-14
| | | | | | | | | | ":cc_toolchain" in RuleContext, instead take the provider from users and pass it around to where it is used. This gives J2ObjcAspect the ability to specify the C++ toolchain attribute under a different name to avoid attribute conflicts with attached rules that have already declared attribute ":cc_toolchain". -- PiperOrigin-RevId: 147358325 MOS_MIGRATED_REVID=147358325
* Add an algorithm to reduce aspect paths according to aspects' visibility to ↵Gravatar Dmitry Lomov2017-02-14
| | | | | | | | | | | | each other. Aspects negotiate their visibility by advertizing and requiring providers. The algorithm is not used yet (that is future work). -- PiperOrigin-RevId: 147354682 MOS_MIGRATED_REVID=147354682
* Fix IllegalStateException when loading from a non declared external repository Gravatar Damien Martin-Guillerez2017-02-14
| | | | | | | | | | | This is another instance of #1793 that happens when a WORKSPACE file exists in some path underneath your current workspace. -- Change-Id: Idb01cd643548a170a27c9103f1b5081b058cc005 Reviewed-on: https://cr.bazel.build/8143 PiperOrigin-RevId: 147353935 MOS_MIGRATED_REVID=147353935
* Allow Skylark aspects to advertise providers.Gravatar Dmitry Lomov2017-02-14
| | | | | | -- PiperOrigin-RevId: 147350507 MOS_MIGRATED_REVID=147350507
* Add environ attribute to repository_rule Gravatar Damien Martin-Guillerez2017-02-14
| | | | | | | | | | | | | | | | | | | This environ attribute let the repository rule implementor describes on which environment variable change a repository should be refetched. RELNOTES[NEW]: environ parameter to the repository_rule function let defines a list of environment variables for which a change of value will trigger a repository refetching. Design doc: https://bazel.build/designs/2016/10/18/repository-invalidation.html [step 3 & 4] Fixes #1595. -- Change-Id: Ibc2f93e69cb08baf86107cc9a9428b7a0eba1bac Reviewed-on: https://cr.bazel.build/8139 PiperOrigin-RevId: 147345203 MOS_MIGRATED_REVID=147345203
* Rollback of commit 3bed84ff177c7cbfd0c8d315829cc9dcb35fcf70.Gravatar Dmitry Lomov2017-02-13
| | | | | | | | | | | | | | | | *** Reason for rollback *** This breaks Bazel CI: http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/556/console *** Original change description *** Make android_sdk_repository fail if api_level requested is not installed. This could have prevented https://github.com/bazelbuild/bazel/issues/2500. -- PiperOrigin-RevId: 147338519 MOS_MIGRATED_REVID=147338519
* Windows-aware path-absoluteness checks.Gravatar Laszlo Csomor2017-02-13
| | | | | | | | | Fixes: https://github.com/bazelbuild/bazel/issues/2520 Fixes one of the bugs causing https://github.com/bazelbuild/bazel/issues/2473 -- PiperOrigin-RevId: 147335357 MOS_MIGRATED_REVID=147335357
* Fix PackageProgressReceiver to not call contains on a list.Gravatar Janak Ramakrishnan2017-02-13
| | | | | | -- PiperOrigin-RevId: 147323591 MOS_MIGRATED_REVID=147323591
* gRPC improvements:Gravatar Lukacs Berki2017-02-13
| | | | | | | | | | | - Differentiate between the server terminating abruptly and it erroneously not returning an exit code. - Do not assume that the message buffer stays untouched on the last call to Read() that eventually returns false. There is a small chance that the channel will be shut down because it's idle between Read() returning false and us checking the state. Unfortunately, I haven't found a way to set the idle timeout from C++ :( -- PiperOrigin-RevId: 147321404 MOS_MIGRATED_REVID=147321404
* Add @Nullable annotations to PackageFunction#progressReceiver.Gravatar Janak Ramakrishnan2017-02-13
| | | | | | -- PiperOrigin-RevId: 147202629 MOS_MIGRATED_REVID=147202629
* Add flag to disable automatic xcodeproj generation.Gravatar Peter Schmitt2017-02-13
| | | | | | | | RELNOTES: Removed .xcodeproj automatic output from objc rules. It can still be generated by requesting it explicitly on the command line. -- PiperOrigin-RevId: 147202001 MOS_MIGRATED_REVID=147202001
* Inform progress receiver that node has been computed before any exception ↵Gravatar Janak Ramakrishnan2017-02-13
| | | | | | | | handling. -- PiperOrigin-RevId: 147185674 MOS_MIGRATED_REVID=147185674
* Rollback of commit aa1d31da27793d4c29bfa4dec12d1ae9ab20426b.Gravatar Googler2017-02-13
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** It is not certain that this won't break users, and the value-add to them is not significant. The intent is to make these changes in the crosstool. *** Original change description *** Blaze/bazel modifications to command line flags used when dead-stripping. - Passing -g to the compiler is no longer required. - Instead of detecting test rules, detect "-bundle" in the command line. - In that case, pass "-x", not "-S", to strip. - Do not inhibit dead-code stripping for tests. RELNOTES: Modifications to command line flags used for dead-stripping. -- PiperOrigin-RevId: 147185327 MOS_MIGRATED_REVID=147185327
* apple_binary produces a skylark provider depending on its binary_typeGravatar Chris Parsons2017-02-13
| | | | | | | | Also appropriately add AppleDebugOutputs provider binding -- PiperOrigin-RevId: 147184426 MOS_MIGRATED_REVID=147184426
* Make android_sdk_repository fail if api_level requested is not installed.Gravatar Adam Michael2017-02-13
| | | | | | | | This could have prevented https://github.com/bazelbuild/bazel/issues/2500. -- PiperOrigin-RevId: 147182987 MOS_MIGRATED_REVID=147182987
* Simple test for standalone Skylark binaryGravatar Laurent Le Brun2017-02-13
| | | | | | -- PiperOrigin-RevId: 147177381 MOS_MIGRATED_REVID=147177381
* Refactoring: Types report what class of labels they contain.Gravatar Michael Staib2017-02-13
| | | | | | | | | | | | | | | | | | | Currently label-type attributes are detected in many places across the codebase by simply reference-comparing against each of the label types. This CL aims to generalize most of these cases, moving the encoding of this logic into a single place (Type/BuildType itself). Not all of these cases can be made general without further refactoring, and some perhaps shouldn't be - serialization and Skylark rule context, for example, need to do exotic things based on the type. But most sites can avoid having to enumerate all the types they work with explicitly. This causes LABEL_DICT_UNARY to start being treated like the other label types, which means that CcToolchainSuiteRule and JavaRuntimeSuiteRule need to include a set of allowed file types (none, in their case). -- PiperOrigin-RevId: 147175424 MOS_MIGRATED_REVID=147175424
* Blaze/bazel modifications to command line flags used when dead-stripping.Gravatar Googler2017-02-13
| | | | | | | | | | | | | | - Passing -g to the compiler is no longer required. - Instead of detecting test rules, detect "-bundle" in the command line. - In that case, pass "-x", not "-S", to strip. - Do not inhibit dead-code stripping for tests. RELNOTES: Modifications to command line flags used for dead-stripping. -- PiperOrigin-RevId: 147171780 MOS_MIGRATED_REVID=147171780
* Install support for checking for 'one version' correctness of java_binaryGravatar Googler2017-02-10
| | | | | | | | | | | | | | | | rules: If the collection of jars for a java_binary contain more than one instance of the same class, one of them will be arbitrarily loaded at runtime. This is problematic if the instances of the class are not identical, as methods or fields from one class version might be missing in the other, leading to runtime failures when methods are missing. This change adds an experimental flag to enable one version enforcement. The actual enforcement tool will come later. -- PiperOrigin-RevId: 147166361 MOS_MIGRATED_REVID=147166361
* Switch from protobuf_clib to protobuf, and protobuf-util to protobuf_java_util.Gravatar Carmi Grushko2017-02-10
| | | | | | | | The latter are the names in the upstream protobuf repo. -- PiperOrigin-RevId: 147163206 MOS_MIGRATED_REVID=147163206
* Introduce CppCompileActionTemplate, which expands into a list of ↵Gravatar Rumou Duan2017-02-10
| | | | | | | | CppCompileActions that to be executed at execution time. -- PiperOrigin-RevId: 147163077 MOS_MIGRATED_REVID=147163077
* Apply --symlink_prefix to the output and exec root symlinks.Gravatar Luis Fernando Pino Duque2017-02-10
| | | | | | | | | | | | | | | | | | | Turns out --symlink_prefix is not applied to the bazel-{out,workspace} unlike bazel-{bin,genfiles,testlogs} thus breaking the semantics of --symlink_prefix. This CL fixes the problem by using the symlink prefix instead of the product name when building the output and exec root symlinks. The bazel-out symlink is still created for backwards compatiblity but will be removed eventually. RELNOTES[INC]: Using --symlink_prefix is now applied to the output symlink (e.g. bazel-out) and the exec root symlink (e.g. bazel-workspace). -- PiperOrigin-RevId: 147161547 MOS_MIGRATED_REVID=147161547
* Fixed java_stub_template substitution: %runfiles_manifest_only% was not ↵Gravatar Yun Peng2017-02-10
| | | | | | | | | | substituted when runfiles is enabled. This caused wrong rlocation function being defined on Linux and Mac. -- PiperOrigin-RevId: 147154028 MOS_MIGRATED_REVID=147154028
* BEP: Provide more useful data in TestResult events Gravatar Klaus Aehlig2017-02-10
| | | | | | | | | | | | | | | | | | | | | For individual test actions, more useful data can be provided than just the success status. Do so. Also, to keep each log reported only once, send a new TestAttempt event for the final test attempt, but don't have the TestResult (which contains to union of all test files) an instance of the BuildEvent. As we now report test results in a separate object, drop the test data and directly pass in the files created. In this way, we also get all the moved files reported correctly in the individual attempts. -- Change-Id: Ic04b7bad4f92a381bd4d1b4ec91f743b89f81f84 Reviewed-on: https://cr.bazel.build/8694 PiperOrigin-RevId: 147149025 MOS_MIGRATED_REVID=147149025
* Standalone Skylark binary: now accepts a file as argumentGravatar Laurent Le Brun2017-02-10
| | | | | | | | | Usage: Skylark file.sky -- PiperOrigin-RevId: 147148097 MOS_MIGRATED_REVID=147148097