Skip to content

pyth-sdk-solana-0.10.6 fails to build #137

@ogoffart

Description

@ogoffart

    Checking pyth-sdk-solana v0.10.6
error[E0277]: the trait bound `Address: BorshSerialize` is not satisfied
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyth-sdk-solana-0.10.6/src/state.rs:251:5
    |
251 |     BorshSerialize,
    |     ^^^^^^^^^^^^^^ the trait `BorshSerialize` is not implemented for `Address`
    |
note: there are multiple different versions of crate `borsh` in the dependency graph
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/borsh-0.10.4/src/ser/mod.rs:44:1
    |
 44 | pub trait BorshSerialize {
    | ^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyth-sdk-solana-0.10.6/src/state.rs:3:5
    |
  3 | use borsh::{
    |     ----- one version of crate `borsh` used here, as a direct dependency of the current crate
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyth-sdk-solana-0.10.6/src/error.rs:2:5
    |
  2 | use solana_program::program_error::ProgramError;
    |     -------------- one version of crate `borsh` used here, as a dependency of crate `solana_program_error`
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/solana-address-1.0.0/src/lib.rs:87:1
    |
 87 | pub struct Address(pub(crate) [u8; 32]);
    | ------------------ this type doesn't implement the required trait
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/borsh-1.5.7/src/de/mod.rs:36:1
    |
 36 | pub trait BorshDeserialize: Sized {
    | --------------------------------- this is the found trait
    = help: you can use `cargo tree` to explore your dependency tree
    = help: see issue #48214
    = note: this error originates in the derive macro `BorshSerialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Address: BorshDeserialize` is not satisfied
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyth-sdk-solana-0.10.6/src/state.rs:252:5
    |
252 |     BorshDeserialize,
    |     ^^^^^^^^^^^^^^^^ the trait `BorshDeserialize` is not implemented for `Address`
    |
note: there are multiple different versions of crate `borsh` in the dependency graph
   --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/borsh-0.10.4/src/de/mod.rs:35:1
    |
 35 | pub trait BorshDeserialize: Sized {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this is the required trait
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyth-sdk-solana-0.10.6/src/state.rs:3:5
    |
  3 | use borsh::{
    |     ----- one version of crate `borsh` used here, as a direct dependency of the current crate
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pyth-sdk-solana-0.10.6/src/error.rs:2:5
    |
  2 | use solana_program::program_error::ProgramError;
    |     -------------- one version of crate `borsh` used here, as a dependency of crate `solana_program_error`
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/solana-address-1.0.0/src/lib.rs:87:1
    |
 87 | pub struct Address(pub(crate) [u8; 32]);
    | ------------------ this type doesn't implement the required trait
    |
   ::: /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/borsh-1.5.7/src/de/mod.rs:36:1
    |
 36 | pub trait BorshDeserialize: Sized {
    | --------------------------------- this is the found trait
    = help: you can use `cargo tree` to explore your dependency tree
    = help: see issue #48214
    = note: this error originates in the derive macro `BorshDeserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

This can even be reproduced by docs.rs which doesn't generate the docs for it

https://docs.rs/crate/pyth-sdk-solana
Log: https://docs.rs/crate/pyth-sdk-solana/0.10.6/builds/2414215

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions