meson
meson copied to clipboard
rust: suggest correct dependency when found in Cargo.lock
As we refer to crates using API version instead of plain version, it can be confusing to user which is left with a simple "Dependency X not found".
Thus, when we detect that a rust dependency is missing, and is not available using a wrap file, if we find something compatible using Cargo.lock import, we just list the correct dependencies names.
@xclaesse Followup for conversation on https://github.com/mesonbuild/meson/pull/12945
fixed extra parentheses on the if.
Report error only if dependency is required.
fixed lint issues
@eli-schwartz How can we indicate to meson test infra that the test is supposed to fail?
More idiomatic python.
Use rsplit to extract crate name + update test to have crate with - in the name.
Thanks for your recommendations @dnicolodi @eli-schwartz. I'm still looking for a way to indicate the test is supposed to fail. If you have suggestion, I would be happy to implement it to fix CI.
Found how to implement a "failing" test, and rebased on top of master.
Test failure does not seem related to this patch (lto issue on cygwin).
Polite ping after two weeks. Review comments have been addressed so far. I still think this error message can be useful for people looking for integrating rust code with meson.
I'm closing this PR for now. If someone is interested to work on this, feel free to reuse the code presented here.