Skip to content

More lenient parsing of rustc arguments#201

Merged
Shnatsel merged 1 commit intomasterfrom
more-lenient-rustc-args
Apr 29, 2025
Merged

More lenient parsing of rustc arguments#201
Shnatsel merged 1 commit intomasterfrom
more-lenient-rustc-args

Conversation

@Shnatsel
Copy link
Copy Markdown
Member

Do not assume that if --crate-name is present, --out-dir must be present also. Instead allow them to be absent at the parsing stage, run the full detection logic for non-compilation commands, and only error out of the command looks like a compilation one.

Fixes #198

@benaryorg
Copy link
Copy Markdown

I can confirm that it manages to build the project I initially encountered this with (419 webserver-ish dependencies plus the crate itself) just fine on first try.
To be honest I have no idea how to test whether the resulting "auditable" part still works, however the built application works just fine.
If basic functionality of cargo-auditable works in tests though, chances are it works in the wild too, so just checking whether something compiles will hopefully suffice.

Regarding the "testing it on lots of real-world projects would be welcome" from the issue; I'm trying to check this with a CI pipeline, but I'm neither sure whether it'll work, nor how long it'll take so I'm probably of little help on that end.

@Shnatsel Shnatsel merged commit 5e2a1ed into master Apr 29, 2025
9 checks passed
@Shnatsel Shnatsel deleted the more-lenient-rustc-args branch April 29, 2025 17:40
@Shnatsel
Copy link
Copy Markdown
Member Author

I've built 1650 randomly selected binary and cdylib crates from crates.io on this branch and that didn't turn up any issues. I'll do a more in-depth run overnight.

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.

failure in conjunction with cargo_metadata and embed-licensing

2 participants