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

--with-metadata false positive with build-dependencies #119

Closed
trinity-1686a opened this issue Mar 30, 2024 · 2 comments
Closed

--with-metadata false positive with build-dependencies #119

trinity-1686a opened this issue Mar 30, 2024 · 2 comments

Comments

@trinity-1686a
Copy link

thanks for making that tool. I'm currently trying to trim unused dependencies, and it has been a great help

running cargo machete --with-metadata on a project with build dependencies doesn't seem to consider anything used inside build.rs

@bnjbvr
Copy link
Owner

bnjbvr commented Apr 2, 2024

Thanks! I suppose you're asking for something similar to #100? It's not specific to --with-metadata, we don't handle build.rs / build-dependencies at all, as of now. So I'll close as a duplicate. (Please reopen or let me know if you were asking for something different.)

@bnjbvr bnjbvr closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
@trinity-1686a
Copy link
Author

I think it's the opposite in a way, without --with-metadata it doesn't optimize, and with --with-metadata it optimizes "too much", suggesting to remove used dependencies. For instance in https://github.com/quickwit-oss/quickwit/ , --with-metadata suggest removing quickwit_codegen from ./quickwit-ingest/Cargo.toml, where it appears only as a [build-dependencies], and is used in the build.rs.

If it's not supported for now, this issue only half-make-sense anyway.

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