Skip to content
Verified Commit 876c6c7a authored by Matthew Clarkson's avatar Matthew Clarkson
Browse files

refactor: add `cosmos` downloader

This vastly simplifies the `MODULE.bazel`. It allows creation of download
repositories for all versions of `cosmos` easily and creates entrypoints to
the latest version of the downloads.

This will make it _much_ easier to ingest newer versions of `cosmos` *and*
provides legacy version downloads which some users may want to pin to.

This patch does not make the extension public at this time but is designed
in a way that it could be used across the module graph to added extra
version downloads in. This would allow downstream modules to provide newer
versions of `cosmos` and the unversioned repositories would point at the
provided newer versions.

BREAKING CHANGE: A new `ape_cosmos` extension has been implemented that allows flexible downloading of `cosmos.zip` binaries.

Repositories can now be imported directly from that extension rather than `@toolchain_utils//toolchain/export:def.bzl#toolchain_export`.

Previously a repository would be imported as so:

```py
export = use_extension("@toolchain_utils//toolchain/export:defs.bzl", "toolchain_export")
use_repo(export, "ape-zstd")
```

Now the extension has all the available repositories:

```py
cosmos = use_extension("@ape//ape/cosmos:defs.bzl", "ape_cosmos")
use_repo(cosmos, "zstd")
```
BREAKING CHANGE: The `@ape//:*` aliases have been removed in favour of the more explicit `@ape//ape/toolchain/info:*` targets.
BREAKING CHANGE: `ape_binary` rule has been removed. It was plagued with runfile issues that are practically unsolvable in a hermetic way. The `ape_assimilate` rule is far superior and has been the default for the `@ape//ape:*` aliases for many releases. Finally removing the rule in lead up to `1.0.0` release.
parent 2a3b317f
Loading
Loading
Loading
Loading
  • GITLAB_TOKEN @group_3575_bot_1fa64dd2caebb37307063a803b95a420

    mentioned in commit fa14df32

    ·

    mentioned in commit fa14df32

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment