You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I build for grandine binary, I got the error:
...
error: could not parse string literal: expected `,`
--> ssz/src/byte_vector.rs:27:18
|
27 | Copy(bound = "N: ArrayLength<u8, ArrayType: Copy>"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: could not parse bound
--> ssz/src/byte_vector.rs:27:18
|
27 | Copy(bound = "N: ArrayLength<u8, ArrayType: Copy>"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: could not parse string literal: expected `,`
--> ssz/src/contiguous_vector.rs:36:18
|
36 | Copy(bound = "T: Copy, N: ArrayLength<T, ArrayType: Copy>"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: could not parse bound
--> ssz/src/contiguous_vector.rs:36:18
|
36 | Copy(bound = "T: Copy, N: ArrayLength<T, ArrayType: Copy>"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0204]: the trait `std::marker::Copy` cannot be implemented for this type
--> ssz/src/contiguous_vector.rs:43:12
|
43 | pub struct ContiguousVector<T, N: ArrayLength<T>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 | elements: GenericArray<T, N>,
| ---------------------------- this field does not implement `std::marker::Copy`|
note: the `std::marker::Copy` impl for`GenericArray<T, N>` requires that `<N as ArrayLength<T>>::ArrayType: std::marker::Copy`
--> ssz/src/contiguous_vector.rs:44:15
|
44 | elements: GenericArray<T, N>,
| ^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0204`.
error: could not compile `ssz` (lib) due to 5 previous errors
but cargo test --release --no-fail-fast is indeed successful now. So, the CI action passed.
This is a serious engineering problem, in fact. We should guarantee the compilation successful even for develop branch to allow catching the simplest mistakes.
I have checked the codes in ssz, this compilation error is just a mistake to derivative Copy for ArrayLength which is like this:
pubunsafetraitArrayLength<T>:Unsigned{/// Associated type representing the array type for the numbertypeArrayType;}
ArrayType here which is an associated type is not implemented in above code. It is trivial to fix. (I also can help a PR if needed.)
My concern is that our current CI action does not catch this simplest compilation error. I suggest we just add a binary build step in the action. I also can help a PR for this.
The text was updated successfully, but these errors were encountered:
when I build for grandine binary, I got the error:
but
cargo test --release --no-fail-fast
is indeed successful now. So, the CI action passed.This is a serious engineering problem, in fact. We should guarantee the compilation successful even for
develop
branch to allow catching the simplest mistakes.I have checked the codes in ssz, this compilation error is just a mistake to derivative Copy for ArrayLength which is like this:
ArrayType
here which is an associated type is not implemented in above code. It is trivial to fix. (I also can help a PR if needed.)My concern is that our current CI action does not catch this simplest compilation error. I suggest we just add a binary build step in the action. I also can help a PR for this.
The text was updated successfully, but these errors were encountered: