Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

'cargo test --all' fails on macOS 10.14 (Mojave) #928

@adrianbrink

Description

@adrianbrink

Building on macOS 10.14 works since #886 . However running the tests fails on 9c9c5777b716d2574938e08fe499df6e95d2c671.

   Compiling sr-api v0.1.0 (/Users/adrian/Desktop/code/polkadot/substrate/core/sr-api)                                                                                                                                                [2/2268]
   Compiling substrate-executor v0.1.0 (/Users/adrian/Desktop/code/polkadot/substrate/core/executor)
   Compiling srml-system v0.1.0 (/Users/adrian/Desktop/code/polkadot/substrate/srml/system)
   Compiling substrate-test-runtime v0.1.0 (/Users/adrian/Desktop/code/polkadot/substrate/core/test-runtime)
error[E0423]: expected function, found struct variant `TransactionValidity::Valid`
   --> core/transaction-pool/graph/src/pool.rs:334:8
    |
334 |                 Ok(TransactionValidity::Valid(
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^ did you mean `TransactionValidity::Valid { /* fields */ }`?

error[E0061]: this function takes 0 parameters but 1 parameter was supplied
   --> core/transaction-pool/graph/src/pool.rs:391:19
    |
271 |     pub fn ready(&self) -> impl Iterator<Item=TransactionFor<B>> {
    |     ------------------------------------------------------------ defined here
...
391 |         assert_eq!(pool.ready(|pending| pending.map(|tx| tx.hash.clone()).collect::<Vec<_>>()), vec![hash]);
    |                         ^^^^^ expected 0 parameters

error[E0369]: binary operation `==` cannot be applied to type `impl std::iter::Iterator`
   --> core/transaction-pool/graph/src/pool.rs:391:3
    |
391 |         assert_eq!(pool.ready(|pending| pending.map(|tx| tx.hash.clone()).collect::<Vec<_>>()), vec![hash]);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: an implementation of `std::cmp::PartialEq` might be missing for `impl std::iter::Iterator`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0277]: `impl std::iter::Iterator` doesn't implement `std::fmt::Debug`
   --> core/transaction-pool/graph/src/pool.rs:391:3
    |
391 |         assert_eq!(pool.ready(|pending| pending.map(|tx| tx.hash.clone()).collect::<Vec<_>>()), vec![hash]);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `impl std::iter::Iterator` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
    |
    = help: the trait `std::fmt::Debug` is not implemented for `impl std::iter::Iterator`
    = note: required because of the requirements on the impl of `std::fmt::Debug` for `&impl std::iter::Iterator`
    = note: required by `std::fmt::Debug::fmt`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0599]: no method named `all` found for type `pool::Pool<pool::tests::TestApi>` in the current scope
   --> core/transaction-pool/graph/src/pool.rs:482:19
    |
79  | pub struct Pool<B: ChainApi> {
    | ---------------------------- method `all` not found for this
...
482 |         assert_eq!(pool.all(3).len(), 0);
    |                         ^^^
    |
    = help: items from traits can only be used if the trait is implemented and in scope
    = note: the following trait defines an item `all`, perhaps you need to implement it:
            candidate #1: `std::iter::Iterator`

error: aborting due to 5 previous errors

Some errors occurred: E0061, E0277, E0369, E0423, E0599.
For more information about an error, try `rustc --explain E0061`.
error: Could not compile `substrate-transaction-graph`.
warning: build failed, waiting for other jobs to finish...
error: build failed

I've noticed that there isn't a CI integration that runs the tests. Is it expected for the tests to always run successfully?

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