Closed dkg closed 2 years ago
I'm not sure what the right fix for this is. in debian, i'm patching the crate to reinstate the comment above the feature, but i welcome other suggestions for how to handle this better.
Normally, the original should be copied in a Cargo.toml.orig, and we do try to open that file as well: https://github.com/slint-ui/document-features/blob/ba20128b81382fdb40cfbf7aff2c6408a066c236/lib.rs#L262-L265
I tried running the tests from the package published on crates.io, and they pass. Maybe debian does some other transform to remove the Cargo.toml.orig?
Thank you for the prompt response! You've pointed me in the right direction.
Looks like this is indeed a debian-specific problem. dh_clean
(the "clean" command for the debhelper packaging tool) defaults to removing any file with a name matching the *.orig
glob (among others, see dh_clean(1)
for the full list) before starting the build.
Looks like dh_clean
can also be directed exclude some things, so in its most simple form we can just tell it to avoid killing Cargo.toml.orig
. Since the rust packages are all built with the dh-cargo
debhelper buildsystem extension, maybe we can use dh-cargo
itself to avoid knocking out that file. I'll see what's possible.
I'll close this issue since this is not a bug in the crate.
Thanks for doing the debian packaging.
For anyone who finds this and is interested in following up, i've put the discussion over at https://bugs.debian.org/1023413
The process of publishing a crate appears to naturally strip the comments in
Cargo.toml
.Consequently, when i try to build and run the code in this crate from the published crate, i end up with errors in the self-test.
The published crate (v0.2.6) has this Cargo.toml:
This of course results in:
This is a concern for me because i'm trying to package the
document-features
crate in debian, and the debian rust team is currently packaging based on the published crates.