ci is failing due to clippy error on doctest signature in gh but not locally. root cause and fix.
Closed this issue · 2 comments
malandis commented
Clippy passes locally on main and even though the versions of cargo and clippy are identical between my macos and the GitHub action runner.
malandis commented
I don't know why clippy doesn't fail locally even though the commands are the same. I will address the error directly:
error: bound is defined in more than one place
--> test-util/src/test_utils.rs:20:22
|
20 | pub fn doctest<'ctx, Fn: 'ctx, Fut: 'ctx>(func: Fn) -> DoctestResult
| ^^
21 | where
22 | Fn: FnOnce(String, CredentialProvider) -> Fut,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
= note: `-D clippy::multiple-bound-locations` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::multiple_bound_locations)]`
error: bound is defined in more than one place
--> test-util/src/test_utils.rs:20:32
|
20 | pub fn doctest<'ctx, Fn: 'ctx, Fut: 'ctx>(func: Fn) -> DoctestResult
| ^^^
...
23 | Fut: Future<Output = DoctestResult>,
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
error: could not compile `momento-test-util` (lib) due to 2 previous errors
make: *** [Makefile:11: lint] Error 101
I will adjust the trait bounds and see if that fixes it on GH.