meson icon indicating copy to clipboard operation
meson copied to clipboard

rust: suggest correct dependency when found in Cargo.lock

Open pbo-linaro opened this issue 1 year ago • 3 comments

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.

pbo-linaro avatar Jul 19 '24 00:07 pbo-linaro

@xclaesse Followup for conversation on https://github.com/mesonbuild/meson/pull/12945

pbo-linaro avatar Jul 19 '24 00:07 pbo-linaro

fixed extra parentheses on the if.

pbo-linaro avatar Jul 19 '24 01:07 pbo-linaro

Report error only if dependency is required.

pbo-linaro avatar Jul 19 '24 02:07 pbo-linaro

fixed lint issues

pbo-linaro avatar Jul 19 '24 20:07 pbo-linaro

@eli-schwartz How can we indicate to meson test infra that the test is supposed to fail?

pbo-linaro avatar Jul 19 '24 20:07 pbo-linaro

More idiomatic python.

pbo-linaro avatar Jul 21 '24 18:07 pbo-linaro

Use rsplit to extract crate name + update test to have crate with - in the name.

pbo-linaro avatar Jul 21 '24 22:07 pbo-linaro

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.

pbo-linaro avatar Jul 21 '24 22:07 pbo-linaro

Found how to implement a "failing" test, and rebased on top of master.

pbo-linaro avatar Jul 22 '24 16:07 pbo-linaro

Test failure does not seem related to this patch (lto issue on cygwin).

pbo-linaro avatar Jul 22 '24 18:07 pbo-linaro

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.

pbo-linaro avatar Aug 12 '24 18:08 pbo-linaro

I'm closing this PR for now. If someone is interested to work on this, feel free to reuse the code presented here.

pbo-linaro avatar Aug 16 '24 16:08 pbo-linaro