Hi Harry,

Le jeu. 21 nov. 2024 à 16:28, Harry Sarson
<[email protected]> a écrit :
> Bazel can be made to fetch sources from a repository cache[2], and bazel

I feel that this is a hack, and we would probably have a better chance
by using a remote cache instead. Please stay tuned for another post to
this list.

> picks
> resources from the repository cache based on both the checksum and the
> "URL that
> bazel thinks the resource lives at" (this is typically the upstream URL). So
> when the revamped bazel_source plugin creates a repository cache for
> bazel it
> needs to know the URL bazel thinks the resource lives at.

> Currently we require the element's author to explicitly add the "URL bazel
> thinks the resource lives at" but if a `Source.get_urls(self) ->
> List[str]` API
> existed then (in 90% of cases where "the URL bazel thinks the resource
> lives at"
> is the upstream URL) the bazel_plugin could determine the URL atomically
> (we may
> not want to implicitly set it, instead adding it during `bst track`).

I am not sure I follow. A `Source.get_urls()` would be implemented by
your `bazel_source` (source) plugin? And then you'd expect a bazel
(element) plugin to call this method and do something with it?

Or are you expecting something else to implement `Source.get_urls()`?
(an earlier source that you place before your bazel_source?). In that
case, please be aware that you cannot get the plugin object of
previous sources: you only get the content that they stage.

Cheers,

Abderrahim

Reply via email to