[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC]: Skipping rust crate tests by default
From: |
Maxim Cournoyer |
Subject: |
Re: [RFC]: Skipping rust crate tests by default |
Date: |
Mon, 23 Oct 2023 11:51:41 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi Efraim!
Efraim Flashner <efraim@flashner.co.il> writes:
[...]
>> > error: unnecessary parentheses around index expression
>> > -->
>> > /tmp/guix-build-rust-nalgebra-0.21.1.drv-0/nalgebra-0.21.1/src/linalg/convolution.rs:49:53
>> > |
>> > 49 | conv[i] += self[u] * kernel[(i - u)];
>> > | ^ ^
>> > |
>> > help: remove these parentheses
>> > |
>> > 49 - conv[i] += self[u] * kernel[(i - u)];
>> > 49 + conv[i] += self[u] * kernel[i - u];
>> > |
>> >
>> > error: aborting due to 2 previous errors
>> >
>> > error: doctest failed, to rerun pass `--doc`
>> >
>> >
>> > crates.io lists this version as being released more than 3 years ago and
>> > targeting the 2018 edition of rust. When built with our current
>> > rust-1.68.2 the doc test passes but not with 1.70.0. The current
>> > upstream version of nalgebra is 0.32.3, so it's unlikely that they'd
>> > release a new version with the doc tests fixed, but I haven't contacted
>> > them about it.
>>
>> OK. Asking in ##rust on libera chat (unofficial channel), I got as
>> suggestion
>> to call 'carge test' with the '--cap-lints=allow' option documented
>> here [0], which should effectively disable just the lint checks, which
>> is better than disabling the full test suite.
>>
>> [0] https://doc.rust-lang.org/rustc/lints/levels.html
>
> I checked the cargo-build-system and we do actually use
> --cap-lints=allow for building and for testing.
Ah! It must be something recent, as it was not the case (and still
isn't) when I checked on the master branch. Or else I fail to see
where/how it's specified.
And nalgebra still fails lint tests with the above --caps-lints=allow
option? If that's so that'd suggest that packages can enforce their own
settings and that this overrides cargo flags given at the command
line... which sounds like a cargo bug.
--
Thanks,
Maxim