Closed Waridley closed 10 months ago
This actually breaks the workspace_deps_twice_renamed
test, but that's because I intentionally changed it due to lack of support in Cargo. As of right now, if proc-macro-crate
accepted twice-renamed dependencies in Cargo.toml
, it would not actually work within the crate that used the proc macro.
I found the relevant issue in Cargo's repo: https://github.com/rust-lang/cargo/issues/12546
It doesn't look like the feature is likely to be implemented any time soon, but I could make it work in case it does happen to be implemented in the future if you want. But unless you say otherwise, I will remove the failing test and add one for workspace-root crates instead for now.
Ty for the work!
The root of a workspace is itself a crate, and thus its manifest can contain both
[dependencies]
and[workspace.dependencies]
. Without this fix I need to add a superfluouspackage
key to my renamed dependency to getproc-macro-crate
to find it, but that causes Cargo to warn about an unused manifest key.Also, renaming workspace dependencies seems to only be possible within the
[workspace.dependencies]
table. If I try this:I get:
So it should check for
dep_name
rather thanpkg_name
in the workspace dependencies.