| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
RELNOTES: Support for LIPO has been fully removed.
PiperOrigin-RevId: 200724578
|
|
|
|
|
|
|
|
|
| |
Ultimately, we'll need to make the call on whether these functions belong as part of the build API or as part of skylark builtins. For now, we keep them as skylark builtins.
(In either case, we'll want to migrate to @SkylarkCallable, but that's for a later change)
RELNOTES: None.
PiperOrigin-RevId: 200723605
|
|
|
|
|
|
|
|
| |
If a failure occurs during the syncing of the external repositories,
not only set the exit code, but also report the error message.
Change-Id: I3a0e19039ab4444e811c8cff4e6f9b33331a0e02
PiperOrigin-RevId: 200709468
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tag all tests in //src/test/shell/bazel:* that do
not run on Windows yet with "no_windows".
See https://github.com/bazelbuild/bazel/issues/4292
Change-Id: I9823621d5ba4fc02bafe731c17bb7f32785c3b47
Closes #5408.
Change-Id: Ic3b9e8f96221ceff2ea33bfefa2814ba869af1ab
PiperOrigin-RevId: 200707716
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Background: the original code is implementing the OutputStream interface. Given a sequence of write calls, the code puts each of these writes into a queue. On the other side of the queue is an unbounded thread pool, which takes the writes off the queue one by one, and then does individual blocking writes with a fixed file offset.
There are three problems with the original code:
1. Writes are sent to the Kernel one-by-one. Imagine if the incoming writes a single-byte writes, then we do one kernel call for every single byte. This is the worst case.
2. Due to multithreading, the writes can get reordered. In the worst case, the order is reversed, and the kernel flushes each write to disk individually. Since the writes are not aligned to disk block boundaries, each write has to first *read* the block from disk, overwrite a few bytes, and then flush the block back to disk. On a spinning platter, this is the worst possible sequence of operations: write a block, read the same block back, write the same block again, read the same block back, etc., with each operation having to wait for a full disk rotation.
Note that this gets worse if there's high thread and / or disk contention, e.g., when running a build system in the background.
3. Due to the unbounded thread pool, it may end up creating a new thread for every single write (possibly as many as one per byte written). This is also the worst case, although it's probably negligible compared to 1+2.
Compared to that, this change uses an in-memory buffer before sending writes to the kernel so non-block sized writes are batched, it writes sequentially, and it uses a single thread created at the start. A single thread should be more than able to fully saturate local disk I/O, so multi-threading should ~never be a improvement here.
This might look different if we had perfectly aligned writes of an integer multiple of the disk block size to a distributed network file system or a local SSD raid. If you look at the clients of this class, that's definitely not the case: this code is primarily used for local file BEP transports - we wouldn't use local file BEP transports to write to a network file system, we'd use the BES instead. It's also used to write a couple of log files, also all local - otherwise we'd add the data to BEP. These are all unaligned, ~random-sized writes.
If we created a lot of these files, then using a thread pool with fewer threads than files and using non-blocking I/O might be an improvement due to the reduction in thread count, but I think it's very unlikely that we'll ever need that complexity.
PiperOrigin-RevId: 200694423
|
|
|
|
|
|
|
|
|
| |
Change-Id: I1039371e326dc260f2e70b32c9f4e2fd0dc0d7a6
Closes #5395.
Change-Id: I002ba4f0944594ab62a7dd7a3ed4b4e7438328c0
PiperOrigin-RevId: 200686443
|
|
|
|
|
|
|
|
| |
This should be a no-op, mostly replacing PathConverter with
BuildEventArtifactUploader, since none of the implementations perform any
upload yet.
PiperOrigin-RevId: 200685325
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that this is not sufficient to see caching between builds on its own;
currently when any flag changes, the analysis cache is reset. A follow-up
will turn off this behavior when only test flags change while
trim_test_configuration is on.
config_settings which examine test options are treated the same as test rules;
that is, they can only be successfully analyzed at the top level or when
connected to the top level by an unbroken chain of test rules.
RELNOTES: None.
PiperOrigin-RevId: 200614584
|
|
|
|
|
|
| |
*** Reason for rollback ***
PiperOrigin-RevId: 200605975
|
|
|
|
| |
PiperOrigin-RevId: 200593618
|
|
|
|
|
|
|
| |
Deprecates the flag, though it continues to exist as a no-op so that users get a warning before errors.
RELNOTES: --noexpand_configs_in_place is deprecated.
PiperOrigin-RevId: 200572053
|
|
|
|
| |
PiperOrigin-RevId: 200561008
|
|
|
|
|
|
| |
callables that depend on CToolchain in CppConfiguration.
PiperOrigin-RevId: 200559893
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When pretty printing a Skylark value, lists are presented as the
opening bracket on a line by itself, each entry on its own line,
and the closing bracket again on its own line. While this generally
improves readability, for the empty list this is not the case, as
the expression [] can easily be understood at a glance. In fact, the
additional line even makes the outer structure harder to see, as it
is spread over even more lines. Therefore, shorten the printing of
the empty list to be on a single line.
Change-Id: I032d1550b1f99bce47dbec7e77a4d5c6656d78a1
PiperOrigin-RevId: 200558784
|
|
|
|
|
|
|
|
|
|
|
| |
See https://github.com/bazelbuild/bazel/issues/4930
Change-Id: I148c0b1e4baa8ff44d86a6ee196bea7e9058320f
Closes #5387.
Change-Id: Iba32f21ff6cad1b538c72cfd08ce24846843c124
PiperOrigin-RevId: 200554084
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
frames in thread paused events.
I started implementing conditional breakpoints server-side in
unknown commit, but:
- client-side implementations seem more common in debugging protocols
- IntelliJ in particular has great support for client-side conditional
breakpoints, but poor support for server-side
- it's unnecessary extra complexity for the server -- simple line
breakpoints + evaluation requests already give us conditional bps.
Also removing frames from thread paused events. It results in poor
performance for stepping and pausing (in which we get frame info for
potentially dozens of threads), and again isn't usual for debuggers.
Finally, ignore breakpoints when performing a client-requested
evaluation.
PiperOrigin-RevId: 200547972
|
|
|
|
|
|
|
|
|
|
|
| |
Make all external repositories depend on an additional SkyValue controllable
via commands, so support unconditional fetching of all external repositories,
as it is needed by the the `sync` command.
Improves on #5175, provides a work around for #4907.
Change-Id: I30033614c1a2fad3f1363b85ff69cf92f697c255
PiperOrigin-RevId: 200543985
|
|
|
|
|
|
|
|
|
|
| |
To disambiguate:
- @foo refers to the external dependency @foo//:foo (as before this change).
- //@foo refers to the target //@foo:@foo (i.e. in the default workspace).
RELNOTES[NEW]: Allow @ in package names.
PiperOrigin-RevId: 200541716
|
|
|
|
|
|
|
| |
Move the testing class to the tests tree. This is in preparation for
dismantling BuildView and merging the relevant parts into AnalysisPhaseRunner.
PiperOrigin-RevId: 200532794
|
|
|
|
|
|
|
|
|
| |
constraints.
Closes #5341.
Change-Id: Ib74e59fec48102469a5039e045e3f3d0e0d86d8c
PiperOrigin-RevId: 200526448
|
|
|
|
|
|
| |
We could conceivably do some monkey-patching at server startup to make all lambdas act Serializable, but one step at a time.
PiperOrigin-RevId: 200509321
|
|
|
|
|
|
| |
not serialized. Tag TestCompletionValue and any ActionExecutionValue coming from a NotifyOnActionCacheHit (i.e., tests) like that. To make such values really not shared, request the ActionExecutionValue from TestCompletionFunction as opposed to the ArtifactValue (propagating the unshareable bit up seemed like too much fuss, and I have a dream of getting rid of ArtifactValue anyway).
PiperOrigin-RevId: 200504358
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 200471197
|
|
|
|
|
|
|
| |
stdout/stderr.
RELNOTES: None
PiperOrigin-RevId: 200459354
|
|
|
|
|
|
|
|
| |
and output groups.
* Make ctx a keyword argument so that we can more easily add more parameters in the future and eventually remove ctx.
PiperOrigin-RevId: 200453550
|
|
|
|
|
|
| |
package lookups to get Targets.
PiperOrigin-RevId: 200452642
|
|
|
|
|
|
|
|
| |
on that future.
This allows NestedSet deserialization not to block on storage reads - in-progress deserializations are simply made a member of the NestedSets they produce.
PiperOrigin-RevId: 200440131
|
|
|
|
| |
PiperOrigin-RevId: 200410988
|
|
|
|
|
|
| |
Onto #5328
PiperOrigin-RevId: 200410170
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 200399094
|
|
|
|
|
|
|
| |
This is in preparation for dismantling BuildView and merging the relevant
parts into AnalysisPhaseRunner.
PiperOrigin-RevId: 200391088
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the selection of C++ toolchain configuration depends on 2 different things:
1. CROSSTOOL file: a proto text file that contains multiple CrosstoolConfig.CToolchain messages, out of which we want to select the appropriate CToolchain;
2. cc_toolchain_suite rule, specified by --crosstool_top option: this rule contains "toolchains" map attribute. The map's keys are of type <cpu>|<compiler>, or just <cpu>, and the values are labels of cc_toolchain rules (which contain additional C++ information).
If there is an entry in cc_toolchain_suite.toolchains that corresponds to the --cpu and --compiler options, we use it, otherwise we loop through all the CToolchains in the CROSSTOOL file, select the one that corresponds to the --cpu and --compiler options, and then get the cc_toolchain label from cc_toolchain_suite.toolchains[toolchain.targetCpu|toolchain.compiler].
In both cases we read the CROSSTOOL file and pass all its information forward, to be used in creation of CppConfiguration and CcToolchainProvider creation.
As part of the efforts of rewriting CROSSTOOL in Skylark, we need to make obtaining the cc_toolchain label independent of the CROSSTOOL file and toolchain selection. As a step towards that goal, we add a new "toolchain_identifier" attribute to cc_toolchain, which uniquely identifies a CToolchain in the CROSSTOOL file.
Now the process of getting the CToolchain goes as follows:
Check for existence of cc_toolchain_suite.toolchains[<cpu>|<compiler>], if --compiler is specified, otherwise check for cc_toolchain_suite.toolchains[<cpu>].
1. if a value is found, load the cc_toolchain rule and look for the toolchain_identifier attribute.
1.a if the attribute exists, loop through all the CToolchains in CROSSTOOL and select the one with the matching toolchain identifier.
1.b otherwise fall back to selecting the CToolchain from CROSSTOOL by matching the --cpu and --compiler values.
2. If a value is not found, select the CToolchain from CROSSTOOL by matching the --cpu and --compiler values, and construct the key as follows: <toolchain.cpu>|<toolchain.compiler>.
In the future we will get rid of 2. by making sure that cc_toolchain_suite.toolchains[<cpu>|<compiler>] and cc_toolchain_suite.toolchains[<cpu>] are always defined.
1.b will be removed by making the cc_toolchain.toolchain_identifier attribute mandatory
After this deriving the cc_toolchain label will be independent of the CROSSTOOL file
1.a will ultimately be replaced by an attribute that points to a skylark_crosstool rule, that will contain all the information that CROSSTOOL contains, allowing us to remove CROSSTOOL altogether.
Work towards issue #5380
RELNOTES: None.
PiperOrigin-RevId: 200388550
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
PathFragments are not well supported in Skylark, quite the opposite, the Skylark
team tries hard to not use path fragments if possible. All existing users I
looked into had to convert the PathFragment to string using str() anyway.
Because of that this cl should not break anybody.
RELNOTES: None.
PiperOrigin-RevId: 200372447
|
|
|
|
|
| |
RELNOTES:none
PiperOrigin-RevId: 200366616
|
|
|
|
| |
PiperOrigin-RevId: 200363345
|
|
|
|
|
|
|
|
|
| |
This helps avoid name conflicts when users want to generate DEF files by themselves. For example, when using a genrule to do that, people naturally name the def file as <target name>.def.
Fixed https://github.com/bazelbuild/bazel/issues/5357
RELNOTES: None
PiperOrigin-RevId: 200354303
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 200351084
|
|
|
|
|
|
|
|
|
| |
On Windows, extracting file symlink in an archive would be performed as copy. To ensure the copy will be successful, we defer all symlink creation after all regular files are extracted.
Fix https://github.com/bazelbuild/bazel/issues/5367
RELNOTES: None.
PiperOrigin-RevId: 200345463
|
|
|
|
|
|
|
|
|
| |
unit test coverage for this.
Note that ActionFS is not generic enough to make use of FileSystemTest.
RELNOTES: None
PiperOrigin-RevId: 200304871
|
|
|
|
|
|
|
|
| |
--experimental_android_local_test_binary_resources to true.
RELNOTES[NEW]: android_local_test now takes advantage of Robolectric's binary resource processing which allows for faster tests.
PiperOrigin-RevId: 200296572
|
|
|
|
|
|
|
|
|
| |
If this exception is thrown, performance no longer matters - we're detonating
the place and riding the explosion out to stderr. So we might as well just
dump everything we know.
RELNOTES: None.
PiperOrigin-RevId: 200290439
|
|
|
|
|
|
|
|
| |
invalidate the BUILD_INFO_KEY node on --workspace_status_command and related flag changes. Instead, the action has a supplier that allows it to retrieve the correct values at execution time.
This does not sacrifice correctness because the action executes unconditionally on every build, so it will never have stale data.
PiperOrigin-RevId: 200265375
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When bazel calls wrapped_clang, it single-quotes all arguments. However
it passes flags with arguments quoted as a whole. That is, wrapped_clang
will be called with arguments like these:
wrapped_clang '-isysroot /a/path/with spaces' '/a/file with spaces.m'
Before this commit, wrapped_clang was blindly splitting on space and
calling clang with invalid arguments. Now it only splits on the _first_
space, and only if the argument starts with '-'.
Closes #5147.
PiperOrigin-RevId: 200259496
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a --experimental_generate_json_trace_profile option that puts a file into
the output base (or uses --profile if set).
There are still a lot of problems with this.
- unexplained holes
- way too many threads
- nonsensical event titles
- too many detail events, too little overview
- it may also cause unnecessary load
- it silently overwrites the existing file on subsequent invocations
The format is documented here: goo.gl/oMZPLh
PiperOrigin-RevId: 200259431
|
|
|
|
| |
PiperOrigin-RevId: 200247872
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
repository name is remapped.
For example if main/WORKSPACE contains:
local_repository(
name = "a",
path = "../a",
repo_mapping = {"@x" : "@y"},
)
a/BUILD
load("@x//:sample.bzl", "sample")
Then the load in a/BUILD will be resolved as "@y//:sample.bzl"
RELNOTES: None
PiperOrigin-RevId: 200227431
|
|
|
|
|
|
| |
Temporary workaround for #5328.
PiperOrigin-RevId: 200224317
|