Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update crates_vendor to write any crate spec and annotation used #1423

Open
UebelAndre opened this issue Jun 27, 2022 · 0 comments
Open

Update crates_vendor to write any crate spec and annotation used #1423

UebelAndre opened this issue Jun 27, 2022 · 0 comments

Comments

@UebelAndre
Copy link
Collaborator

UebelAndre commented Jun 27, 2022

This would allow external consumers of workspaces that use crates_vendor to be programmatically consume the same dependencies.

Concretely, the snippet:

crates_vendor(
    name = "crates_vendor",
    packages = {
        "rand": crate.spec(
            version = "1",
        ),
    },
    annotations = {
        "rand": [crate.annotation(
            default_features = False,
            features = ["small_rng"],
        )],
    },
    mode = "remote",
    vendor_path = "crates",
    tags = ["manual"],
)

To generate some content in the generated crates.bzl file:

PACKAGES = {
    "rand": crate.spec(
        version = "1",
    ),
}

ANNOTATIONS = {
    "rand": [crate.annotation(
        default_features = False,
        features = ["small_rng"],
    )],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant