Skip to content

Commit

Permalink
Fix #4: Make libPath work for proc-macro crates
Browse files Browse the repository at this point in the history
  • Loading branch information
kolloch committed Apr 22, 2019
1 parent e950a53 commit 5e43840
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
47 changes: 47 additions & 0 deletions sample_projects/with_problematic_crates/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions sample_projects/with_problematic_crates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tera = "*"

# Regression test for issue #4
html5ever = "0.22.5"
cssparser = "0.25.3"

# Other popular application creates
actix-web ="*"
Expand Down
4 changes: 4 additions & 0 deletions sample_projects/with_problematic_crates/crate-hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@
"crossbeam-epoch 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)": "1n2p8rqsg0g8dws6kvjgi5jsbnd42l45dklnzc8vihjcxa6712bg",
"crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)": "1hannzr5w6j5061kg5iba4fzi6f2xpqv7bkcspfq17y1i8g0mzjj",
"crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)": "1z7wgcl9d22r2x6769r5945rnwf3jqfrrmb16q7kzk292r1d4rdg",
"cssparser 0.25.3 (registry+https://github.com/rust-lang/crates.io-index)": "1sziyx2qba8lszl8aiawnwk4aiwik0m1hybgr56f3qmx7zq1b4kb",
"cssparser-macros 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)": "0lj3hzmaixcf5iihm4xngarnhs7ivjn88aph48pmsk3y5x139194",
"deunicode 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)": "138gv1cadzf9pf6i2wnmsbk927zfivpp0g74c1jnp7z3g4mwfdgl",
"diesel 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)": "06c6gbz3p8hsidmz3h7j3hlm3034yzq788z8jficc07ggmdf5hq3",
"diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)": "0glcvgn8vl60nw6xm0q13ljfcjlhg7j9pb8lnc06zfik8qvy27lz",
"digest 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)": "1bsddd8vdmncmprks8b392yccf132wjwzrcy5wdy1kh05qm23il8",
"dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)": "1xysdxdm24sk5ysim7lps4r2qaxfnj0sbakhmps4d42yssx30cw8",
"dtoa-short 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)": "10ahw0qfrss941f8fmyhjz4w5h5j2lan2a200av1i31243gfqh4k",
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)": "16ls6avhv5ll28zajl5q1jbiz1g80c4ygnw13zzqmij14wsp5329",
"encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)": "1pmfaabps0x6v6cd4fbk9ssykhkmc799dma2y78fhk7gvyr5gyl4",
"encoding-index-korean 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)": "1b756n7gcilkx07y7zjrikcg0b8v8yd6mw8w01ji8sp3k1cabcf2",
Expand Down Expand Up @@ -121,6 +124,7 @@
"phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)": "1hndqn461jvm2r269ym4qh7fnjc6n8yy53avc2pb43p70vxhm9rl",
"precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)": "1x37xiarlc39772glsrbb9ic5cpaky4q0fi0ax42bwwrn4jfqgyj",
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)": "1cp4c40p3hwn2sz72ssqa62gp5n8w4gbamdqvvadzp5l7gxnq95i",
"procedural-masquerade 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)": "1nk661dxs6ixlrw1ilsr22v0zb91fg9kyxs2ikkl12y4qi2f72g2",
"quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)": "192a3adc5phgpibgqblsdx1b421l5yg9bjbmv552qqq9f37h60k5",
"quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)": "1ckd2d2sy0hrwrqcr47dn0n3hyh7ygpc026l8xaycccyg27mihv9",
"rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)": "04f1gydiia347cx24n5cw4v21fhh9yga7dw739z4jsxzls2ss8w8",
Expand Down
2 changes: 1 addition & 1 deletion src/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl CrateDerivation {
let lib = package
.targets
.iter()
.find(|t| t.kind.iter().any(|k| k == "lib"))
.find(|t| t.kind.iter().any(|k| k == "lib" || k == "proc-macro"))
.and_then(|target| BuildTarget::new(&target, &package_path).ok());

let build = package
Expand Down

0 comments on commit 5e43840

Please sign in to comment.