Skip to content

Conversation

@Keinsleif
Copy link
Contributor

@Keinsleif Keinsleif commented Sep 2, 2025

Using command_writers_and_readers! macro outside of kira causes failed to resolve: use of undeclared crate or module paste error.

command_writers_and_readers! macro generates code that uses paste::paste! macro. But, paste is not always included in external crate's dependencies. That cause Failed to resolve error.

You can solve this problem by adding "paste" in external crate dependencies. But adding crate not used directly is little strange.

This PR solve this problem by extern paste crate by pub use ::paste in lib.rs and use paste package via $crate metavar.

I found similar issue in paste crate repository.
dtolnay/paste#69

Also, there is the post describes about solution.
https://users.rust-lang.org/t/proc-macros-using-third-party-crate/42465/4

@tesselode
Copy link
Owner

I'm seeing that the paste repo is archived - does anyone know of any good alternatives?

@Keinsleif
Copy link
Contributor Author

I found pastey, the fork of paste.
pastey pvovides simple migration solution by replacing paste with pastey.

paste = { package = "pastey", version = "*" }

But migrating paste to pastey is included in #142

Should I add this migration to PR?

@tesselode
Copy link
Owner

sure, go for it! i'll merge this in after

@Keinsleif Keinsleif changed the title Fix failed to resolve 'paste' crate Fix failed to resolve 'paste' crate & migrate to pastey Sep 6, 2025
@Keinsleif
Copy link
Contributor Author

added migration to pastey.

@tesselode tesselode merged commit b395c05 into tesselode:main Sep 21, 2025
@tesselode
Copy link
Owner

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants