Skip to content

Commit

Permalink
Pass through aliases for build dependencies (#1133)
Browse files Browse the repository at this point in the history
Fixes #1090
  • Loading branch information
oremj committed Feb 9, 2022
1 parent a3492b4 commit bbccf77
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ cargo_build_script(
{%- include "templates/partials/targeted_build_script_data_dependencies.template" -%},
{%- else -%},
{%- endif %}
aliases = {%- include "templates/partials/targeted_aliases.template" %},
tags = [
"cargo-raze",
"manual",
Expand Down
1 change: 1 addition & 0 deletions examples/crate_universe/basic/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ rust_binary(
edition = "2018",
deps = [
crate("lazy_static"),
crate("value-bag"),
],
)

Expand Down
5 changes: 5 additions & 0 deletions examples/crate_universe/basic/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use lazy_static::lazy_static;
use std::collections::HashMap;
use value_bag::ValueBag;

lazy_static! {
static ref HASHMAP: HashMap<&'static str, &'static str> = {
Expand All @@ -12,6 +13,10 @@ lazy_static! {
}

fn main() {
let bag = ValueBag::capture_display(&42);
let num = bag.to_u64().unwrap();

assert_eq!(num, 42);
assert_eq!(HASHMAP["Daniel"], "Wagner-Hall");
println!("It worked!");
}
4 changes: 4 additions & 0 deletions examples/crate_universe/basic/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ def deps():
name = "lazy_static",
semver = "=1.4",
),
crate.spec(
name = "value-bag",
semver = "=1.0.0-alpha.7",
),
],
supported_targets = [
"x86_64-apple-darwin",
Expand Down

0 comments on commit bbccf77

Please sign in to comment.