| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
'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
|
|
|
|
|
|
|
|
|
|
|
| |
This now also checks symlink maps for null pointers, which it previously did
not. Unfortunately, there's still one case where we add a null target to
Runfiles (to represent an empty file) - this happens in Runfiles itself, and
this change prevents any callers from doing so.
--
PiperOrigin-RevId: 150634481
MOS_MIGRATED_REVID=150634481
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 150623623
MOS_MIGRATED_REVID=150623623
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Break bazel-tests and many other jobs on CI.
http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/651/console
*** Original change description ***
Add SpawnInputExpander helper class to arrange runfiles for spawn strategies
This new class is a combination of SpawnHelper and our internal code; the
plan is to migrate all spawn strategies to the new class. The strict flag
should be enabled by default, but that's a breaking change, so we need to do
it later.
- Use it in SandboxStrategy.
- Add ActionInput.getExecPath to return a PathFragment; this avoids lots of
back and forth between path fragments and strings.
This is a step towards #159...
***
--
PiperOrigin-RevId: 150610616
MOS_MIGRATED_REVID=150610616
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new class is a combination of SpawnHelper and our internal code; the
plan is to migrate all spawn strategies to the new class. The strict flag
should be enabled by default, but that's a breaking change, so we need to do
it later.
- Use it in SandboxStrategy.
- Add ActionInput.getExecPath to return a PathFragment; this avoids lots of
back and forth between path fragments and strings.
This is a step towards #1593.
--
PiperOrigin-RevId: 150427021
MOS_MIGRATED_REVID=150427021
|
|
|
|
|
|
|
|
| |
annotations.
--
PiperOrigin-RevId: 150088575
MOS_MIGRATED_REVID=150088575
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Broke tests on CI: http://ci.bazel.io/job/bazel-tests/570/
*** Original change description ***
Roll forward execroot change
RELNOTES[INC]: Previously, an external repository would be symlinked into the
execution root at execroot/local_repo/external/remote_repo. This changes it to
be at execroot/remote_repo. This may break genrules/Skylark actions that
hardcode execution root paths. If this causes breakages for you, ensure that
genrules are using $(location :target) to access files and Skylark rules are
using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc.
functions. Cust...
--
PiperOrigin-RevId: 147833177
MOS_MIGRATED_REVID=147833177
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]: Previously, an external repository would be symlinked into the
execution root at execroot/local_repo/external/remote_repo. This changes it to
be at execroot/remote_repo. This may break genrules/Skylark actions that
hardcode execution root paths. If this causes breakages for you, ensure that
genrules are using $(location :target) to access files and Skylark rules are
using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc.
functions. Custom crosstools that hardcode external/<repo> paths will have to
be updated.
Issue #1262.
--
PiperOrigin-RevId: 147726370
MOS_MIGRATED_REVID=147726370
|
|
|
|
|
|
|
|
| |
--
Change-Id: I9ec3209a69ba5a51943b334f278ba93d67d4f9f4
Reviewed-on: https://cr.bazel.build/8090
PiperOrigin-RevId: 143470915
MOS_MIGRATED_REVID=143470915
|
|
|
|
|
|
|
|
|
| |
This is a quick way to make it possible for Skylark rules to aggregate
and pass on symlinks from their dependencies.
--
PiperOrigin-RevId: 143111353
MOS_MIGRATED_REVID=143111353
|
|
|
|
|
|
|
|
|
|
| |
Fixes #1109
Closes #2126.
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/2126
MOS_MIGRATED_REVID=140217086
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks TensorFlow and other Bazel jobs on ci.bazel.io
*** Original change description ***
Change execution root for external repositories to be ../repo
Some of the important aspect of this change:
* Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name).
* Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository).
* Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl.
Fixes #1262.
RELNOTES[INC]: Previously, an external repository would be symlinked into the
execution root at execroot/local_repo/external/remote_repo. This changes it to
be at execroot/remote_repo. This may break genrules/Skylark actions that
hardcode execution root paths. If this causes breakages for you, ensure that
genrules are using $(location :target) to access files and Skylark rules are
using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc.
functions.
Roll forward of bdfd58a.
--
MOS_MIGRATED_REVID=133709658
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the important aspect of this change:
* Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name).
* Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository).
* Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl.
Fixes #1262.
RELNOTES[INC]: Previously, an external repository would be symlinked into the
execution root at execroot/local_repo/external/remote_repo. This changes it to
be at execroot/remote_repo. This may break genrules/Skylark actions that
hardcode execution root paths. If this causes breakages for you, ensure that
genrules are using $(location :target) to access files and Skylark rules are
using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc.
functions.
Roll forward of bdfd58a.
--
MOS_MIGRATED_REVID=133606309
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=126081020
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=125160288
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
repositories
One interesting side effect of how this is implemented is that for external
repositories, bin/ and genfiles/ are combined. External repo output is under
bazel-out/local-fastbuild/repo_name for each repo.
Fixes #1262.
RELNOTES[INC]: Previously, an external repository would be symlinked into the
execution root at execroot/local_repo/external/remote_repo. This changes it to
be at execroot/remote_repo. This may break genrules/Skylark actions that
hardcode execution root paths. If this causes breakages for you, ensure that
genrules are using $(location :target) to access files and Skylark rules are
using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc.
functions.
--
MOS_MIGRATED_REVID=125095799
|
|
|
|
|
|
|
|
|
| |
The major piece of #848.
RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles.
--
MOS_MIGRATED_REVID=120722312
|
|
|
|
|
|
|
|
| |
This isn't hooked up to anything yet, but is another piece of getting #848
rolled forward.
--
MOS_MIGRATED_REVID=120582973
|
|
|
|
|
|
|
|
|
| |
Breaking up the runfiles tree change into some smaller changes this time around.
First step of rolling forward #848.
--
MOS_MIGRATED_REVID=120553288
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 790d2f6009d47fe92cf0cd92a1473bbf0141f32e.
*** Reason for rollback ***
Broke non-Bazel projects on ci.bazel.io
Fixes #1168
*** Original change description ***
Move the runfiles for external repositories to under the x.runfiles/ directory
This also sets the Bazel workspace name to io_bazel_source.
Fixes #848.
Relevant to #1116, #1124,
RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles....
***
--
MOS_MIGRATED_REVID=120535721
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=120442698
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=120433463
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=120418505
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also sets the Bazel workspace name to io_bazel_source.
Fixes #848.
Relevant to #1116, #1124,
RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles.
---
Furthermore, if a Bazel project does not provide a workspace name in the WORKSPACE file, Bazel will now default to using __main__ as the workspace name (instead of "", as previously). The repository's runfiles will appear under x.runfiles/__main__/.
--
MOS_MIGRATED_REVID=120224534
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is important for packaging Python code in a way which is compatible
with the way Bazel builds its standard runfiles directory.
Refs #671
--
Change-Id: Ica2adab481cfecabb84b608cd952b0cae5a8653c
Reviewed-on: https://bazel-review.googlesource.com/#/c/2900/
MOS_MIGRATED_REVID=119945845
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Skylark rule context object has a runfiles method. This adds two
optional parameters to that method, "symlinks" and "root_symlinks",
that expose functionality from the underlying Runfiles java class.
With this functionality, one can construct links in the runfiles tree
where the source and destination of the link have different names
and/or relative directories. This might be useful for things like
AppEngine rules where a file in a subdirectory of the source tree
needs to appear in the root directory of the runfiles tree.
If either new parameter is used, the runfiles is subject to stricter
validity checking. This checking propagates to other runfiles that
depend on it.
RELNOTES: Added "root_symlinks" and "symlinks" parameters to Skylark
runfiles() method.
--
MOS_MIGRATED_REVID=116879064
|
|
|
|
|
|
|
|
|
| |
A runfile conflict is when two different artifacts have been added to a
Runfiles object under the same relative path. Conflict resolution is
unchanged (last artifact wins).
--
MOS_MIGRATED_REVID=116584195
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Skylark into their own package. This allows, e.g., classes in the syntax package to access classes in the cmdline package without creating circular dependencies.
While we're here:
- Removed a couple of unused BUILD deps flagged in [].
- Updated SkylarkRuleImplementationFunctionsTest to remove non-ASCII characters and
clarify the intent of the test.
--
MOS_MIGRATED_REVID=110360763
|
|
|
|
|
|
|
| |
Reduces garbage.
--
MOS_MIGRATED_REVID=109914243
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=107048547
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=106410161
|
|
|
|
|
|
|
|
|
|
|
| |
The headers were modified with
`find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'`
And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan.
The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand.
--
MOS_MIGRATED_REVID=103938715
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=103374106
|
|
|
|
|
|
|
| |
The other constructor is now private.
--
MOS_MIGRATED_REVID=102252544
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=101730178
|
|
|
|
|
|
|
| |
This CL covers the "easy" cases. Followup CLs will take care of couple dozen remaining gnarly ones.
--
MOS_MIGRATED_REVID=100479410
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=99283744
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is important to build packages of bazel-built code, especially
python.
Simple example usage:
def _runfiles_test_impl(ctx):
runfiles_provider = provider(ctx.attr.src, 'analysis.RunfilesProvider')
runfiles = runfiles_provider.default_runfiles.artifacts
commands = []
for f in runfiles:
commands += [
'mkdir -p $(dirname %s/%s)' % (ctx.outputs.outdir.path, f.short_path),
'cp %s %s/%s' % (f.path, ctx.outputs.outdir.path, f.short_path),
]
ctx.action(
outputs = [ ctx.outputs.outdir ],
inputs = list(runfiles),
command = ' && '.join(commands)
)
'''A simple rule which copies all the runfiles from src into outdir.'''
runfiles_buildtest = rule(
implementation = _runfiles_test_impl,
attrs = {
'src': attr.label(allow_files=False, mandatory=True),
'outdir': attr.output(mandatory=True),
},
)
--
Change-Id: I8fbd4c6ea462685142cf199dfe3348bc4436cdcb
Reviewed-on: https://bazel-review.googlesource.com/1530
MOS_MIGRATED_REVID=96576360
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=94318260
|
|
|
|
|
|
|
|
|
| |
We wind up combining them anyway in the manifest file and it seems that
this is consistent with how we read them back. Return them all at once
to avoid tedious duplication in handling of them.
--
MOS_MIGRATED_REVID=93058482
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the contract was pretty liberal and could allow addition of
extra Artifacts. Create a more restrictive interface allowing the bare
minimum- adding empty files to the tree. This makes the contract of
Runfiles#getAllArtifacts() more sound, since arbitrary artifacts can't
be added, and it makes it easier to figure out what implementations of
manifest expansion exist out there.
--
MOS_MIGRATED_REVID=91233821
|
|
|
|
|
|
|
|
|
| |
Many of the @VisibleForTesting annotations didn't actually apply. Remove
them, apply the annotation to places where it applies, and change
visibility of mttehods to be more restrictive.
--
MOS_MIGRATED_REVID=91208297
|
|
|
|
|
|
|
|
|
|
| |
SourceManifestAction.Builder#setTopLevel is the only way the relative
roots was capable of being supplied. Its documentation states "Most
likely, you don't need this". As it is unused removing the extra code
and interpreting as "you don't need this".
--
MOS_MIGRATED_REVID=88574913
|
|
|
|
|
|
|
|
|
| |
comes last in the iteration order for a particular path.
Before, if there were three entries for the same path with the middle one being different, the first one would be overridden by the middle one, and the last one would be omitted because it is .equals() to the first.
--
MOS_MIGRATED_REVID=88377253
|
|
|
|
|
|
|
| |
merged" functionality from Runfiles.Builder.
--
MOS_MIGRATED_REVID=87954443
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=87621601
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=87513766
|
|
--
MOE_MIGRATED_REVID=85702957
|