aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/BUILD
Commit message (Collapse)AuthorAge
* 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
* Move SkylarkSemanticsOptions to the packages/ directory, alongside ↵Gravatar brandjon2017-10-07
| | | | | | | | | SkylarkSemanticsCodec Note that the syntax package and its test package still depend indirectly on the options parser via other Bazel-specific packages. RELNOTES: None PiperOrigin-RevId: 171342823
* Prepare Classpath reading for Java 9Gravatar cushon2017-10-06
| | | | PiperOrigin-RevId: 171180273
* Split off SkylarkSemanticsOptions into an immutable classGravatar brandjon2017-10-06
| | | | | | | | | | | This is a first step toward making the core Skylark interpreter (the syntax/ directory) not depend on the options parser. Subsequent CLs will replace uses of SkylarkSemanticsOptions within the interpreter with uses of SkylarkSemantics, and move SkylarkSemanticsOptions to the packages/ directory alongside SkylarkSemanticsCodec. SkylarkSemantics will also replace SkylarkSemanticsOptions as the value that gets passed through Skyframe. This is nice because SkylarkSemantics is strictly immutable, whereas options classes are only kinda-sorta-immutable. The downside is significantly more redundancy when defining new options. But some of the work is saved by using AutoValue, and there are tests that protect us from dumb mechanical errors. The details are outlined in the javadoc for SkylarkSemanticsOptions and SkylarkSemanticsConsistencyTest. RELNOTES: None PiperOrigin-RevId: 171060034
* Make UnionFileSystem accept all paths Bazel can throw at it.Gravatar ccalvarin2017-09-27
| | | | | | | | | Instead of relying on a character-by-character StringTrie, segment paths based on PathFragments. This means UnionFS can accept any path that Bazel stores internally, removing the ASCII limitations. This also means removing the ability to have a filesystem bound for sub-PathFragments, /foo/barbar, /foo/barqux could have the same filesystem bound at /foo/bar. This feature was tested for when a use case was envisioned, but it was never used, so removing it is safe. RELNOTES: None. PiperOrigin-RevId: 170054656
* Move ExternalPackageUtil to a new lib.repository package and simplify itGravatar ulfjack2017-09-26
| | | | | | | Move the nested Exception classes to top-level classes, remove unused functionality and move functionality only used in one place to that place. PiperOrigin-RevId: 170041246
* LateBoundDefault: enforce access to a single fragment (or none).Gravatar mstaib2017-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, there is no way to enforce that LateBoundDefaults only access the fragments that they declare. This means that LateBoundDefaults can fail to declare fragments at all, or declare the wrong ones, and still have no troubles. But when trimming, these fragments must be declared, because otherwise they will not necessarily be available. This change refactors LateBoundDefault to declare a single fragment type, not a set. All existing LateBoundDefaults use sets with a single element or no elements at all for their set of fragment classes, so this does not limit anything being done currently. To account for LateBoundDefaults which do not use configuration at all, typically those which only want to access the configured attribute map, it is possible for Void to be the fragment class which is requested. To account for LateBoundDefaults which need to access methods of the BuildConfiguration instance itself, it is possible for BuildConfiguration to be the fragment class which is requested; however, this is unsafe, so it is only a temporary state until a way to do this without also giving access to all of the fragments can be added. Drive-by refactoring: LateBoundDefaults' values are now typed. All actual production LateBoundDefaults were Label or List<Label> typed, through the LateBoundLabel and LateBoundLabelList subclasses. These subclasses have been removed, and LateBoundDefault has two type parameters, one for the type of its input, and one for the type of its output. RELNOTES: None. PiperOrigin-RevId: 169242278
* Project reorg: move *ConfiguredTarget to new configuredtargets/ pathGravatar gregce2017-09-18
| | | | | | | Exempt RuleConfiguredTarget in this change because that's liable to touch a billion files. PiperOrigin-RevId: 168929827
* Add whitelists for android_resources removalGravatar Googler2017-09-15
| | | | | | | Add additional tooling for removing android_resources RELNOTES: none PiperOrigin-RevId: 168741510
* Introduce "bazel help flags-as-proto" to print information about supported ↵Gravatar fwe2017-09-14
| | | | | | flags as a text protobuf. PiperOrigin-RevId: 168695297