You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works because stout's WORKSPACE.bazel file defines these repo labels before they're used, e.g.:
local_repository(
name = "com_github_3rdparty_stout_atomic_backoff",
path = "stout-atomic-backoff",
)
But this does not work when using stout in another repo by following the advice on https://github.com/3rdparty/stout#bazel to call stout's repos.bzl from the other repo's repos.bzl: in order for this to work, we need to avoid referring to already-defined repo labels in our repos.bzl file.
Concretely, I think we should remove all repo references in the style of @repo_name from our repos.bzl file (except @bazel_tools which seem both safe and commonly used across repos) and instead add new subfolders of 3rdparty/ for each repo.
The text was updated successfully, but these errors were encountered:
From a chat with @benh this issue might have it backwards: we might be moving away from this pattern of repos.bzl and this new style might in fact be the way forward!
Stout's
repos.bzl
refers to other repos'repos.bzl
files by using a repository label, e.g. the use of@com_github_3rdparty_stout_atomic_backoff
in:This works because stout's
WORKSPACE.bazel
file defines these repo labels before they're used, e.g.:But this does not work when using stout in another repo by following the advice on https://github.com/3rdparty/stout#bazel to call stout's
repos.bzl
from the other repo'srepos.bzl
: in order for this to work, we need to avoid referring to already-defined repo labels in ourrepos.bzl
file.Other repositories accomplish this by not referring to
repos.bzl
files in dependencies' labeled repos, but instead copying thoserepos.bzl
files into a3rdparty
top-level folder e.g. https://github.com/3rdparty/eventuals/blob/main/bazel/repos.bzl#L15-L18 :I suspect we should follow the same pattern here.
Concretely, I think we should remove all repo references in the style of
@repo_name
from ourrepos.bzl
file (except@bazel_tools
which seem both safe and commonly used across repos) and instead add new subfolders of3rdparty/
for each repo.The text was updated successfully, but these errors were encountered: