Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Procedural macros are rebuilding all dependencies #928

Closed
shepmaster opened this issue May 4, 2023 · 1 comment
Closed

Procedural macros are rebuilding all dependencies #928

shepmaster opened this issue May 4, 2023 · 1 comment
Labels
bug The playground isn't doing what it was intended to

Comments

@shepmaster
Copy link
Member

No description provided.

@shepmaster shepmaster added the bug The playground isn't doing what it was intended to label May 4, 2023
@shepmaster
Copy link
Member Author

@dtolnay identified the problem (lightly edited by me):

From the changelog

Debuginfo for build dependencies is now off if not explicitly set. This is expected to improve the overall build time. #11252

That Cargo change means that when the playground image is built with its hundreds of dependencies, the subset of them which were not build dependencies are built with debug = true. However when a user later runs a build in the playground containing a proc macro, those same hundreds of dependencies would now be treated by Cargo as build dependencies, because they are dependencies of a proc macro now, resulting in a different setting for debuginfo and unable to reuse the precompiled copies.

To reuse the same prebuilt crates as both ordinary dependencies and dependencies of a macro, both would need to be set to build with the same setting for debuginfo

Try this to get the same behavior as before:

[profile.dev.build-override]
debug = true

shepmaster added a commit that referenced this issue May 4, 2023
Cargo now [turns off debug symbols for build dependencies by
default][1], but that doesn't allow us to reuse those built
dependencies when building a proc-macro.

Fixes #928

[1]: rust-lang/cargo#11252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The playground isn't doing what it was intended to
Projects
None yet
Development

No branches or pull requests

1 participant