| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
| |
Add all tests under //tools/... to
//src:all_windows_tests, to run them on Bazel CI.
See https://github.com/bazelbuild/bazel/issues/4292
Closes #5839.
Change-Id: Iae647f561683cc50ef62416c4b834576ae918486
PiperOrigin-RevId: 208167743
|
|
|
|
|
|
|
| |
Fixes #5838
Change-Id: Ic5f730f97b43682b1efc537a02c861d49d3606cc
PiperOrigin-RevId: 208044984
|
|
|
|
|
|
|
|
|
| |
Cloning branches as added after the fact to the skylark git rules,
once recording the actual commit was implemented. Still support shallow
cloning also when following branches.
Change-Id: Ib7a84de4ada69152e9e7c27e9d84cff39cfd3582
PiperOrigin-RevId: 207866303
|
|
|
|
|
|
|
|
| |
https://github.com/bazelbuild/bazel/issues/5633
Closes #5647.
PiperOrigin-RevId: 207706657
|
|
|
|
|
|
|
|
| |
Use `git -C` instead of `cd` in git skylark rules to be more concise. I think it's probably better to use the built-in changedir functionality of git rather than `cd`ing around manually. Happy to be overruled however if it makes readability better.
Closes #5668.
PiperOrigin-RevId: 207703326
|
|
|
|
|
|
|
|
|
|
| |
git_repository could use HTTP_PROXY to clone repository
Fixes #3893.
Closes #5674.
PiperOrigin-RevId: 207689348
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I got an INFO message from Bazel containing the following date string:
"shallow_since": "2018-31-07"
The code seems to reveal that the date is intended to be YYYY-MM-DD, so
change the requested format passed to Git.
Closes #5734.
PiperOrigin-RevId: 207683709
|
|
|
|
|
|
| |
tools/buils_defs/cc/BUILD.
PiperOrigin-RevId: 206939687
|
|
|
|
|
|
|
| |
This is required to support Windows Docker image creation.
RELNOTES: None
PiperOrigin-RevId: 206326316
|
|
|
|
|
|
|
|
|
|
|
| |
While we do not expect any targets to actually depend on the
contents of the .git subdirectory of an external repository,
it is still a non-reproducible part of an external git repository,
blocking all attempts to demonstrate reproducibility of that
the given rule.
Change-Id: Id1e08013a8ca33d4b4c4b053b9423f75d771dfc1
PiperOrigin-RevId: 204872242
|
|
|
|
|
|
|
| |
parameters of the skylark attr module.
RELNOTES: None.
PiperOrigin-RevId: 204797954
|
|
|
|
|
|
|
|
|
|
|
| |
To match the label declarations in git.bzl, use `allow_single_file` for
workspace and build file labels.
Per https://docs.bazel.build/versions/master/skylark/lib/attr.html#label this restricts the labels to specify only a single file.
Closes #5561.
PiperOrigin-RevId: 204773387
|
|
|
|
|
|
|
| |
This is a part of the https://github.com/bazelbuild/bazel/issues/4571 effort.
RELNOTES: None
PiperOrigin-RevId: 204754855
|
|
|
|
|
|
|
|
| |
Until we have more complete support for Python runtime/toolchain configurations, it's useful for the hash tool to support `--action_env`, so the user's PATH can optionally be searched by the `py_binary` wrapper.
Closes #5451.
PiperOrigin-RevId: 204108228
|
|
|
|
|
|
|
|
|
| |
Add to the documentation that version_file and release_file cannot be used to generate an output with the N-V-R.A naming scheme.
Fixes #5522.
Closes #5555.
PiperOrigin-RevId: 203946762
|
|
|
|
|
|
|
| |
pkg_tar creates an archive, not a docker image.
Change-Id: I402bd8fdb67c38cd67a3990b983aa3b6d912da37
PiperOrigin-RevId: 203932291
|
|
|
|
|
|
|
|
|
|
|
| |
Use the "with" statement to open files in various
Python scripts used by Bazel, to ensure these
files are closed eagerly.
See https://github.com/bazelbuild/bazel/issues/5512
RELNOTES: none
PiperOrigin-RevId: 203346678
|
|
|
|
|
|
|
|
|
| |
Now that git_repository returns the commit actually checked out
(and we have means of recording it), support following an active
branch of a git repository.
Change-Id: I6e152c59b694bbf562b345ee88282a8c9bd58e4c
PiperOrigin-RevId: 203110735
|
|
|
|
|
|
|
|
| |
for well over a year and a half.
RELNOTES[INC]: Loading @bazel_tools//tools/build_defs/repo:git_repositories.bzl no longer works. Load @bazel_tools//tools/build_defs/repo:git.bzl instead.
PiperOrigin-RevId: 202923049
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 202914788
|
|
|
|
|
|
|
| |
This was never used. We thought it will be useful, but it's not.
RELNOTES: None.
PiperOrigin-RevId: 202143524
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit bd16ab9454e624a26c53a0f3fb892e20fb1c36e6 documents that these statements are no longer required to achieve prefetching (as of commit cdc99afc1a03ff8fbbbae088d358b7c029e0d232). Given that many `http_archive` calls will need at least a `build_file`, these debugging prints generate an incredible amount of spam in projects with many external archives.
I looked over the rest of the `build_defs/repo` files and none of them have any tracing debug prints, except for `git.bzl` which guards it with an `attr.verbose`. I could rework this to add a verbosity flag if you wish, but it doesn't seem merited for http fetching (unlike git, which is relatively more expensive and can be flaky).
Relates to #2700.
Closes #5446.
PiperOrigin-RevId: 201947174
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 201941079
|
|
|
|
|
|
|
|
| |
#5407
Closes #5450.
PiperOrigin-RevId: 201933209
|
|
|
|
|
|
| |
RELNOTES: None.
*** Reason for rollback ***
PiperOrigin-RevId: 201573394
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
toolchain API
This is a part of the []
This is an encore of unknown commit which includes fixes for:
* //miles ([]
* clif tests ([]
* exoblaze ([]
RELNOTES: None.
PiperOrigin-RevId: 201541210
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enable on Windows:
//src/test/shell/bazel:bazel_experimental_ui_test
//src/test/shell/bazel:bazel_random_characters_test
Also document the (surprising) semantics of
http_file() on Windows.
See https://github.com/bazelbuild/bazel/issues/4292
Change-Id: Id636b9cf03cc8d12449eed2be493dcfc176146c7
Closes #5409.
Change-Id: I15677548f2f3fd6b4822e8e6af4b78d8517f953a
PiperOrigin-RevId: 201512812
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using that repository rules now may return a non-None value,
make git_repository return the arguments that make the rule
reproducible; in particular, return the actual commit (instead
of a tag) and the date of the commit, so support shallow clones.
The added test also demonstrates how the `bazel sync` command
together with `--experimental_repository_resolved_file` can be
used to replay an earlier state of external dependencies.
Change-Id: Ifa1cfdfdb5eb299a15b9d0ec7d285dc84c0bcdc0
PiperOrigin-RevId: 200705705
|
|
|
|
|
|
|
|
|
|
| |
The patch(1) utility usually gives error messages on stdout. So it is
not useful to report only stderr in case a patch failed. Report both.
Fixes #5379.
Change-Id: Ief198849e29ca989dfdefe2fadf495a0b0949972
PiperOrigin-RevId: 200377306
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of hard-coding "-p0", allow the arguments for that patch tool
to be overridden. In particular, this supports the use case of patches
generated with `git format-patch` which are to be read as `-p1`.
Improves on #5379.
Closes #4974 as superseded.
Change-Id: I809fde14beab21d8a755ba4f1706b602bae3c1bb
PiperOrigin-RevId: 200373909
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usage example:
```python
# In WORKSPACE
load("@bazel_tools//tools/build_defs/repo:android.bzl", "aar_import_external", "aar_maven_import_external")
# Specify the URL directly:
aar_import_external(
name = "com_android_support_preference_v14_25_1_0", # required
licenses = ["notice"], # required
aar_urls = [ # required
"https://dl.google.com/dl/android/maven2/com/android/support/preference-v14/25.1.0/preference-v14-25.1.0.aar"
],
aar_sha256 = "442473fe5c395ebef26c14eb01d17ceda33ad207a4cc23a32a2ad95b87edfabb", # optional or empty string
deps = [ # optional or empty list
"@com_android_support_recyclerview_v7_25_1_0//aar",
"@com_android_support_appcompat_v7_25_1_0//aar",
"@com_android_support_preference_v7_25_1_0//aar",
"@com_android_support_support_v4_25_1_0//aar",
],
)
# Or, specify the artifact coordinate:
aar_maven_import_external(
name = "com_android_support_preference_v14_25_1_0", # required
artifact = "com.android.support.test:preference-v14:25.1.0", # required
sha256 = "442473fe5c395ebef26c14eb01d17ceda33ad207a4cc23a32a2ad95b87edfabb" # optional or empty string
licenses = ["notice"], # required
server_urls = ["https://maven.google.com"], # required
deps = [ # optional or empty list
"@com_android_support_recyclerview_v7_25_1_0//aar",
"@com_android_support_appcompat_v7_25_1_0//aar",
"@com_android_support_preference_v7_25_1_0//aar",
"@com_android_support_support_v4_25_1_0//aar",
],
)
# In BUILD.bazel
android_library(
name = "foo",
srcs = [...],
deps = [
"@com_android_support_preference_v14_25_1_0//aar",
],
)
```
To test this out with gmaven_rules, change the `load` statement in https://github.com/bazelbuild/gmaven_rules/blob/master/gmaven.bzl to
```
load('@bazel_tools//tools/build_defs/repo:android.bzl', 'aar_import_external')
load('@bazel_tools//tools/build_defs/repo:java.bzl', 'java_import_external')
```
Fixes https://github.com/bazelbuild/bazel/issues/4654
RELNOTES: New rules for importing Android dependencies: `aar_import_external` and `aar_maven_import_external`. `aar_import_external` enables specifying external AAR dependencies using a list of HTTP URLs for the artifact. `aar_maven_import_external` enables specifying external AAR dependencies using the artifact coordinate and a list of server URLs.
Closes #5319.
Change-Id: I9517e68ab78f2e30fb6ceabfe3b35061c585d607
PiperOrigin-RevId: 199839047
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cl adds Skylark constants allowing users to specify which C++ action they
want for the feature configuration Skylark API. This is done by exposing a
Skylark file at @bazel_tools//tools/cpp:action_names.bzl.
Skylark api to the C++ toolchain doc:
https://docs.google.com/document/d/1g91BWJITcYw_X-VxsDC0VgUn5E9g0kRBGoBSpoO41gA/edit#.
Progress on #4571.
RELNOTES: None.
PiperOrigin-RevId: 199596778
|
|
|
|
|
|
|
|
|
|
| |
While upgrading an internal project from 0.10 to 0.13 we have found that we no longer were able to build one of external non-basel dependencies that already has a lowercase `build` directory in their repo.
As the name `BUILD` is much more common than `BUILD.bazel`, in particular on file systems that are case-insensitive, I propose to generate the latter by default.
Closes #5146.
PiperOrigin-RevId: 199264025
|
|
|
|
|
|
|
|
|
|
| |
Supporting tools in inputs introduces a slow linear scan. Such tools should be moved to the 'tools' attribute. If --incompatible_no_support_tools_in_action_inputs is set the inputs are scanned, but a helpful error message is issued to the user.
Eventually we will remove the slow scanning. Errors will surface in the execution phase instead of during analysis, and the resulting error messages will be less obvious.
RELNOTES: None
RELNOTES[INC]: With --incompatible_no_support_tools_in_action_inputs enabled, Skylark action inputs are no longer scanned for tools. Move any such inputs to the newly introduced 'tools' attribute.
PiperOrigin-RevId: 198996093
|
|
|
|
|
|
| |
This CL aslo enables a presubmit check for correct formatting of all bzl files in //third_party/bazel.
PiperOrigin-RevId: 198857055
|
|
|
|
|
|
| |
Closes #5044.
PiperOrigin-RevId: 198399012
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR copies "upstream" a change made to java_import_external in`rules_scala` (see [PR](https://github.com/bazelbuild/rules_scala/pull/473))
This change was originally proposed by @dslomov [here](https://github.com/bazelbuild/bazel/issues/3528) (search for 'jvm_import_external')
java_import_external was changed to `jvm_import_external` 'template like' rule + `java_import_external` macro in order to allow for other jvm languages (e.g. scala and kotlin) to utilize the 'import_external' functionality without copying the boiler plate again and again.
This has already been used in `rules_scala` with the introduction of `scala_import_external` and `scala_maven_import_external`
In addition to the `import rule name`, `jvm_import_external` can also be called with custom attributes needed by the underlying import rules, as well as a custom load statement.
`java_import_external` is used as a macro in rules_scala to make sure it's still functioning properly after the change.
`jvm_maven_import_external` exposes maven artifact terminology.
This will also allow to create a `maven_import_external` macro that will delegate to `jvm_maven_import_external` with a `maven_import` rule which will have `MavenCoordinates` Provider as discussed [here](https://github.com/bazelbuild/bazel/issues/4654)
Closes #5068.
PiperOrigin-RevId: 198398621
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset introduces tests for the `shallow_since` functionality that was introduced in 6496b1d1d25025f33406b1eaf9949cab126f08bd.
We test that if the user specifies a tag as well as a `shallow_since` that it fails since they are incompatible. We also verify that specifying a commit before the `shallow_since` date causes the clone to fail (albeit currently with a non-useful error message; perhaps that could be improved at a later date).
It also documents more clearly how to use the feature by explaining the format of the 'since' string.
Closes #5183.
PiperOrigin-RevId: 197875727
|
|
|
|
|
|
|
|
|
|
| |
The `--shallow-since` option of git was introduced only in version 2.11 of git. However,
some widely used distributions ship older versions of git. So fall back to fully cloning
or fetching a repository if the respective shallow option is not know to the ambient git
command used.
Change-Id: I8f0aa0a12e294ff9cc8325975bd9333f6bf50939
PiperOrigin-RevId: 197863797
|
|
|
|
|
|
|
|
| |
http_jar is another version of the native http_archive. So add it
to the Skylark-implementation as well.
Change-Id: Icbaafe18d4836e14b0f5eb09dc3ab0607f9e391d
PiperOrigin-RevId: 197719717
|
|
|
|
|
|
|
| |
...to be fully compatible with the native rules.
Change-Id: Ie340f73ec530ef0c8f50215a331f28f523398db8
PiperOrigin-RevId: 196801227
|
|
|
|
|
|
|
|
| |
Since cdc99afc1a03ff8fbbbae088d358b7c029e0d232 label arguments are
prefetched. So it is no longer necessary to access them early.
Change-Id: I6d30bae3ac655387641ffd98f9b9aa95d2f1ece7
PiperOrigin-RevId: 196632853
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Occasionally, I see the following error messages when running a pkg_rpm target:
`
INFO: Analysed target //foo/deploy:pkgs (1 packages loaded).
INFO: Found 1 target...
INFO: From Executing genrule //foo/deploy:pkgs:
error: cannot open Packages database in /home/mmikitka/.rpmdb
`
This PR explicitly sets the --buildroot to address this error message.
Closes #5102.
PiperOrigin-RevId: 195254300
|
|
|
|
|
|
|
|
| |
This PR provides support for directories as inputs to pkg_rpm, which is useful for RPMs that contain a lot of files, and one doesn't want to exceed the shell argument buffer size. Files are recursively added from the top-level parent directory.
Closes #5097.
PiperOrigin-RevId: 195211382
|
|
|
|
|
|
|
|
| |
I like to have clean output on successful builds, and this PR suppresses informative print statements, by default, with the option of exposing them, if desired.
Closes #5037.
PiperOrigin-RevId: 193375345
|
|
|
|
| |
PiperOrigin-RevId: 192587935
|
|
|
|
|
|
|
|
|
|
|
|
| |
Backport recent changes to build_tar tool in bazelbuild/rules_docker: https://github.com/bazelbuild/rules_docker/pull/310
- add --empty_file and --empty_dir flags to build_tar.py, allowing
creation of empty files and dirs with specified mode.
- expose those flags as empty_files and empty_dirs parameters to
pkg_tar rule.
Closes #4837.
PiperOrigin-RevId: 190610460
|
|
|
|
|
|
|
|
| |
Prepare pkg.bzl to be compliant with upcoming Skylark changes. With this change,
one can use pkg_tar even if using --all_incompatible_changes.
Change-Id: Iff0ed50bda1f93d9f606b783295b049bdf15d242
PiperOrigin-RevId: 190443156
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Added the "rpm_nvra" output which follows the recommended package naming convention of *Name-Version-Release.Arch.rpm* (NVRA). See http://ftp.rpm.org/max-rpm/ch-rpm-file-format.html
2. Expose "release" and "release_file" parameters to support the NVRA naming convention
3. Remove the mandatory constraint on version parameters (version or version_file): I want to auto-generate my SPEC file outside of the pkg_rpm rule, and I don't want pkg_rpm altering the file.
Closes #4732.
PiperOrigin-RevId: 188744806
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #4810, invalidates #4782, and extends #4747.
Change-Id: I19426bb30a151358875e9bae0e0c1d92b3818432
Closes #4816.
Change-Id: I5d92cec994103e2136c5ed279780f321a42d1bdd
PiperOrigin-RevId: 188722982
|