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

False positives from derive macro #143

Open
pacak opened this issue Nov 9, 2022 · 5 comments
Open

False positives from derive macro #143

pacak opened this issue Nov 9, 2022 · 5 comments

Comments

@pacak
Copy link

pacak commented Nov 9, 2022

I'm running cargo udeps as this:

% cargo udeps --workspace --all-targets --backend save-analysis --show-unused-transitive

and getting a whole bunch of false positives, most of which are coming from either derive macro or macro in general.

It would be great to be able to pass something --no-proc-macro to automagically exclude derive macros from the output. It should be able to tell if something is a derive macro somewhere around cargo output.

@est31
Copy link
Owner

est31 commented Nov 10, 2022

Why have you enabled the save-analysis backend? Does the non-save-analysis backend have false positives?

@pacak
Copy link
Author

pacak commented Nov 10, 2022

Why have you enabled the save-analysis backend?

To get --show-unused-transitive working - according to --help it depends on save-analysis.

Does the non-save-analysis backend have false positives?

No, but it ignores a bunch of redundant transitive dependencies.

I'm on 0.1.35

@est31
Copy link
Owner

est31 commented Nov 10, 2022

Yeah, save-analysis has bad macro support... also note that save-analysis is being removed from rustc, so using the save-analysis backend at all won't be possible for long: rust-lang/rust#101841

@pacak
Copy link
Author

pacak commented Nov 10, 2022

Is there a plan to implement transitive dependencies report without it?

@est31
Copy link
Owner

est31 commented Nov 10, 2022

I don't know of a trick how to do it, outside of using the unstable rustc feature to dump unused dependencies to json. Maybe we can add a backend for that :).

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

No branches or pull requests

2 participants