aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis
Commit message (Collapse)AuthorAge
* Expose RuleContext methods in ActionConstructionContextGravatar asteinb2018-05-17
| | | | | | | | | | | | | - Common methods for creating artifacts - Convenience method for registering action Also, create a new getUniqueDirectoryArtifact method that doesn't require a root directory to be passed in - every call I've seen to getUniqueDirectoryArtifact always uses RuleContext#getBinOrGenfilesDirectory ffor this value. RELNOTES: none PiperOrigin-RevId: 196993195
* Rename CommandAction.getEnvironment, add AbstractAction.getEnvironmentGravatar ulfjack2018-05-17
| | | | | | | | | | | | | | | This is a cleanup to clarify the code. 1. The getEnvironment method in the CommandAction interface does not have access to the clientEnv, so it's return value is necessarily incomplete. Rename to getIncompleteEnvironmentForTesting. 2. Add a final getEnvironment method to AbstractAction, which returns the ActionEnvironment, which is intended to be a complete description of the intended final environment of the action (technically, of any spawn running within the action). This is not currently used, but is provided to prevent action subclasses to add such a method (it may be used in the future). PiperOrigin-RevId: 196991091
* Fix Cpp{Compile,Link}Action environment and cache key computationGravatar ulfjack2018-05-17
| | | | | | | | | | These were previously ignoring the inhertied environment, i.e., --action_env=PATH did _not_ result in the PATH variable being forwarded from the client environment. Fixes #5142. PiperOrigin-RevId: 196966822
* Passes the runfile manifest artifact into RunfilesSupplierImpl so that it canGravatar shahan2018-05-16
| | | | | | | | be filtered by spawn inputs downstream. Documents why the manifest is passed to the RunfilesSupplierImpl constructor. PiperOrigin-RevId: 196858753
* Enable manual trimming of config_feature_flags.Gravatar mstaib2018-05-16
| | | | | | | This enables users of config_feature_flags to specify the flags used by the transitive closure of a particular target in the transitive_configs attribute of all targets. It also adds a flag - --enforce_transitive_configs_for_config_feature_flag - which enforces this specification and uses it to trim the set of flags available to that target. RELNOTES: None. PiperOrigin-RevId: 196846092
* Properly quote $(location ) expansion for the shellGravatar Klaus Aehlig2018-05-16
| | | | | | | | | | | ...by using the ShellEscaper rather than the ad-hoc "escaping" in LocationExpander. Fixes #5190. At least to the extend that a context-independent quoting can work. Change-Id: I858662861a2504139c19d773690aef2befc23948 PiperOrigin-RevId: 196832574
* Filtering the legacy important_outputs field in the BEP by source, middlemanGravatar ulfjack2018-05-16
| | | | | | | | This change makes the field match the semantics of the legacy mechanism that is not open source. This is intended for migration only and the field should not be used otherwise (that is why the field is deprecated). PiperOrigin-RevId: 196817282
* Remove redundant @SkylarkModule annotation on SkylarkActionFactory.ArgsGravatar cparsons2018-05-15
| | | | | RELNOTES: None. PiperOrigin-RevId: 196722413
* Slightly refactor SpawnAction to improve env handlingGravatar ulfjack2018-05-15
| | | | | | | This is in preparation for fixing env handling as well as cache key (to use env) computations in subclasses of SpawnAction. PiperOrigin-RevId: 196626495
* Ease the configuration-related restrictions of several more tests.Gravatar mstaib2018-05-14
| | | | | | | | | Use update() and other methods which properly respect the trimming transition over those which don't. Avoid using the target configuration if the configuration actually used by a target is available. RELNOTES: None. PiperOrigin-RevId: 196588405
* Pull caching up to BuildConfigurationValue$Key$Codec. Almost all ↵Gravatar janakr2018-05-14
| | | | | | | | BuildOptions$DiffForReconstruction serializations are reached in this way, so we get better efficiency. Also, it was already a custom codec, so less new handrolling. Also use serialization framework for FragmentClassSet, instead of doing serialization directly. Default FragmentClassSet should be a constant, so it will serialize down to a byte or three. Future changes can make all the classes constants as well, if we're getting misses on them. PiperOrigin-RevId: 196546279
* Only use fingerprint and checksum for equality and hashCode in ↵Gravatar janakr2018-05-14
| | | | | | BuildOptions$OptionsDiffForReconstruction. The fingerprint uniquely identifies the "baseline" BuildOptions object and the checksum uniquely identifies the "overlay", so we don't need to incorporate the rest of the data. PiperOrigin-RevId: 196532013
* Fix broken HTMLGravatar laurentlb2018-05-14
| | | | | RELNOTES: None. PiperOrigin-RevId: 196527806
* Refactor TestAttempt event posting codeGravatar ulfjack2018-05-14
| | | | | | | | For flaky tests, Bazel may have cached information about multiple test attempts. In that case, we might want to post all of them on a subsequent cache hit, rather than posting only the passing attempt. We currently subclass TestResult inside Google, which overrides the new getCachedTestAttempts method. PiperOrigin-RevId: 196491575
* Use the local JDK as the default target javabaseGravatar cushon2018-05-14
| | | | | | and continue to use the embedded JDK as the default host_javabase. PiperOrigin-RevId: 196471714
* Add an IdentityHashMap to the BuildOptions.OptionsDiffForReconstruction codec.Gravatar mjhalupka2018-05-11
| | | | PiperOrigin-RevId: 196310244
* Migrate SkylarkRuleContext (and a few dependencies) to the build APIGravatar cparsons2018-05-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 196287081
* Fix spelling error in javadoc.Gravatar dannark2018-05-11
| | | | | RELNOTES: None PiperOrigin-RevId: 196232710
* Migrate almost all Skylark global modules to skylarkbuildapiGravatar cparsons2018-05-07
| | | | | | | There are still a few global @SkylarkSignature-annotated top-level objects that need to be migrated in SkylarkRuleClassFunctions, but this migrates everything else. RELNOTES: None. PiperOrigin-RevId: 195652038
* Relax requirements of skylark-exposed configuration fragmentsGravatar cparsons2018-05-07
| | | | | | | Since configuration fragments will extend from build API classes, @SkylarkConfigurationField no longer needs to annotate a method defined on a @SkylarkModule class. Ideally, we would ensure that a configuration fragment with a @SkylarkConfigurationField method implements an interface with @SkylarkModule, but this seems impossible to perform at the level of an annotation processor. RELNOTES: None. PiperOrigin-RevId: 195651344
* Kill Legacy Fileset implementation.Gravatar kush2018-05-04
| | | | | RELNOTES: None PiperOrigin-RevId: 195422399
* Remove dead code from SpawnActionGravatar kush2018-05-03
| | | | | RELNOTES: None PiperOrigin-RevId: 195264146
* Use the in-memory metadata in blaze as the source of truth for Fileset mappingsGravatar kush2018-05-02
| | | | | | | instead of the manifest files. RELNOTES: None PiperOrigin-RevId: 195149880
* Simplify config fragment creation.Gravatar gregce2018-05-02
| | | | | | | | | Remove all unnecessesary accesses to ConfigurationEnvironment and deprecate the accesses that actually need ConfigurationEnvironment. For review, check out ConfigurationFragmentFactory first. PiperOrigin-RevId: 195099768
* Update test code to support finding deferred param files.Gravatar tomlu2018-05-02
| | | | | RELNOTES: None PiperOrigin-RevId: 195072243
* Remove unused methods.Gravatar tomlu2018-05-02
| | | | | RELNOTES: None PiperOrigin-RevId: 195055827
* Migrate AbstractAction and SkylarkActionFactory to buildapiGravatar cparsons2018-05-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 195011200
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 194985259
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 194985157
* Migrate Runfiles to the build APIGravatar cparsons2018-05-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 194979843
* Move BazelLibrary from syntax/ to packages/Gravatar brandjon2018-05-01
| | | | | | | | | This helps the Skylark interpreter to not depend on Bazel concepts, though it adds a temporary dependency of Skylint on packages/. The fix for that will be to create a Build API interface for BazelLibrary (e.g., "BazelLibraryAPI"). Refactored some GlobalFrame construction logic to be more uniform. Instead of constructing a whole Environment just to get a frame, we build the frame directly, using ImmutableMap.Builder to accumulate bindings. This convention may further change once we convert MethodLibrary and the like to @SkylarkGlobalLibrary, but for now it's more readable. RELNOTES: None PiperOrigin-RevId: 194960824
* Use a new pattern for builtin Provider objects with @SkylarkCallable.Gravatar cparsons2018-05-01
| | | | | | | | This deprecates the old NativeProvider pattern. The new pattern is demonstrated using AppleStaticLibraryInfo. RELNOTES: None. PiperOrigin-RevId: 194956883
* Migrate annotations of SkylarkAttr to an interface class.Gravatar cparsons2018-04-30
| | | | | | | This isolates the API from the implementation. RELNOTES: None. PiperOrigin-RevId: 194850527
* Change LocationFunction to not extend Function.Gravatar dannark2018-04-30
| | | | | | | This is necessary for subsequent changes to the apply method for diamond splitting, which will require apply() to take more than one argument. But it seems like the only reason LocationFunction ever extended Function was for tests and so this is an improvement on its own. RELNOTES: None PiperOrigin-RevId: 194796136
* Make runfiles usage on Windows more flexible to support remote execution.Gravatar Googler2018-04-30
| | | | | | | | | | | | | | | When trying to find a runfile on Windows: 1. First look for the runfiles MANIFEST and find runfile locations using this if it exists (current behavior). 2. If no MANIFEST file exists, look for runfiles in the runfiles directory (new behavior). As part of this, remove setting RUNFILES_MANIFEST_ONLY for the benefit of test-setup.sh. Instead of telling it what to do, it decides what to do based on the observed state of the world. Launchers still set RUNFILES_MANIFEST_ONLY for the benefit of launched programs, since some may depend on this. Fixes https://github.com/bazelbuild/bazel/issues/4962. RELNOTES: Remote execution works for Windows binaries with launchers. PiperOrigin-RevId: 194785440
* Output message when the build configuration changes.Gravatar tomlu2018-04-27
| | | | | RELNOTES: None PiperOrigin-RevId: 194607978
* Use TransitionResolver to get top level transitions in BuildView.Gravatar mstaib2018-04-27
| | | | | | | | | | This brings BuildView's test configured target methods in closer to the real thing, and makes tests behave better. In particular, it enables trimming transitions to work. RELNOTES: None. PiperOrigin-RevId: 194586030
* Allow skylark rule definitions to advertise providers that targets of the ↵Gravatar cparsons2018-04-27
| | | | | | | | | | | rule must propagate This allows native aspects which specifically require advertised providers to be applied to skylark rules. Implementation to allow aspects to explicitly declare provider requirements will come later. RELNOTES: Skylark rule definitions may advertise providers that targets of the rule must propagate. PiperOrigin-RevId: 194581466
* Add equality support to composing transitions.Gravatar mstaib2018-04-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 194540141
* Avoid creating a Composing*Transition if one of the transitions is NoTransition.Gravatar mstaib2018-04-27
| | | | | RELNOTES: None. PiperOrigin-RevId: 194536202
* Add --experimental_use_late_bound_option_defauts flag to toggle usage of ↵Gravatar Googler2018-04-27
| | | | | | | | late bound option defaults BuildConfiguration.Fragment#lateBoundOptionDefaults() is going away soon, this flag is added to decouple its removal with the release process. PiperOrigin-RevId: 194527657
* Normalize parameter name commentsGravatar cushon2018-04-27
| | | | PiperOrigin-RevId: 194512971
* Replace ConfigurationTransition with PatchTransition in a few places.Gravatar mstaib2018-04-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 194459347
* RuleTransitionFactory returns NoTransition instead of null.Gravatar mstaib2018-04-26
| | | | | RELNOTES: None. PiperOrigin-RevId: 194433721
* Prepare to abstract away the param file write action from tests.Gravatar tomlu2018-04-26
| | | | | | | | | Rule authors frequently wants to make assertions on the parameter files their rule implementations have created. However, if they do not explicitly create parameter file write actions, or if indeed _there aren't_ any parameter file write actions inserted into the action graph, the tests will fail. This CL adds necessary methods for the migration. RELNOTES: None PiperOrigin-RevId: 194379748
* Support deferred param files.Gravatar tomlu2018-04-25
| | | | | | | | | | | | | Design doc: https://docs.google.com/document/d/1JXqwwVHYosZOgmjN8xrfTalyhiUYJ99Qe2D0qBcqZ1c The behaviour is gated on --defer_param_files (default off) and is controlled by --min_param_file_size. This CL adds support for VirtualActionInputs to LocalSpawnRunner, and all remote runners already supports them. The sandboxed runners are not yet supported, but that can be added in a future CL. This CL does not add support for spawn runner using different param file limits. This will require refactoring of the spawn strategies and runners to be viable. RELNOTES: None PiperOrigin-RevId: 194265291
* Prevent Skylark actions from setting arbitrary execution infoGravatar ulfjack2018-04-25
| | | | PiperOrigin-RevId: 194236287
* Pass environment to Skylark provider constructors.Gravatar tomlu2018-04-24
| | | | | | | This is needed for constructors that want to be able to use SkylarkSemantics. RELNOTES: None PiperOrigin-RevId: 194180124
* Ensure make variables from the CcToolchainProvider end up in theGravatar jcater2018-04-24
| | | | | | TemplateVariableInfo. PiperOrigin-RevId: 194088329
* Make the constructor of TemplateVariableInfo available in Skylark.Gravatar lberki2018-04-24
| | | | | | RELNOTES[NEW]: TemplateVariableInfo can now be constructed from Skylark. PiperOrigin-RevId: 194072452