Open bobbens opened 1 month ago
Digging around in meson a bit
It seems DependancyFallbackHolder._do_subproject()
is passing the subproject name without version to interpreter.do_subproject
https://github.com/mesonbuild/meson/blob/9575ed30abba70508749d69a9f601e2c6ed657c2/mesonbuild/interpreter/dependencyfallbacks.py#L126-L131
and the cargo interpreter is expecting the version number to be included when it splits the provided name.
https://github.com/mesonbuild/meson/blob/9575ed30abba70508749d69a9f601e2c6ed657c2/mesonbuild/cargo/interpreter.py#L711-L712
This seems to be fixed in master.
Describe the bug When using a meson wrap around a Rust cargo file, it seems to internally chop the name at the first hyphen. In particular, the project
quick-xml
gets cut toquick
at some point, and then it fails to find the Cargo.toml and fails to build. I have only seen this when the cargo package has a hyphen in its name.To Reproduce The following wrap will fail to
will fail to compile when used as a wrap with
dependency('quick-xml-0.36.2-rs')
with:I haven't been able to track it down, but somewhere, the package
quick-xml
is getting chopped toquick
and then it is failing.I have also tried with another project with a hyphen in the name
grip-grab
, and get a similar error, with the name getting truncated togrip
in this case. My naive hypothesis is that some code to deal with-rs
part of cargo wraps is truncating it, however, I have not looked further into it.Expected behavior I would expect it to compile as a dependency without an issue.
system parameters