rust-scan icon indicating copy to clipboard operation
rust-scan copied to clipboard

Move rust-scan and rust-scan-util into the same repo

Open kmcallister opened this issue 11 years ago • 1 comments
trafficstars

See e.g. string-cache's Cargo.toml and macros/Cargo.toml.

kmcallister avatar Oct 04 '14 17:10 kmcallister

I've had a look at this, and it looks like this only works by coincidence.

To test this, I set up a new crate scan that depended on both scan_macros (what was called scan) and scan_util. Then, I made a test program that depended on the new scan, but used extern crate scan_macro and extern crate scan_util.

It worked. But, if you check the actual command line cargo is feeding to rustc, it only mentions the scan crate: --extern scan=...\target\depds/libscan-xxx.rlib. In other words, the only reason this works is because Cargo is messy and doesn't clean up its room before guests come over.

I'm leery to depend on something that's not specified and seems like an implementation detail. Moreover, it puts users in the weird situation where they have to depend on one crate, but actually use two other crates that are coming from... somewhere.

I agree that it would be better to have everything in one repository, so I'm leaving this open if a supported way of doing this comes along.

DanielKeep avatar Oct 05 '14 03:10 DanielKeep