| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an option to provide a file with a resolved value, that will be
used to verify that the repositories mentioned in this file produce
a correct directory tree.
RELNOTES: newly added options --experimental_repository_hash_file and
--experimental_verify_repository_rules allow to verify for repositories
the directory generated against pre-recorded hashes. See documentation
for those options.
Work towards #5660.
Change-Id: I2d8becb188d0fa51e890fb8f6139f321cca14b7b
PiperOrigin-RevId: 206016792
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 202360925
|
|
|
|
|
|
|
|
|
|
| |
Not all bazel external repositories are generated by a rule (e.g., they might
be unbound names with the expectation that on override binds them). Still,
even those external repositories depend on changes to the repository override.
Register this dependency.
Change-Id: I900c94f969d08dec82c5776eff28337878379b5e
PiperOrigin-RevId: 200974283
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
(minor) ActionFS now implements MetadataProvider.getInput
PiperOrigin-RevId: 199575194
|
|
|
|
| |
PiperOrigin-RevId: 195100670
|
|
|
|
|
|
|
|
|
|
|
|
| |
While we still recommend to name repositories in canonical way, a canonical way
can not always be ensured, e.g., if different versions of the same external
repository have to be used. Our design for upcoming renaming repositories honors
this observation. So remove the old warning about the name in an external
repository's WORKSPACE file not matching the name given to it in the global
WORKSPACE file; we certainly will not make this an error in the future.
Change-Id: I5eef92ec61dc81d25734d71187a635024630322c
PiperOrigin-RevId: 192114195
|
|
|
|
|
|
|
|
|
| |
work done by BazelPackageBuilderHelperForTesting#sanityCheckBazelPackageLoader.
We fix this flakiness by _not_ having RepositoryDelegatorFunction unconditionally 'fetch' local repos. We then have to make a change to BazelPackageLoader test to reinstate these mutations, since it was only working before due to the unconditional filesystem mutations done here :p
RELNOTES: None
PiperOrigin-RevId: 190222830
|
|
|
|
|
|
|
|
|
| |
Given a target (for example from a skylark aspect), one will be able to access a list of actions that the target generated using "target.actions". This is without additional memory footprint.
Actions themselves are not fully exposed to skylark (and thus there isn't much meaning to gather from them in skylark yet). Access methods will follow soon.
RELNOTES: None.
PiperOrigin-RevId: 188098079
|
|
|
|
|
|
|
|
| |
doesn't save memory in the 32-bit case, but makes it easier for people to see how many SkyKeys we have.
There's some unnecessary interning in tests, but it was easier to copypasta and doesn't harm anything, I think.
PiperOrigin-RevId: 187694309
|
|
|
|
|
|
|
| |
An upcoming replacement to PathFragment will not have efficient segment semantics, causing code to become unnecessarily inefficient.
RELNOTES: None
PiperOrigin-RevId: 182553098
|
|
|
|
|
|
| |
This makes it clearer that the path fragments in question are relative *to the root*. Confusingly, when the root is absolute, the root relative fragment is also absolute. This makes it a tiny bit clearer that the path fragment may be absolute.
PiperOrigin-RevId: 182544893
|
|
|
|
|
|
|
| |
nonconfigurable.
RELNOTES: generator_* attributes are nonconfigurable.
PiperOrigin-RevId: 182443578
|
|
|
|
|
|
|
|
| |
An absolute root accepts any absolute path fragments and simply returns it.
This concept replaces the FileSystem root directory concept.
PiperOrigin-RevId: 182400471
|
|
|
|
|
|
|
|
|
|
|
| |
This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions.
Roots are used by RootedPaths and ArtifactRoots.
This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes.
RELNOTES: None
PiperOrigin-RevId: 182271759
|
|
|
|
|
|
|
| |
Most places handle them the same way as IOException, which seems like a safe
default. The places that do care can still throw or catch the more specific type.
PiperOrigin-RevId: 181719688
|
|
|
|
|
|
| |
Fixes #4391.
PiperOrigin-RevId: 180963440
|
|
|
|
|
|
| |
rules/repository package.
PiperOrigin-RevId: 178087895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of assuming BUILD.
- Default the list to the same value as PackageLookupFunction:
BUILD.bazel, BUILD.
- Move BuildFileNames to the packages package, so it is more generally
available.
Part of #4056.
Change-Id: Ie12512b492cd7d47a9e56ec3bc209f829feaf4b5
PiperOrigin-RevId: 177261295
|
|
|
|
| |
PiperOrigin-RevId: 175832159
|
|
|
|
|
|
|
| |
This more clearly indicates what this is. Also change some hard-coded uses to
use the constant instead.
PiperOrigin-RevId: 173658659
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
of depending on a precomputed value. BlazeDirectories don't change over the lifetime of the Blaze server, and certainly not over the lifetime of a SkyframeExecutor instance, which already had a reference to them.
Step 2.
PiperOrigin-RevId: 169711443
|
|
|
|
|
|
| |
This is a trivial change with a large file footprint.
PiperOrigin-RevId: 169169864
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...or any other non repository rule.
Using a bind rule as the name of the repository was returning
a strange error "could not find handler for bind rule" which was
not useful, so was replaced by a crash.
Fixes #3664
Change-Id: Id0711470e6a1ab9267e05eb273900b18d0a27d6b
PiperOrigin-RevId: 167706825
|
|
|
|
|
|
|
|
|
| |
Also moves parenthetical remark to a completely different sentence, as
it seemed off where it was.
Closes #3657.
PiperOrigin-RevId: 167558504
|
|
|
|
|
|
|
|
|
| |
The only case this exception is thrown is when there is
a bug in Bazel and we should surface the whole stacktrace.
See #3664
PiperOrigin-RevId: 167492638
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will encourage new users to avoid it, and would have helped me. At
the start, I cargo-culted other projects that use bind() heavily without
knowing why.
Related: #1952
Closes #3608.
PiperOrigin-RevId: 166464352
|
|
|
|
|
|
|
| |
https://www.bazel.build/designs/2016/10/18/repository-invalidation.html
Change-Id: I6cb01397a35cd32169a0e415f8d7f944e7d840df
PiperOrigin-RevId: 166200841
|
|
|
|
|
|
|
| |
This is part of splitting up the build-base library into separate libraries for
analysis, exec, and rules.
PiperOrigin-RevId: 164446955
|
|
|
|
|
|
|
| |
This is part of splitting up the build-base library into separate libraries
for analysis, exec, and rules.
PiperOrigin-RevId: 164438390
|
|
|
|
|
|
|
|
|
|
|
|
| |
I think this code predates being able to load Skylark .bzl files
from the WORKSPACE. As most non-trivial projects are using load()
in the WORKSPACE, it's fairly uninformative to say "it was
defined in the WORKSPACE file" for this error.
This is to help debug the Tensorflow issue (#3478) but should
generally be more useful than the current message.
PiperOrigin-RevId: 164118176
|
|
|
|
|
|
|
| |
Fixed https://github.com/bazelbuild/bazel/issues/3344#issuecomment-314167833
RELNOTES: None
PiperOrigin-RevId: 161500109
|
|
|
|
|
|
|
|
|
| |
If --incompatible_descriptive_string_representations is passed, configured
targets are converted to strings using `str`, `repr` and `print` functions
differently (more descriptive, without leaking information that shouldn't
be accessible).
PiperOrigin-RevId: 161212989
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And for new_XX_repository rules, add BUILD and WORKSPACE file into
markerData.
In markerData, key starting with FILE: can be an absolute label or an
absoulte path, but the latter one will be depracated in future.
Fixed https://github.com/bazelbuild/bazel/issues/3093
Change-Id: Ic3e16c123b3f1f781ab12c41d13f5e540b05686c
PiperOrigin-RevId: 160382024
|
|
|
|
|
|
|
| |
rule class.
Change-Id: Iaa830658a62de661f16e100d24b2d1a3e66af638
PiperOrigin-RevId: 159104714
|
|
|
|
|
| |
Change-Id: I3f6664768791a63bf2f9e254b290d07623336ef6
PiperOrigin-RevId: 158902487
|
|
|
|
|
|
| |
wrapper objects: for OwnedArtifacts, which are the most numerous during builds, and for Labels for TransitiveTraversalValues, which are the most numerous during queries.
PiperOrigin-RevId: 154989520
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Original CL was rolled backed incorrectly. See post-submit discussion on http://https://github.com/bazelbuild/bazel/commit/7beadb7277453efec7e12b925005e7f0e003b592.
*** Original change description ***
Automated g4 rollback of commit 38b835097f9ae9a6062172b8a33ec2e2d1edde20.
*** Reason for rollback ***
Breaking Bazel build on linux, see http://ci.bazel.io/job/bazel-tests/733/
Repro: bazel build //src/test/java/com/google/devtools/build/lib:packages_test
Found by bisecting.
*** Original change description ***
Only allocate some formerly frequently allocated PathFragment objects once.
This reduces both gc churn and retained memory usage.
RELNOTES: None
PiperOrigin-RevId: 154839279
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaking Bazel build on linux, see http://ci.bazel.io/job/bazel-tests/733/
Repro: bazel build //src/test/java/com/google/devtools/build/lib:packages_test
Found by bisecting.
*** Original change description ***
Only allocate some formerly frequently allocated PathFragment objects once.
This reduces both gc churn and retained memory usage.
RELNOTES: None
PiperOrigin-RevId: 154821457
|
|
|
|
|
|
| |
This reduces both gc churn and retained memory usage.
PiperOrigin-RevId: 154718782
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
The go rules have tons of transitive dependencies that are not declared in their "local" WORKSPACE files, so this broke lots of projects on ci.bazel.build
I'll fix up the go rules, update all of _their_ reverse-dep projects, and resubmit.
*** Original change description ***
Repositories can only be accessed in projects that define them in their WORKSPACE file
This is prep for #1943 - hierarchical workspace loading.
RELNOTES[INC]: Remote repositories must define any remote repositories they
themselves use (e.g., if @x//:foo depends on @y//:bar, @y must be defined
in @x's WORKSPACE file).
PiperOrigin-RevId: 154321845
|
|
|
|
|
|
|
|
|
|
|
|
| |
WORKSPACE file
This is prep for #1943 - hierarchical workspace loading.
RELNOTES[INC]: Remote repositories must define any remote repositories they
themselves use (e.g., if @x//:foo depends on @y//:bar, @y must be defined
in @x's WORKSPACE file).
PiperOrigin-RevId: 154295762
|
|
|
|
|
|
|
|
|
|
|
| |
file.
Fixes #2841.
RELNOTES: Every local_repository now requires a WORKSPACE file.
Change-Id: I11d50b852796b8f919b1a61c8c9b59cb78c5b724
PiperOrigin-RevId: 154179215
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to lookup repositories as part of converting exec paths to artifacts,
which in turn is needed for action cache lookups. These lookups should not
cause a Skyframe exit, so we must not throw an exception here, unless the
error makes it impossible to continue. Instead, we need to leave the decision
whether to error out or not to the caller.
Note that we may unnecessarily fetch a remote repository in order to do the
action cache lookup, even if the action no longer depends on the input file,
although this should only be possible for C++ compile actions. It's possible
that there's another bug in the C++ compile action key computation that also
contributes.
This change also makes it so that the post-resolution action cache code
ignores any errors wrt. repository lookup rather than throwing. If any of the
paths could not be found, then the action cache lookup fails and we re-execute
the corresponding action, which is exactly what should happen.
Fixes #2759.
PiperOrigin-RevId: 153696243
|
|
|
|
|
|
|
|
|
|
|
| |
RELNOTES: Adds a --override_repository option that takes a repository
name and path. This forces Bazel to use the directory at that path
for the repository. Example usage:
`--override_repository=foo=/home/user/gitroot/foo`.
Fixes #1266
PiperOrigin-RevId: 153599291
|
|
|
|
|
|
|
|
|
|
|
|
| |
'create' method.
This paves the way for changing PathFragment to e.g. an abstract class with multiple subclasses. This way we can split out the windows-specific stuff into one of these concrete classes, making the code more readable and also saving memory (since the shallow heap size of the NonWindowsPathFragment subclass will hopefully be smaller than that of the current PathFragment).
This also lets us pursue gc churn optimizations. We can now do interning in PathFragment#create and can also get rid of unnecessary intermediate PathFragment allocations.
RELNOTES: None
PiperOrigin-RevId: 152145768
|
|
|
|
|
|
|
|
| |
new_foo_repository rules.
Change-Id: Iadcc24bb2a207126cec9aa31faba6d76ee80da41
PiperOrigin-RevId: 151739968
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The name attribute gets special treatment in the codebase, in that
it's not simply yet another attribute but stored in it's own field.
Thus, every callside dealing with attributes needs to be aware of
this special case and explicitly handle the name attribute. It's
easy to see that this can lead to bugs. For example, querying for
the name attribute is currently broken due the querying code not
being aware of the special case [1].
Discussions with experienced bazel developers came to the conclusion
that there is no need (anymore) to treat the name attribute specially
and thus we decided it's best to remove the special treatment and
handle the name attribute as any other attribute.
This change removes the handling of name attributes and also adds a test
case to verify that bug [1] is fixed.
[1] https://github.com/bazelbuild/bazel/issues/278
--
PiperOrigin-RevId: 147446345
MOS_MIGRATED_REVID=147446345
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This environ attribute let the repository rule implementor describes
on which environment variable change a repository should be refetched.
RELNOTES[NEW]: environ parameter to the repository_rule function let
defines a list of environment variables for which a change of value
will trigger a repository refetching.
Design doc: https://bazel.build/designs/2016/10/18/repository-invalidation.html [step 3 & 4]
Fixes #1595.
--
Change-Id: Ibc2f93e69cb08baf86107cc9a9428b7a0eba1bac
Reviewed-on: https://cr.bazel.build/8139
PiperOrigin-RevId: 147345203
MOS_MIGRATED_REVID=147345203
|