aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/BUILD
Commit message (Collapse)AuthorAge
* Add CommandLineItem interface.Gravatar tomlu2018-01-25
| | | | | | | | This interface makes it clearer in the type system exactly how items that go into a CustomCommandLine are turned into strings. It is a preparatory change to allow command line fingerprints to be more cheaply calculated, but it is valuable in itself from a code quality standpoint. PiperOrigin-RevId: 183274022
* Add JavaRuntimeToolchainInfo class to wrap JavaRuntimeInfo for toolchains ↵Gravatar John Cater2018-01-23
| | | | | | | access. Change-Id: I6041c51823fa52d6ae55dfe06afd1754ce05ab98 PiperOrigin-RevId: 182904580
* Add codec for TestFilter, and clean up some things: use ↵Gravatar janakr2018-01-22
| | | | | | java.util.function.Predicate and move some code that was only called by TestFilter inside it. PiperOrigin-RevId: 182884550
* Add a native provider registry to ConfiguredRuleClassProviderGravatar brandjon2018-01-22
| | | | | | | The idea is that rule sets should record what builtin providers (types, not instances) they use, as opposed to having a static registry the way we do for @SkylarkSignature builtins. (It'd be nice for the latter to not be static one day.) RELNOTES: None PiperOrigin-RevId: 182802492
* Codec for Location.Gravatar shahan2018-01-16
| | | | | | * Moves SingletonCodec to third_party. PiperOrigin-RevId: 182143153
* Remove some unnecessary depsGravatar Ulf Adams2018-01-15
| | | | | | | | | Change-Id: Ib8dd9265b18fa0915f52427567845105fcdfa295 Closes #4447. Change-Id: Ib8dd9265b18fa0915f52427567845105fcdfa295 PiperOrigin-RevId: 181943004
* Introduce the blaze cquery command as the new ui for configurable query.Gravatar juliexxia2018-01-12
| | | | | | | | | | | | | | | | | | before: blaze build --nobuild //foo --experimental_post_build_query="deps(//foo)" after: blaze cquery "deps(//foo)" pros of ui change: - more concise - assumes query expression targets == targets to be built (but allows for flexibility through --top_level_targets flag) - separate from build command - cquery command recognizes query options, build options, and its own unique set of options cons of ui change: - adds another command to blaze - recognizes options that don't actually work yet -> requires more option validation RELNOTES: None PiperOrigin-RevId: 181816980
* Clean up Windows config_settingsGravatar Yun Peng2018-01-12
| | | | | | | | | | | | | | 1.Deleted config_setting for --cpu=x64_windows_msys, because we don't build Bazel with MSYS gcc anymore. 2.Deleted config_setting for --cpu=x64_windows_msvc, because it uses exactly the same toolchain as --cpu=x64_windows, it'll be removed in the future. This change reduces the complexity of our BUILD files and make them less confusing. Change-Id: I939831a6861413b0f745fb1be98aacd4fb780e0a PiperOrigin-RevId: 181751853
* Fold the Jvm configuration fragment into JavaConfiguration.Gravatar lberki2018-01-11
| | | | | RELNOTES: None. PiperOrigin-RevId: 181579365
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2018-01-10
| | | | | | | | This is a rollforward -- the previous attempt was rolled back due to incorrectly adding test sources. In addition, the newly checked in tests do not work on Windows, and are thus disabled on the Windows platform. I suspect this is due to a bug in the compile-testing library. RELNOTES: None. PiperOrigin-RevId: 181482589
* Create function createJavaInfo with new API. Implement ↵Gravatar dbabkin2018-01-10
| | | | | | | | | | JavaCompilationArgsProvider. Added tests for checking JavaCompilationArgsProvider state. All other providers will be implemented in next CLs. RELNOTES:none PiperOrigin-RevId: 181451235
* Automated rollback of commit 46356dfa59428b665aa280ba4cbca6e449f73c5b.Gravatar laszlocsomor2018-01-02
| | | | | | | | | | | | | *** Reason for rollback *** causes github #4375 and #4373 *** Original change description *** Use an annotation preprocessor to validate SkylarkConfigurationField. RELNOTES: None. PiperOrigin-RevId: 180535458
* Add android_local_test rule to Bazel.Gravatar dannark2017-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This rule enables testing android_librarys locally in the jvm (as opposed to on a device). To use this rule with robolectric (robolectric.org), add the following to your WORKSPACE file: http_archive( name = "bazel_android", url = "...", ) load("@bazel_android//:setup_robolectric.bzl", "setup_robolectric") setup_robolectric() and then an android_local_test rule would need to add: "@bazel_android//:robolectric", to its dependencies. android_local_test( name = "MyTest", srcs = ["MyTest.java"], deps = [ "//java/app:lib", "@bazel_android//:robolectric", ], ) RELNOTES[NEW]: New android test rule, android_local_test. PiperOrigin-RevId: 180438995
* Adds ObjectCodecs for FragmentOptions and BuildOptions.Gravatar Googler2017-12-27
| | | | PiperOrigin-RevId: 180211710
* ObjectCodecs for all non-test FragmentOption subclasses.Gravatar Googler2017-12-27
| | | | PiperOrigin-RevId: 180202221
* Memoize equals and hashCode operations for BuildOptions. Currently, equality ↵Gravatar janakr2017-12-24
| | | | | | is so slow that if we have to compare many of them, the build can basically never finish. This is needed for a follow-up in which BuildOptions are part of many SkyKeys. PiperOrigin-RevId: 180056834
* Replace Attribute.Transition with config.transitions.Transition.Gravatar gregce2017-12-22
| | | | PiperOrigin-RevId: 179936355
* Replaces some existing codecs with @AutoCodec.Gravatar Googler2017-12-22
| | | | PiperOrigin-RevId: 179931575
* Redo FileType to reduce generated garbage.Gravatar tomlu2017-12-22
| | | | | | | | | | | | | * Change FileType to no longer assume it operates on just the base name (it can now be given a full path). * Move the responsibility to specific classes (Artifact, Path, PathFragment) to decide how they want to offer up a string that includes the file name. * Flip the order in which users are expected to check Artifact type, from FileType#matches(Artifact) to Artifact#isFileType(FileType). This looks natural and should encourage developers to use efficient file type checking methods. * Change CppCompileAction to use the new API. RELNOTES: None PiperOrigin-RevId: 179903239
* Use an annotation preprocessor to validate SkylarkConfigurationField.Gravatar cparsons2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179845261
* Consolidate instances of the --loading_phase_threads flag.Gravatar juliexxia2017-12-21
| | | | | RELNOTES: None. PiperOrigin-RevId: 179838936
* Inline JavaToolchainData into JavaToolchainProviderGravatar cushon2017-12-20
| | | | PiperOrigin-RevId: 179735701
* Replace java_plugin_configuration with java_package_configurationGravatar cushon2017-12-19
| | | | | | | | | java_toolchain.plugin_configuration creates cycles in the unconfigured target graph. Instead, use the same per-package configuration approach to allow enabling javacopts, which can be used to enable built-in checks on a per-package basis. PiperOrigin-RevId: 179598500
* Retire some pre-skylark machinery for accessing the contents of java_toolchainGravatar cushon2017-12-19
| | | | | | and replace the only use with java_common.default_javac_opts. PiperOrigin-RevId: 179571481
* Consolidate instances of the --keep_going flag.Gravatar juliexxia2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179468685
* Remove JavaNeverlinkInfoProvider.Gravatar elenairina2017-12-18
| | | | | | | | We need to handle neverlink libraries in java_common (see #3735). Therefore JavaInfo needs to store the neverlink information. Instead of wrapping yet another provider (JavaNeverlinkInfoProvider) into JavaInfo, store the neverlink value directly. PiperOrigin-RevId: 179439005
* Adds a codec for RegexFilter.Gravatar Googler2017-12-13
| | | | PiperOrigin-RevId: 178942449
* Fix the documentation to allow making links to BE documetation articlesGravatar vladmos2017-12-13
| | | | PiperOrigin-RevId: 178910168
* Move BazelRuleClassProvider.CORE_WORKSPACE_RULES to its own class in the ↵Gravatar lpino2017-12-06
| | | | | | rules/repository package. PiperOrigin-RevId: 178087895
* Move bazel conditions into src/conditions.Gravatar tomlu2017-11-30
| | | | | | | This will enable an easier transition from checked-in BUILD files to ones generated by copybara. RELNOTES: None PiperOrigin-RevId: 177514519
* Move BazelRuleClassProvider.CONFIG_RULES to its own class in the config package.Gravatar lpino2017-11-30
| | | | PiperOrigin-RevId: 177447905
* Add a CommandLineBuilder for the process-wrapper embedded tool, and use it ↵Gravatar ruperts2017-11-30
| | | | | | | | | everywhere instead of duplicating process-wrapper --shell_arguments in Blaze. To avoid a cyclic dependency, I broke up exec/local:local into exec/local:local and exec/local:options. RELNOTES: None. PiperOrigin-RevId: 177419268
* Add support for package specification-based java_plugin configurationGravatar cushon2017-11-29
| | | | | | | | This change allows java_plugins to be enabled for the set of packages described by a package group, using a new java_plugin_configuration rule that can be added to a java_toolchain configuration. PiperOrigin-RevId: 177410831
* PiperOrigin-RevId: 176356590Gravatar lpino2017-11-20
|
* Add --host_deps custom filtering to configuredtargetqueryenvironment.Gravatar juliexxia2017-11-17
| | | | | | | | Notable implementation details: - split the flag into --experimental_post_build_query and --experimental_query_options - allow --nohost_dep filtering to be applied to query targets configured in the host configuration (only returns deps also in the host configuration so allow deps as long as it never sees a transition from a host config to a non-host config) PiperOrigin-RevId: 176165870
* Convert JavaToolchainProvider to a concrete class, and a subclass of ↵Gravatar jcater2017-11-17
| | | | | | ToolchainInfo. PiperOrigin-RevId: 176117866
* Deletes unused apk manifest.Gravatar ahumesky2017-11-16
| | | | | RELNOTES: None. PiperOrigin-RevId: 176025413
* Fix Skylark outputs to properly report errors in template placeholders.Gravatar jcater2017-11-16
| | | | | | Fixes #1479. PiperOrigin-RevId: 175979487
* RELNOTES: --keep_incrementality_data flag allows Bazel servers to be run in ↵Gravatar janakr2017-11-12
| | | | | | | | | | | | | | memory-saving non-incremental mode independent of --batch and --discard_analysis_cache. A command run with --nokeep_incrementality_data will discard data that would be needed for incremental builds. Subsequent commands can be sent to the same server, but they will not get the benefit of incrementality from this command. However, if --keep_incrementality_data is specified on a subsequent command, the commands after that will get the benefits of incrementality. There are two benefits to not being dependent on --batch. First, this allows Bazel servers to be run in extreme memory-saving mode without the startup penalties (JVM startup, JITting) that --batch execution imposes. Second, this allows Bazel developers to inspect the state of a Bazel server after an extreme memory-saving build. In order to avoid discarding data unnecessarily (for instance, on a "bazel info used-heap-size-after-gc" or "bazel dump --skyframe=summary") the actual resetting of the graph is done lazily, right before its use in SequencedSkyframeExecutor#sync. This is morally a partial rollback of https://github.com/bazelbuild/bazel/commit/98cd82cbdcac7c48164a611c5a9aa8fc2f1720ef. For now, our tests specify all of the flags. After this change sticks, I plan to get rid of the --batch flag from these tests, which should allow for some clean-ups. Eventually --batch and --discard_analysis_cache may not imply that we don't keep incremental state: we can require that it be specified explicitly. PiperOrigin-RevId: 175335075
* Adjust blaze to allow for integration of one-version checking inside Google. ↵Gravatar Googler2017-11-10
| | | | | | | This feature is not yet available for Bazel users. RELNOTES: n/a PiperOrigin-RevId: 175226288
* Delete unused preconditions library.Gravatar tomlu2017-11-09
| | | | PiperOrigin-RevId: 175092923
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Break dependency on vfs from the interface of syntax and cmdline.Gravatar tomlu2017-11-06
| | | | | | | | These libs are exposed externally, implying that the vfs is also exposed externally. We break out PathFragment from vfs to still use this in their interface. This class is a much smaller dependency than the entire vfs. PiperOrigin-RevId: 174729373
* Support Python 2 and 3 in the same build.Gravatar gregce2017-10-20
| | | | | | | | | This is also an example of the versatility of dynamic configurations: this feature only requires changes to rules/python/... Issue #3871 PiperOrigin-RevId: 172775001
* Fix src/test/shell/bazel:srcs_test to add missing srcs filegroup.Gravatar allevato2017-10-20
| | | | PiperOrigin-RevId: 172639055
* Add memory profiler.Gravatar tomlu2017-10-18
| | | | | | | | | | | This adds two dump command, bazel dump --rules and bazel dump --skylark_memory. dump --rules outputs a summary of the count, action count, and memory consumption of each rule and aspect class. dump --skylark_memory outputs a pprof-compatible file with all Skylark analysis allocations. Users can then use pprof as per normal to analyse their builds. RELNOTES: Add memory profiler. PiperOrigin-RevId: 172558600
* Add callcount system for blaze developers.Gravatar tomlu2017-10-16
| | | | | | | | | | | This simple system allows blaze developers to insert instrumentations in particular methods that they want to know: 1. How often are they called? 2. From which call sites are they called, with full call stack The output is a pprof file that can then be analysed offline. PiperOrigin-RevId: 172128440
* Refactor ConfiguredAttributeMapper to lib/packages from lib/analysis.Gravatar cparsons2017-10-11
| | | | | | | | | This requires moving the convenience constructor using RuleConfiguredTarget to be owned by RuleConfiguredTarget. This refactoring is required by later work to allow SplitTransitionProvider to use configurable attributes. This would require packages/Attribute.java -> analysis/ConfiguredAttributeMapper.java, where in general, the 'analysis' package depends on the 'packages' package. This is the easiest way to prevent a circular dependency. RELNOTES: None. PiperOrigin-RevId: 171741620
* Move the MakeVariableExpander to a new packageGravatar ulfjack2017-10-10
| | | | | | | Rename it to TemplateExpander and start rewriting the documentation to refer to template variables. PiperOrigin-RevId: 171648255
* Report the structured Bazel command line via the BEP.Gravatar ccalvarin2017-10-10
| | | | | | | | | This is part of the effort outlined in https://bazel.build/designs/2017/07/13/improved-command-line-reporting.html. The refactoring of the options parser is not yet complete, so we still do not have complete & correct information about the canonical command line. Where the information is blatantly incorrect, a best approximation was made, with comments and tests documenting the deficiencies. Change the names of the initial CommandLine fields in the BEP to be explicitly identified as unstructured. RELNOTES: None. PiperOrigin-RevId: 171625377