Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Make sr-api-macros and srml-support renaming of crates #1757

Merged
merged 2 commits into from
Feb 11, 2019

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Feb 11, 2019

Procedural do not support $crate to get access to the crate where the
macro is defined. We use a hack to re-export the crate under a known
name. With rust edition 2018, people started to rename their crates in
Cargo.toml, but that breaks the re-export. This commit introduces
proc-maco-crate that supports finding the requested crate name, even
if it was renamed.

cc: @thiolliere @cheme @shawntabrizi

Procedural do not support `$crate` to get access to the crate where the
macro is defined. We use a hack to re-export the crate under a known
name. With rust edition 2018, people started to rename their crates in
`Cargo.toml`, but that breaks the re-export. This commit introduces
`proc-maco-crate` that supports finding the requested crate name, even
if it was renamed.
@bkchr bkchr added the A0-please_review Pull request needs code review. label Feb 11, 2019
@bkchr bkchr merged commit 9bb2125 into master Feb 11, 2019
@bkchr bkchr deleted the bkchr-introduce-proc-macro-crate branch February 11, 2019 12:58
MTDK1 pushed a commit to bdevux/substrate that referenced this pull request Apr 12, 2019
…h#1757)

Procedural do not support `$crate` to get access to the crate where the
macro is defined. We use a hack to re-export the crate under a known
name. With rust edition 2018, people started to rename their crates in
`Cargo.toml`, but that breaks the re-export. This commit introduces
`proc-maco-crate` that supports finding the requested crate name, even
if it was renamed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants