bazelbuild / platforms

Constraint values for specifying platforms and toolchains
Apache License 2.0
108 stars 73 forks source link

Repository `@rules_license` is not defined #66

Open oliverlee opened 1 year ago

oliverlee commented 1 year ago

I'm not using bzlmod so I'm getting an error due to not defining rules_license in my WORKSPACE file and a recent commit of this repo and use of @platforms//:incompatible. Should there be a dependencies macro as mentioned here or is bzlmod the only way going forward?

aiuto commented 1 year ago

Yes. I see this repository does not have a deps.bzl pattern.
Rather than adding that piece of ugly. I'll update the release notes to include the a pointer to the workspace stanza for rules_license.

aiuto commented 1 year ago

Currently that would be.

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
    name = "rules_license",
    urls = [
        "https://github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
        "https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
    ],
    sha256 = "6157e1e68378532d0241ecd15d3c45f6e5cfd98fc10846045509fb2a7cc9e381",
)
fmeum commented 1 year ago

@aiuto The notes for the current release do not have this stanza in the release notes.

I would go as far as saying that a repo that is as fundamental as @platforms should not have any dependencies, at least not in a WORKSPACE world. Could the rules_license dep be moved to a subpackage that isn't part of the API of @platforms?

jwnimmer-tri commented 10 months ago

... should not have any dependencies ...

As a user, I would prefer this. However, in the meantime ...

... the notes for the current release do not have this stanza in the release notes ...

... we should at least document the status quo. I've filed #82 for that.