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

Testing bazel-based build breakage with upstream rules_rust #485

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ onerous, even for code with few dependencies.

## Usage

insignificant change to test CI.

cargo-raze can generate buildable targets in one of two modes: Vendoring, or
Non-Vendoring. In the vendoring mode, developers use the common `cargo vendor`
subcommand to retrieve the dependencies indicated by their workspace Cargo.toml into
Expand Down
12 changes: 5 additions & 7 deletions examples/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_rust",
sha256 = "accb5a89cbe63d55dcdae85938e56ff3aa56f21eb847ed826a28a83db8500ae6",
strip_prefix = "rules_rust-9aa49569b2b0dacecc51c05cee52708b7255bd98",
urls = [
# Main branch as of 2021-02-19
"https://github.com/bazelbuild/rules_rust/archive/9aa49569b2b0dacecc51c05cee52708b7255bd98.tar.gz",
],
sha256 = "617082067629939c0a22f587811a3e822a50a203119a90380e21f5aec3373da9",
strip_prefix = "rules_rust-e07881fa22a5f0d16230d8b23bbff2bf358823b8",
# Main branch as of 2022-04-27
url = "https://github.com/bazelbuild/rules_rust/archive/e07881fa22a5f0d16230d8b23bbff2bf358823b8.tar.gz",
)

load("@rules_rust//rust:repositories.bzl", "rust_repositories")

rust_repositories()
rust_repositories(edition="2018")

load("//:repositories.bzl", "repositories")

Expand Down
1 change: 1 addition & 0 deletions impl/src/planning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub struct BuildPlannerImpl {

impl BuildPlanner for BuildPlannerImpl {
/// Retrieves metadata for local workspace and produces a build plan.
/// Insignificant change to ruin cache.
fn plan_build(&self, platform_details: Option<PlatformDetails>) -> Result<PlannedBuild> {
// Create one combined metadata object which includes all dependencies and binaries
let crate_catalog = CrateCatalog::new(&self.metadata.metadata)?;
Expand Down
8 changes: 4 additions & 4 deletions repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ def cargo_raze_repositories():
maybe(
http_archive,
name = "rules_rust",
sha256 = "69934a7953e5267ac18b751d6b109bc9e906d4a5d887f68cdd1940f172b64254",
strip_prefix = "rules_rust-e7b1e5ab9afcccc8d301c2b8922cae815d20c714",
# Main branch as of 2021-11-15
url = "https://github.com/bazelbuild/rules_rust/archive/e7b1e5ab9afcccc8d301c2b8922cae815d20c714.tar.gz",
sha256 = "617082067629939c0a22f587811a3e822a50a203119a90380e21f5aec3373da9",
strip_prefix = "rules_rust-e07881fa22a5f0d16230d8b23bbff2bf358823b8",
# Main branch as of 2022-04-27
url = "https://github.com/bazelbuild/rules_rust/archive/e07881fa22a5f0d16230d8b23bbff2bf358823b8.tar.gz",
)

maybe(
Expand Down
2 changes: 1 addition & 1 deletion transitive_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ load("@rules_rust//rust:repositories.bzl", "rust_repositories")
def cargo_raze_transitive_deps():
"""Loads all dependnecies from repositories required for cargo-raze"""
rules_foreign_cc_dependencies()
rust_repositories(include_rustc_srcs = True)
rust_repositories(edition="2018", include_rustc_srcs = True)