Add overlays
to git_repository
and http_archive
#22395
Labels
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: feature request
Description of the feature request:
It would be great to have a way to add new files to a
git_repository
orhttp_archive
without having to generate a dummy diff file for them.An example for this is the following. Let us say that we have the following directory:
. ├── MODULE.bazel ├── overlays │ └── src │ └── a.go └── patches └── b.diff
where
a.txt
is a new file and b.diff is a regular patch on./main.go
.I could then have a
git_repository
like the following:. ├── main.go // patched └── src ├── a.go // copied over (overlay) └── c.go
I think that in the MODULE.bazel, it could look like the following:
it would take the path of each overlay and substitute the
overlays_root
by the %worskpace% of the repo.Which category does this issue belong to?
Configurability
What underlying problem are you trying to solve with this feature?
I'm trying to avoid having to go through all my new files (overlays) and execute something like
git diff /dev/null $file
. We should not have to create dummy patch files for new files. They can simply be copied over.Which operating system are you running Bazel on?
MacOS
What is the output of
bazel info release
?release 7.1.2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
I only found something similar in
bazel-gazelle
but this is now deprecated (see: https://github.com/bazelbuild/bazel-gazelle/blob/master/repository.md#git_repository).Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: