| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
than the graph version when that is feasible.
* It's not feasible when the computation accesses outside state, i.e. is non-hermetic, so see below.
* It's also more complicated (and not worth the trouble) when the computation is taking place just for the error status.
Have SkyFunctionName declare whether the function it corresponds to is hermetic or non-hermetic. Only non-hermetically-generated SkyValues can be directly marked changed, and non-hermetic SkyFunctions have their values saved at the graph version, not the max of the child versions. All SkyFunctions are hermetic except for the ones that can be explicitly dirtied.
A marked-hermetic SkyFunction that has a transient error due to filesystem access can be re-evaluated and get the correct version: if it throws an IOException at version 1 and then, when re-evaluated at version 2 with unchanged dependencies, has a value, the version will be version 1.
All Skyframe unit tests that were doing non-hermetic things to nodes need to declare that those nodes are non-hermetic. I tried to make the minimal set of changes there, so that we had good incidental coverage of hermetic+non-hermetic nodes. Also did some drive-by clean-ups around that code.
Artifacts are a weird case, since they're doing untracked filesystem access (for source directories). Using max(child versions) for them gives rise to the following correctness bug: 1. do a build at v1 that creates a FileStateValue for dir/ at v1. Then at v2, add a file to dir/ and do a build that consumes dir/ as a source artifact. Now the artifact for dir/ will (incorrectly) have v1. Then at v1, do that build again. We'll consume the "artifact from the future". However, this can only have an effect when using the local action cache, since the incorrect value of the artifact (the mtime) is only consumed by the action cache. Bazel is already broken in this way (incremental builds don't invalidate directories), so this change doesn't make things worse.
PiperOrigin-RevId: 204210719
|
|
|
|
|
|
|
| |
https://github.com/bazelbuild/bazel/commit/732dc512801c32207c252a76ca8d9e5544560339.
RELNOTES: Allow @ in package names.
PiperOrigin-RevId: 203270369
|
|
|
|
|
|
|
| |
Fixed https://github.com/bazelbuild/bazel/issues/5485
RELNOTES: None
PiperOrigin-RevId: 202903823
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 202360925
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 202167782
|
|
|
|
|
|
|
| |
label methods that don't explicitly pass a repository mapping.
RELNOTES: None
PiperOrigin-RevId: 201717665
|
|
|
|
|
|
|
|
| |
RELNOTES: None
*** Reason for rollback ***
PiperOrigin-RevId: 201686843
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
files within external repositories.
For example:
a/BUILD
genrule(
name = "a",
srcs = ["@x//:x.txt"],
outs = ["result.txt"],
cmd = "echo hello > \$(location result.txt)"
)
If the main workspace file references that repository with a rule:
local_repository(
name = "other_repo",
path = "../a",
repo_mapping = {"@x" : "@y"}
)
Then when a/BUILD is evaluated, the string "@x//:x.txt" will be turned into a Label "@y//:x.txt"
RELNOTES: None
PiperOrigin-RevId: 201562148
|
|
|
|
|
|
| |
RELNOTES[NEW]: Allow @ in package names.
PiperOrigin-RevId: 201487916
|
|
|
|
|
|
| |
*** Reason for rollback ***
PiperOrigin-RevId: 200605975
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
It was tracking filtered tests and then applying the filter at the next higher
level.
I also added a bunch of comments - we actually have four implementations of
test suite expansion, and they are not consistent. Sorry about that.
PiperOrigin-RevId: 199629485
|
|
|
|
| |
PiperOrigin-RevId: 199007753
|
|
|
|
| |
PiperOrigin-RevId: 196719433
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Partly addresses #374.
Specifically allow !%^`"'&;<>?[]{|} in target and package names. It's actually
simpler now to declare what we don't allow. In target names:
0-31 (control characters)
58 ':' (colon)
92 '\' (backslash)
127 (delete)
In package names:
0-31 (control characters)
58 ':' (colon)
64 '@' (at-sign)
92 '\' (backslash)
127 (delete)
- '\' is a path segment separator on Windows, and allowing it can lead to
silent output file conflicts and - therefore - data corruption. We may be
able to allow it in the future, but I didn't want to make that call.
- ':' is a special character that Bazel interprets as the package name / target
name separator.
- '@' in package names can probably be allowed; at the beginning of a label it
indicates a workspace name, but not within a segment. We actually have some
tests that disallow it specifically, but those can probably just be deleted;
however, it does require a bit of investigation, so I decided to delay that
change.
It is possible that we don't correctly escape filenames in all cases. Also note
that the shell may require escaping for specific characters, and that Bazel
treats a single '*' (star) target name specially when given on the command
line.
RELNOTES: Bazel now allows almost all 7-bit ASCII characters in labels.
PiperOrigin-RevId: 196650651
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
breaks guitar tests
*** Original change description ***
Disallow labels of the form ////foo.
RELNOTES: Labels of the form ////foo are disallowed.
PiperOrigin-RevId: 192393660
|
|
|
|
|
| |
RELNOTES: Labels of the form ////foo are disallowed.
PiperOrigin-RevId: 192329081
|
|
|
|
| |
PiperOrigin-RevId: 187956593
|
|
|
|
| |
PiperOrigin-RevId: 187945746
|
|
|
|
| |
PiperOrigin-RevId: 187397314
|
|
|
|
|
|
|
|
|
| |
lib.analysis.actions -> lib.actions.
These are fundamental types that want to sit alongside types like Spawn.
RELNOTES: None
PiperOrigin-RevId: 185887971
|
|
|
|
|
|
|
|
| |
a strict win:
There are only two places Canonicalizer did PathFragment interning: PackageIdentifier creation and Package creation. PackageIdentifiers are always interned by a separate interner, and so the underlying PathFragment will be in 1-1 correspondence with PackageIdentifiers (per repo). Moreover, Packages are created with a PackageIdentifier already existing, so it will use the same PathFragment of the unique PackageIdentifier.
PiperOrigin-RevId: 185877942
|
|
|
|
|
|
| |
by cc_library.
PiperOrigin-RevId: 185729248
|
|
|
|
|
|
| |
(Des|S)erializationContext.
PiperOrigin-RevId: 185547740
|
|
|
|
|
|
|
|
| |
We already intern the labels themselves. Benchmarks do not show any further
gain by interning the label names.
RELNOTES: None
PiperOrigin-RevId: 185394812
|
|
|
|
|
|
|
|
|
|
| |
Context implementations are currently empty, just doing the plumbing in this
change. Once this is in we can start passing along the ObjectCodecRegistry, which
will allow runtime codec resolution for classes not known at compile time.
We'll also inevitably add some memoization helpers, allowing us to optimize the
serialization process further.
PiperOrigin-RevId: 185305674
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Path and PathFragment have been replaced with String-based implementations. They are pretty similar, but each method is dissimilar enough that I did not feel sharing code was appropriate.
A summary of changes:
PATH
====
* Subsumes LocalPath (deleted, its tests repurposed)
* Use a simple string to back Path
* Path instances are no longer interned; Reference equality will no longer work
* Always normalized (same as before)
* Some operations will now be slower, like instance compares (which were previously just a reference check)
* Multiple identical paths will now consume more memory since they are not interned
PATH FRAGMENT
=============
* Use a simple string to back PathFragment
* No more segment arrays with interned strings
* Always normalized
* Remove isNormalized
* Replace some isNormalizied uses with containsUpLevelReferences() to check if path fragments try to escape their scope
* To check if user input is normalized, supply static methods on PathFragment to validate the string before constructing a PathFragment
* Because PathFragments are always normalized, we have to replace checks for literal "." from PathFragment#getPathString to PathFragment#getSafePathString. The latter returns "." for the empty string.
* The previous implementation supported efficient segment semantics (segment count, iterating over segments). This is now expensive since we do longer have a segment array.
ARTIFACT
========
* Remove Path instance. It is instead dynamically constructed on request. This is necessary to avoid this CL becoming a memory regression.
RELNOTES: None
PiperOrigin-RevId: 185062932
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
An upcoming replacement to PathFragment will not have efficient segment semantics, causing code to become unnecessarily inefficient.
RELNOTES: None
PiperOrigin-RevId: 182553098
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both members of Label (String & PackageIdentifier) have memoized hash codes so
this should be marginally more expensive but probably not noticably so. The
benefit is it makes Label objects smaller in certain vm conditions.
As to why things were the way they were, I believe this is from before
PackageIdentifier memoized its hashCode.
RELNOTES: None
PiperOrigin-RevId: 181362077
|
|
|
|
| |
PiperOrigin-RevId: 179588512
|
|
|
|
| |
PiperOrigin-RevId: 178994972
|
|
|
|
|
|
| |
make cmdline and vfs depend on serialization. This allows a class to have a pointer to its codec, which simplifies automatic recursive composite codecs.
PiperOrigin-RevId: 178683500
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
This more clearly indicates what this is. Also change some hard-coded uses to
use the constant instead.
PiperOrigin-RevId: 173658659
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]: The flag --incompatible_descriptive_string_representations is no
longer available, old style string representations of objects are not supported
anymore.
PiperOrigin-RevId: 171952621
|
|
|
|
|
|
|
|
|
| |
Split collect, concurrent, vfs, windows into package-level BUILD files.
Move clock classes out of "util", into their own Java package.
Move CompactHashSet into its own Java package to break a dependency cycle.
Give nestedset and inmemoryfs their own package-level BUILD files.
PiperOrigin-RevId: 167702127
|
|
|
|
| |
PiperOrigin-RevId: 167047092
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 165705342
|
|
|
|
|
|
|
|
|
|
| |
roots
It also changes a few accessors of utility methods in Skyframe library. It
refactors the QueryExpressionMapper to use a general QueryExpressionVisitor.
RELNOTES: None
PiperOrigin-RevId: 165534908
|
|
|
|
|
|
|
| |
Label without validation.
RELNOTES: None
PiperOrigin-RevId: 164479651
|
|
|
|
|
|
|
| |
ctor. This is completely wasteful in the common case of the PathFragment already being normalized.
RELNOTES: None
PiperOrigin-RevId: 164022960
|
|
|
|
|
|
|
| |
RecursivePackageProvider dealing with the concept of "excluded directories".
RELNOTES: None
PiperOrigin-RevId: 163074794
|
|
|
|
|
|
|
| |
Almost all implementations simply return this, all of which can be removed
now.
PiperOrigin-RevId: 163046912
|
|
|
|
|
|
|
|
|
| |
Skylark's Printer.BasePrinter doesn't guarantee it will call `.toString` on
objects of unknown types, and in the future that won't be the case anymore.
In order to keep their current string representations objects should implement
the SkylarkValue interface by providing an explicit implementation of `repr`.
PiperOrigin-RevId: 161526182
|
|
|
|
|
|
|
|
|
|
| |
It appeared in the docs that the function had no
argument.
Fixes https://github.com/bazelbuild/bazel/issues/3339
RELNOTES: none
PiperOrigin-RevId: 161388878
|
|
|
|
|
|
|
|
|
|
|
| |
If --incompatible_descriptive_string_representations is passed, labels are converted
to strings using `repr` differently: `Label("//package:name")` instead of
`"//package:name"`
This CL doesn't affect representations of other object types but provides the
necessary infrastructure for it.
PiperOrigin-RevId: 160955284
|
|
|
|
|
|
|
| |
It's now easier to customize Printer if in different situations objects should
be printed differently. Also its API is cleaner now. Names of methods of SkylarkValue objects now reflect names of Skylark functions: SkylarkValue#repr and SkylarkPrintableValue#str.
PiperOrigin-RevId: 160635154
|