Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

@platforms should be explicitly imported #686

Open
chases2 opened this issue Feb 17, 2022 · 1 comment
Open

@platforms should be explicitly imported #686

chases2 opened this issue Feb 17, 2022 · 1 comment
Assignees

Comments

@chases2
Copy link
Contributor

chases2 commented Feb 17, 2022

#675 moved us from @bazel_tools/platforms to @platforms. Thanks!

The deprecation issue (bazelbuild/bazel#8622) indicates we should explicitly import @platforms instead of relying on the "snapshot" built in. I don't think we're doing that anywhere; it's not in our WORKSPACE, at least.

A git repository rule should do the trick. This is likely low-priority; I don't see a timeline for removing the snapshot.

@meteorcloudy
Copy link
Member

Adding a http_archive would do:

http_archive(
    name = "platforms",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz",
        "https://github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz",
    ],
    sha256 = "379113459b0feaf6bfbb584a91874c065078aa673222846ac765f86661c27407",
)

Currently, the @platform repository is made available with WORKSPACE suffix by Bazel, but yes, eventually every project should specify it explicitly.

Note that we're also migrating to a new external dependency system for Bazel, see https://bazel.build/docs/bzlmod

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants