aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis
Commit message (Collapse)AuthorAge
* For --aspects parameter, ignore top-level targets that are not rules.Gravatar Dmitry Lomov2016-06-29
| | | | | -- MOS_MIGRATED_REVID=126161513
* Reorganize Skylark Reference documentation.Gravatar Dmitry Lomov2016-06-29
| | | | | -- MOS_MIGRATED_REVID=126081020
* Polish the command-line reference.Gravatar Ulf Adams2016-06-27
| | | | | | | | | | | - change options to print --foo=value - allow option to specify what "value" should be - update the documentation for the startup options - add some indentation to the descriptions - add some spacing between flag texts -- MOS_MIGRATED_REVID=125960618
* Provide clearer messaging when a build fails because a rule'sGravatar Greg Estren2016-06-27
| | | | | | | | | | | | | | | | | | supported environments get refined away by incompatible select paths. This is a fix of TODO: https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/analysis/constraints/ConstraintSemantics.java#L597 Old message: ERROR: /workspace/foo/BUILD:3:1: in cc_binary rule //foo:main: all environments have been refined out of the following groups: //buildenv:environment_group New message: ERROR: /workspace/foo/BUILD:3:1: in cc_binary rule //foo:main: the current command-line flags disqualify all supported environments because of incompatible select() paths: environment: //buildenv:gce removed by: //util/lib:some_dep_with_select (/workspace/util/lib/BUILD:12:1) -- MOS_MIGRATED_REVID=125788804
* --Gravatar Carmi Grushko2016-06-24
| | | | MOS_MIGRATED_REVID=125712280
* Description redacted.Gravatar Lukacs Berki2016-06-23
| | | | | -- MOS_MIGRATED_REVID=125652898
* Simplify RuleClassProvider; it kept two identical lists for no purpose.Gravatar Ulf Adams2016-06-23
| | | | | | | | Also update HelpCommand to output the configuration options in the hmtl output. -- MOS_MIGRATED_REVID=125570665
* Filegroups can optionally export sources from a given output group.Gravatar Cal Peyser2016-06-23
| | | | | -- MOS_MIGRATED_REVID=125562946
* Disable runfiles on Windows.Gravatar Dmitry Lomov2016-06-21
| | | | | | | | | | | | This adds a new configuration option that allows disabling the creation of symlink forest for runfiles. On Windows, symlink forest is disabled by default; only the runfiles manifest is created. For shell tests, a function 'rlocation' is provided that converts from runfiles location to a real location. Work towards #1212. -- MOS_MIGRATED_REVID=125439553
* Optimize an assertion which was showing up in profiles. (Even better might beGravatar Googler2016-06-21
| | | | | | | | to remove the call from RuleConfiguredTarget.getProvider() and instead check the types when the providers ImmutableMap is built.) -- MOS_MIGRATED_REVID=125389561
* Simplify the logic of determining output groups.Gravatar Alex Humesky2016-06-21
| | | | | -- MOS_MIGRATED_REVID=125368119
* Make skylark repository rules accept basic rule attributesGravatar Kristina Chodorow2016-06-21
| | | | | | | Fixes #1314. -- MOS_MIGRATED_REVID=125340361
* Trim configurations requested for a target in BuildViewTestCase.Gravatar Greg Estren2016-06-20
| | | | | -- MOS_MIGRATED_REVID=125171507
* Rollback of commit bdfd58a8ca2ed5735d6aaa5b238fb0f689515724.Gravatar Laurent Le Brun2016-06-20
| | | | | -- MOS_MIGRATED_REVID=125160288
* Remove BuildConfiguration.addRoots() and the pregrepped includes directory.Gravatar Lukacs Berki2016-06-17
| | | | | | | This is to simplify the contract of BuildConfiguration.Fragment, thus making it simpler to create BuildConfigurations without unnecessary fragments and eventually create configuration fragments from Skylark. -- MOS_MIGRATED_REVID=125137625
* Make the execution root match the runfiles tree structure for external ↵Gravatar Kristina Chodorow2016-06-17
| | | | | | | | | | | | | | | | | | | | | repositories One interesting side effect of how this is implemented is that for external repositories, bin/ and genfiles/ are combined. External repo output is under bazel-out/local-fastbuild/repo_name for each repo. Fixes #1262. 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. -- MOS_MIGRATED_REVID=125095799
* Support for platform_type="watchos" on apple_binary.Gravatar Chris Parsons2016-06-16
| | | | | | | | | This builds all dependencies linked against watch SDKs instead of iOS SDKs, and builds for the architectures specified in --watchos_multi_cpus RELNOTES: apple_binary supports a new platform_type attribute, which, if set to "watchos", will build dependencies for Apple's watchOS2. -- MOS_MIGRATED_REVID=124980029
* Remove BuildConfiguration.Fragment#declareSkyframeDependencies().Gravatar Lukacs Berki2016-06-15
| | | | | | | It was not used (IIRC the last user was FdoSupport while it lived inside CppConfiguration) -- MOS_MIGRATED_REVID=124938836
* 1. Create the TreeArtifact directory structure before expanding ActionTemplates.Gravatar Rumou Duan2016-06-14
| | | | | | | | 2. In PopulateTreeArtifactAction, create the parent directories for TreeFileArtifacts before executing the spawn. 3. Allow empty tree artifacts in CustomCommandLine and PopulateTreeArtifact. -- MOS_MIGRATED_REVID=124759286
* Add --[no]instrument_test_targets option to BlazeGravatar Googler2016-06-14
| | | | | | | | | | | | | | | When true (the default), test rules included by --instrumentation_filter are instrumented. When false, test rules are excluded from instrumentation (whether or not their names would be matched by --instrumentation_filter). This option provides a superior way to exclude test rules from instrumentation, compared to setting --instrumentation_filter exclusions based on test rule naming conventions. Naming conventions vary from language to language and are not always followed. Blaze already has enforced semantics for test targets (test rule build function names _must_ end in "_test", see TargetUtils.isTestRule). In general, when either option is available, it's better to rely on enforced semantics than unenforced conventions. Note that this default preserves present behavior. In the future, I think it would make sense to: * Change the default value of --instrument_test_targets to false. * Change the default value of --instrumentation_filter to an empty string (match everything). RELNOTES: Add --instrument_test_targets option. -- MOS_MIGRATED_REVID=124732226
* Remove ConfigurationsCreatedEvent.Gravatar Lukacs Berki2016-06-13
| | | | | | | We'll (hopefully) soon have multiple target and host configurations and we won't be able to say what they are at the beginning of the build. -- MOS_MIGRATED_REVID=124701606
* Turn --legacy_external_runfiles back on by defaultGravatar Damien Martin-Guillerez2016-06-09
| | | | | | | | | | | | --nolegacy_external_runfiles breaks $(location @repo//) syntax for the runfiles case. This will be fixed when the structure of external repository in the execroot will be the same as in the runfiles tree so let flip that flag back on. Fixes #1356. RELNOTES: Revert of commit bd69849378112c3b05bc218e57cdafca82860710, legacy runfiles tree paths are still supported by default. -- MOS_MIGRATED_REVID=124445792
* Remove a reference to targetConfiguration from BuildProgressPublisher in ↵Gravatar Lukacs Berki2016-06-09
| | | | | | | preparation for there not being a unique target configuration. -- MOS_MIGRATED_REVID=124439969
* Dynamic configurations: trim top-level targets, too.Gravatar Greg Estren2016-06-02
| | | | | | | | | | | | | | | | | | | | | | | Right now, configuration trimming happens in ConfiguredTargetFunction.computeDependencies. This means only the deps of other targets get trimmed. With this change, every ConfiguredTarget gets its configuration accurately trimmed, regardless of where it comes from or what it's used for. In practice, there could still be other code paths that instantiate ConfiguredTargetValue.key without pre-trimming. We'll have to tackle those as we hit them. Also cleaned up some symbol naming in BuildView.update to try to make the logic flow clearer. TESTED: BuildViewTest#testNewActionsAreDifferentAndDontConflict now passes with dynamic configs (among others) -- MOS_MIGRATED_REVID=123807892
* In AnalysisUtils.getProviders, construct the result in place.Gravatar Carmi Grushko2016-05-31
| | | | | | | (this is less wasteful) -- MOS_MIGRATED_REVID=123597016
* By default, don't create the .runfiles/workspace/external/repo dirsGravatar Kristina Chodorow2016-05-27
| | | | | | | | | | | | RELNOTES[INC]: External runfiles will now be accessible only via their .runfiles/repo/path/to/target path, not .runfiles/workspace-name/external/repo/path/to/target. If code still needs to use the legacy path, it can set --legacy_external_runfiles temporarily, but should transition to using the default location as it is more portable (see https://groups.google.com/d/msg/bazel-discuss/_Xo14sf7fHw/g7wdatTGBgAJ for details). The --legacy_external_runfiles option will be removed for the next release. -- MOS_MIGRATED_REVID=123217489
* Enable interleaved loading & analysis by default.Gravatar Ulf Adams2016-05-25
| | | | | | | | | Fix a bunch of tests to assume interleaving instead of disrete phases. In our testing, this improves loading+analysis times by ~30%. -- MOS_MIGRATED_REVID=123203752
* Introducing PopulateTreeArtifactAction, an Action that populates a ↵Gravatar Rumou Duan2016-05-25
| | | | | | | | | | | TreeArtifact with the content of an archive file at execution time by: 1. Reads the archive manifest file on disk. 2. Executes a spawn that expands the archive manifest entries of the archive file into/under the TreeArtifact. 3. Registers the manifest file entries as TreeFileArtifacts of the TreeArtifact. -- MOS_MIGRATED_REVID=123107850
* Allow use of Exceptions to exit early out of configured-target creation, ↵Gravatar Chris Parsons2016-05-24
| | | | | | | | | | instead of passing and checking null in all helpers. Demonstrates this pattern usage in a few select rules (e.g. AndroidBinary) where this was particularly egregious. There are many places which can benefit from this pattern -- this change doesn't try to fix them all at once. -- MOS_MIGRATED_REVID=123012378
* Replace the occurrences of Constants.PRODUCT_NAME for a call toGravatar Luis Fernando Pino Duque2016-05-23
| | | | | | | | | BlazeRuntime#getProductName() or a reference to TestConstants.PRODUCT_NAME for tests. This CL prepares the codebase in order to delete the constant. -- MOS_MIGRATED_REVID=122993568
* When BuildOptions.get(Class<T> optionsClass) fails, include whichGravatar Greg Estren2016-05-23
| | | | | | | | | fragment was requested in the NullPointerException message. This helps diagnose dynamic configuration errors. -- MOS_MIGRATED_REVID=122855814
* Update Bazel native rule documentation to use new ${link} syntax.Gravatar David Chen2016-05-20
| | | | | -- MOS_MIGRATED_REVID=122772973
* Make ide_build_info work again with targets that have configurable attributes.Gravatar Lukacs Berki2016-05-19
| | | | | | | This fixed some fallout from commit 7894c18dbaf237a1c02d76beabe6ca54faf5039a. I also audited all the sites that change introduced ImmutableMap.Builder at. -- MOS_MIGRATED_REVID=122738945
* CommandLine: Add support for tree artifact expansions.Gravatar Rumou Duan2016-05-19
| | | | | | | ParameterFileWriteAction: Add support to write out CommandLine with tree artifact expansions. -- MOS_MIGRATED_REVID=122734422
* Take aliases into consideration when creating a LabelAndConfiguration from a ↵Gravatar Lukacs Berki2016-05-19
| | | | | | | ConfiguredTarget. -- MOS_MIGRATED_REVID=122729392
* Add an overview comment about how the analysis phase works and some pointers ↵Gravatar Lukacs Berki2016-05-19
| | | | | | | to it. -- MOS_MIGRATED_REVID=122718503
* Always restrict aspects to only access requested configuration fragments.Gravatar Michael Staib2016-05-19
| | | | | | | | | | | This completes the introduction of aspect configuration fragment enforcement for static configuration builds; as of this change, it is no longer possible to fall back to the base rule's set of requested configuration fragments. This sort of fallback may become possible later, likely in a more controlled way. -- MOS_MIGRATED_REVID=122638152
* Fix wrong method accessor in "this dep isGravatar Greg Estren2016-05-13
| | | | | | | allowed but with a warning" messages. -- MOS_MIGRATED_REVID=122194162
* Introducing SpawnActionTemplate, a stub action for TreeArtifacts at analysis ↵Gravatar Rumou Duan2016-05-12
| | | | | | | time that can expand into a list of SpawnActions operating on associated TreeFileArtifacts inside TreeArtifacts at execution time. -- MOS_MIGRATED_REVID=122056131
* Dynamic configurations: have HostTransition just clone theGravatar Greg Estren2016-05-11
| | | | | | | | | | | | | | | original options if they're already from the host. This fixes an obscure incompatibility between Bazel's flag invocation policy infrastructure and multiple host configurations. In short, when multiple host configurations are possible, policy settings may not get consistently applied. Bazel invocation policies: https://github.com/bazelbuild/bazel/blo[]d24e2b69789ea54762ab034fdafc205cdcecea5/src/main/protobuf/invocation_policy.proto -- MOS_MIGRATED_REVID=122014371
* Add support for custom "no match" errors in select()s.Gravatar Greg Estren2016-05-11
| | | | | | | | | | | | | | | | | | | | From: https://github.com/bazelbuild/bazel/issues/1225 Example: cc_binary( name = "hello_custom_no_match_error", srcs = select( { "//conditions:a": ["not_chosen.cc"] }, no_match_error = "You always have to choose condition a!" ) ) Fixes #1225 -- MOS_MIGRATED_REVID=121978888
* Remove LABEL_LIST_DICT type. This was only used for abi_deps,Gravatar Greg Estren2016-05-11
| | | | | | | which was removed in c231574. -- MOS_MIGRATED_REVID=121974686
* Add an "alias" rule.Gravatar Lukacs Berki2016-05-10
| | | | | | | This will be used to replace RedirectChaser so that we don't need to load packages during configuration creation anymore. -- MOS_MIGRATED_REVID=121935989
* Expose parameterized aspects to Skylark.Gravatar Googler2016-05-09
| | | | | | | | | | | | | | | There are no syntactic changes within Skylark; the only difference is that aspects may have non-implicit attributes, so long as they have type 'string' and use the 'values' restriction. Such aspects may only be requested by rules which have attributes with types and names matching the non-implicit, non-defaulted attributes of the aspect. This is not yet a complete match for native AspectParameters functionality since implicit attributes cannot yet be affected by attribute values, but that will be added later. Implicit aspects are still required to have default values. Non-implicit aspect attributes are considered "required" unless they have a default value. An error will occur if they are applied to a rule that does not "cover" all required attributes by having attributes of matching name and type. While non-implicit aspect attributes with a default are not required, they will still take on the value of a rule attribute with the same name and type if it is present. Aspects with non-implicit, non-defaulted ("required") attributes cannot be requested on the command line, only by a rule. RELNOTES: Expose parameterized aspects to Skylark. -- MOS_MIGRATED_REVID=121711715
* Remove abi and abi_deps attributes.Gravatar Greg Estren2016-05-09
| | | | | | | | | select() is the new abi_deps. RELNOTES[INC]: Removed cc_* attributes: abi / abi_deps. Use select() instead. -- MOS_MIGRATED_REVID=121704422
* Add attribute validation of mandatory native providersGravatar Liam Miller-Cushon2016-05-03
| | | | | | | and use it to validate that :java_toolchain has a JavaToolchainProvider. -- MOS_MIGRATED_REVID=121396726
* Introduces a registry of native providers to the BuildConfiguration, which ↵Gravatar Cal Peyser2016-05-03
| | | | | | | can be added to by fragments. Uses the registry to enable native access to TranstiveProviderInstances from Skylark. In particular, makes ObjcProvider accessible to skylark rule implementations. -- MOS_MIGRATED_REVID=121390911
* Make compatible_with / restricted_to nonconfigurable.Gravatar Greg Estren2016-05-03
| | | | | | | | | | | | | | | | As of 18c277f, we have special logic for mixing selects and constraints. With that logic, a multiplaform libray declares all environments it supports across all select paths, then each path supports some subset of those environments. With this approach, there's no need for compatible_with = select(). So we'd like to disallow that pattern (and all its downsides) in preference for what 18c277f allows. -- MOS_MIGRATED_REVID=121294433
* Use ConstraintSemantics.getSupportedEnvironments() in ↵Gravatar Liam Miller-Cushon2016-05-02
| | | | | | | supportsJava7TargetEnvironment -- MOS_MIGRATED_REVID=121150741
* In apple_binary, propagate cc_library dependencies for all child ↵Gravatar Chris Parsons2016-05-02
| | | | | | | configurations of the split transition -- MOS_MIGRATED_REVID=121146341