aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools
Commit message (Collapse)AuthorAge
* Roll forward execroot changeGravatar Kristina Chodorow2017-02-16
| | | | | | | | | | | | | | | | | RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. Custom crosstools that hardcode external/<repo> paths will have to be updated. Issue #1262. -- PiperOrigin-RevId: 147726370 MOS_MIGRATED_REVID=147726370
* Rollback of commit 686fde1b1aeb4e5d03dca7446cf39cd9f1114d79.Gravatar Dmitry Lomov2017-02-16
| | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks //src/test/shell/bazel:bazel_sandboxing_cpp_test on all platforms: http://ci.bazel.io/job/bazel-tests/567/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/ *** Original change description *** Disable .d input pruning My fix for input discovery is pending some changes by kchodorow, and this is blocking the next release. Temporary workaround for #2490. -- PiperOrigin-RevId: 147725685 MOS_MIGRATED_REVID=147725685
* Skip computing digests when --use_action_cache=false.Gravatar Googler2017-02-16
| | | | | | | | | | | | | Does this by delegating responsibility for constructing ActionCache.Entry instances to the ActionCache, and having the StubActionCache return null. Tests show a 1-2% elapsed-time reduction for clean builds: [] Doesn't use interface default methods, because we still need JDK7 for Mac. -- PiperOrigin-RevId: 147722062 MOS_MIGRATED_REVID=147722062
* Remove an unused throws clause, and make one more specificGravatar Ulf Adams2017-02-16
| | | | | | -- PiperOrigin-RevId: 147716435 MOS_MIGRATED_REVID=147716435
* Clarify that package() comes after load()Gravatar Laurent Le Brun2017-02-16
| | | | | | -- PiperOrigin-RevId: 147714630 MOS_MIGRATED_REVID=147714630
* Activate the "dbg", "fastbuild", and "opt" features in the objc CROSSTOOL.Gravatar Googler2017-02-16
| | | | | | | | RELNOTES: Activate the "dbg", "fastbuild", and "opt" features in the objc CROSSTOOL. -- PiperOrigin-RevId: 147714395 MOS_MIGRATED_REVID=147714395
* Minor code cleanupGravatar Laurent Le Brun2017-02-16
| | | | | | | | Inlining the function makes the code more readable. -- PiperOrigin-RevId: 147711468 MOS_MIGRATED_REVID=147711468
* Disallow comparison of objects of different types in SkylarkGravatar Vladimir Moskva2017-02-16
| | | | | | | | | | RELNOTES[INC]: It's not allowed anymore to compare objects of different types (i.e. a string to an integer) and objects for which comparison rules are not defined (i.e. a dict to another dict) using order operators. -- PiperOrigin-RevId: 147710942 MOS_MIGRATED_REVID=147710942
* Ensure test results are also reported for cached test Gravatar Klaus Aehlig2017-02-16
| | | | | | | | | | | When a test is not run, because it was cached, we still expect the test to be reported and to find a test log reported in the build-event protocol. -- Change-Id: I806c757cdf8f46a5b687d29dec31ad4a289c4097 Reviewed-on: https://cr.bazel.build/8931 PiperOrigin-RevId: 147710591 MOS_MIGRATED_REVID=147710591
* Disable .d input pruningGravatar Ulf Adams2017-02-16
| | | | | | | | | | | My fix for input discovery is pending some changes by kchodorow, and this is blocking the next release. Temporary workaround for #2490. -- PiperOrigin-RevId: 147707001 MOS_MIGRATED_REVID=147707001
* Don't prefix the -l option with -force_load. It doesn't work and whole ↵Gravatar Lukacs Berki2017-02-16
| | | | | | | | | | archive linking of dynamic libraries doesn't make sense anyway. Fixes #2526 . -- PiperOrigin-RevId: 147693898 MOS_MIGRATED_REVID=147693898
* Make RuleClass non-final for testing.Gravatar Janak Ramakrishnan2017-02-16
| | | | | | -- PiperOrigin-RevId: 147656856 MOS_MIGRATED_REVID=147656856
* Fix a hypothetical issue with 'buildfiles' and 'loadfiles' with duplicate ↵Gravatar Nathan Harmata2017-02-16
| | | | | | | | | | | | | | | | | | targets. These two functions don't use a Uniquifier internally so if the same bzl file foo.bzl is loaded multiple ways in 'e' in 'loadfiles(e)' then 'f' in 'f(loadfiles(e))' will observe foo.bzl multiple times. This isn't observable in practice (i.e. I cannot write a black-box query test that would fail without this CL) because: (1) BlazeQueryEnvironment#eval(QueryExpression, VariableContext<Target>, Callback<Target>) uses an intermediate aggregating callback and thus doesn't use the streaming query evaluation model. This means that the internal deduping in BlazeQueryEnvironment#getBuildFiles is sufficient. (2) SkyQueryEnvironment uses an outer BatchStreamedCallback which internally uses a Uniquifier. Still, this CL is useful for SkyQuery because without we're doing wasted work (e.g. in my example above, 'f' will wastefully do duplicate work with the .bzl files from the inner loadfiles(e)) because the deduping happens on the final query result, not on the intermediate result from 'buildfiles'/'loadfiles'. For 'buildfiles', there's an additional wart with (1) above because FakeSubincludeTarget doesn't override Object#equals/hashCode. -- PiperOrigin-RevId: 147656183 MOS_MIGRATED_REVID=147656183
* Give a more helpful error message on malformed regexes.Gravatar Nathan Harmata2017-02-16
| | | | | | -- PiperOrigin-RevId: 147621296 MOS_MIGRATED_REVID=147621296
* Add dependency on environment variable for android_{n,s}dk_repository Gravatar Damien Martin-Guillerez2017-02-15
| | | | | | | | | | | | | This adds the skyframe edge to invalidate the repository every time the enviroment variable change. Fixes #746. -- Change-Id: I0653bc759dbddb1a98f5e03d0eb3f92e1803e31b Reviewed-on: https://cr.bazel.build/8224 PiperOrigin-RevId: 147600103 MOS_MIGRATED_REVID=147600103
* Generate documentation for bool and int types.Gravatar Laurent Le Brun2017-02-15
| | | | | | | | | This improves consistency in the documentation (string and list already have their own page). -- PiperOrigin-RevId: 147599068 MOS_MIGRATED_REVID=147599068
* Windows: use JNI CreateJunction in Java code Gravatar Laszlo Csomor2017-02-15
| | | | | | | | | | | | | | | | Use the new CreateJunction in the Windows JNI code every time we need to create junctions. This means updating WindowsFileOperations and related tests. Add test for WindowsFileSystem.createSymbolicLink. See https://github.com/bazelbuild/bazel/issues/2238 -- Change-Id: I5827e2e70e8e147f5f102fabf95fa9a148b3bcdc Reviewed-on: https://cr.bazel.build/8896 PiperOrigin-RevId: 147598107 MOS_MIGRATED_REVID=147598107
* Remove special-casing of the 'native' module.Gravatar Laurent Le Brun2017-02-15
| | | | | | | | | It should show up in the documentation in the same way as 'attr', another builtin module. -- PiperOrigin-RevId: 147589912 MOS_MIGRATED_REVID=147589912
* Fix a bug in parsing .afdo.imports files whereupon Blaze would crash if a ↵Gravatar Lukacs Berki2017-02-15
| | | | | | | | line in that file wasn't empty but also didn't contain a colon. -- PiperOrigin-RevId: 147589431 MOS_MIGRATED_REVID=147589431
* Early support for code generation directly from C++ module files. This canGravatar Googler2017-02-15
| | | | | | | | | | | | potentially reduce the linker input. The content of a C++ module (specifically the inline definitions) is currently put into every single .o file that uses them and thus can be input to the same final link many times. By generating a separate .o file for the module itself, we can avoid this unnecessary duplication of linker input. -- PiperOrigin-RevId: 147579947 MOS_MIGRATED_REVID=147579947
* Skylark repositories: add FileValue hash codes to the marker file Gravatar Damien Martin-Guillerez2017-02-15
| | | | | | | | | | | | | | So that change to those files are seen and cause a refetch. Design doc: https://bazel.build/designs/2016/10/18/repository-invalidation.html [step 5] Fixes #1022. -- Change-Id: Ic75f2c9c59a4c91ff3e937ca21b37e74332c03ec Reviewed-on: https://cr.bazel.build/8218 PiperOrigin-RevId: 147574856 MOS_MIGRATED_REVID=147574856
* Loosen visibility of ASTFileLookupValue.Gravatar Janak Ramakrishnan2017-02-15
| | | | | | -- PiperOrigin-RevId: 147559691 MOS_MIGRATED_REVID=147559691
* CrosstoolCompilationSupport can be used for multi-arch binaries by allowing ↵Gravatar Cal Peyser2017-02-15
| | | | | | | | | | | | | | | | | a configuration to be passed into the cc backend and used to scope output artifacts. Artifacts involved: (1) Object files: see change in CppHelper, CppModel, CppCompileActionBuilder (2) Archive files: see change in CppModel (3) Archive objfile list: see change in ObjcVariablesExtension. Other little things that needed to be cleaned up to enable this: (1) neverlink set on objc archive actions. Without neverlink, colliding solib artifacts are generated from the two archives arising from the multi-arch split. (2) Toolchain selection in CrosstoolCompilationSupport uses passed-in configuration instead of :cc_toolchain attribute. This allows for each of the compiles spawned from apple_binary.srcs to select the correct toolchain based on the child configuration. -- PiperOrigin-RevId: 147550618 MOS_MIGRATED_REVID=147550618
* 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
* 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
* 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