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

cargo-bloat seems to get confused by proc macros? #22

Closed
thomcc opened this issue Jun 27, 2018 · 2 comments
Closed

cargo-bloat seems to get confused by proc macros? #22

thomcc opened this issue Jun 27, 2018 · 2 comments

Comments

@thomcc
Copy link

@thomcc thomcc commented Jun 27, 2018

When trying to determine what dependencies are contributing to the size of https://github.com/mozilla/mentat/ (after cd tools/cli, for example), cargo bloat --release indicates that most of them are coming from syn. Filtering to the mentat crate gives zero results.

It seems to be finding the executable that implements a procedural macro (in this case for failure_derive).

Explicitly passing --bin mentat_cli causes it to report correct information.

@RazrFalcon
Copy link
Owner

@RazrFalcon RazrFalcon commented Jun 27, 2018

Interesting. The problem is that it builds deps/libfailure_derive-bf1f074fc759e69b.so, and native/C libraries have a priority over executable. And I don't know what exactly are you building. All I have is a list of libraries and binaries that was build.

I've added deps filtering by cdylib target and not by the file extension.

@RazrFalcon
Copy link
Owner

@RazrFalcon RazrFalcon commented Jun 27, 2018

I've published a new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants