Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fix compilation on Windows #9561

Closed
wants to merge 3 commits into from
Closed

Conversation

ordian
Copy link
Collaborator

@ordian ordian commented Sep 14, 2018

Thanks to paritytech/jsonrpc/pull/311 it should fix compilation on windows.

@ordian ordian changed the title deps: cargo update-p jsonrpc-core deps: cargo update -p jsonrpc-core Sep 14, 2018
tomusdrw
tomusdrw previously approved these changes Sep 14, 2018
@tomusdrw tomusdrw added A2-insubstantial 👶 Pull request requires no code review (e.g., a sub-repository hash update). M4-core ⛓ Core client code / Rust. labels Sep 14, 2018
@5chdn 5chdn added this to the 2.2 milestone Sep 14, 2018
5chdn
5chdn previously approved these changes Sep 14, 2018
@ordian
Copy link
Collaborator Author

ordian commented Sep 14, 2018

@5chdn
Copy link
Contributor

5chdn commented Sep 14, 2018

looks good, but doesn't seem to fix windows.

error[E0308]: mismatched types
  --> cargo\git\checkouts\parity-tokio-ipc-05ab97e34cab4146\c0f80b4\src\lib.rs:92:27
   |
92 |         NamedPipe::new(p, handle)
   |                           ^^^^^^ expected struct `tokio_reactor::Handle`, found struct `tokio_core::reactor::Handle`
   |
   = note: expected type `&tokio_reactor::Handle`
              found type `&tokio_core::reactor::Handle`

error[E0308]: mismatched types
   --> cargo\git\checkouts\parity-tokio-ipc-05ab97e34cab4146\c0f80b4\src\lib.rs:149:36
    |
149 |     NamedPipe::from_pipe(mio_pipe, handle)
    |                                    ^^^^^^ expected struct `tokio_reactor::Handle`, found struct `tokio_core::reactor::Handle`
    |
    = note: expected type `&tokio_reactor::Handle`
               found type `&tokio_core::reactor::Handle`

error[E0061]: this function takes 1 parameter but 0 parameters were supplied
   --> cargo\git\checkouts\parity-tokio-ipc-05ab97e34cab4146\c0f80b4\src\lib.rs:186:37
    |
186 |                     self.inner.pipe.poll_write();
    |                                     ^^^^^^^^^^ expected 1 parameter

error[E0308]: mismatched types
   --> cargo\git\checkouts\parity-tokio-ipc-05ab97e34cab4146\c0f80b4\src\lib.rs:233:51
    |
233 |         let pipe = NamedPipe::from_pipe(mio_pipe, &handle)?;
    |                                                   ^^^^^^^ expected struct `tokio_reactor::Handle`, found reference
    |
    = note: expected type `&tokio_reactor::Handle`
               found type `&&tokio_core::reactor::Handle`

error[E0061]: this function takes 1 parameter but 0 parameters were supplied
   --> cargo\git\checkouts\parity-tokio-ipc-05ab97e34cab4146\c0f80b4\src\lib.rs:256:20
    |
256 |         self.inner.poll_read()
    |                    ^^^^^^^^^ expected 1 parameter

error[E0308]: mismatched types
   --> cargo\git\checkouts\parity-tokio-ipc-05ab97e34cab4146\c0f80b4\src\lib.rs:256:9
    |
255 |     fn poll_read(&mut self) -> Async<()> {
    |                                --------- expected `futures::Async<()>` because of return type
256 |         self.inner.poll_read()
    |         ^^^^^^^^^^^^^^^^^^^^^^ expected enum `futures::Async`, found enum `std::result::Result`
    |
    = note: expected type `futures::Async<()>`
               found type `std::result::Result<futures::Async<usize>, std::io::Error>`

error[E0061]: this function takes 1 parameter but 0 parameters were supplied
   --> cargo\git\checkouts\parity-tokio-ipc-05ab97e34cab4146\c0f80b4\src\lib.rs:260:20
    |
260 |         self.inner.poll_write()
    |                    ^^^^^^^^^^ expected 1 parameter

error[E0308]: mismatched types
   --> cargo\git\checkouts\parity-tokio-ipc-05ab97e34cab4146\c0f80b4\src\lib.rs:260:9
    |
259 |     fn poll_write(&mut self) -> Async<()> {
    |                                 --------- expected `futures::Async<()>` because of return type
260 |         self.inner.poll_write()
    |         ^^^^^^^^^^^^^^^^^^^^^^^ expected enum `futures::Async`, found enum `std::result::Result`
    |
    = note: expected type `futures::Async<()>`
               found type `std::result::Result<futures::Async<usize>, std::io::Error>`

error: aborting due to 8 previous errors

@ordian ordian added the A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. label Sep 14, 2018
@ordian
Copy link
Collaborator Author

ordian commented Sep 14, 2018

parity-tokio-ipc@c0f80b4039 depends on master branch of tokio-named-pipes

@ordian
Copy link
Collaborator Author

ordian commented Sep 14, 2018

It seems to compile on windows (at least parity-tokio-ipc), but note, that this solution is not sustainable, e.g. the build will break after next cargo update -p jsonrpc-core. The proper long-term solution is to migrate jsonrpc-core to the new API from parity-tokio-ipc.

@ordian ordian removed the A1-onice 🌨 Pull request is reviewed well, but should not yet be merged. label Sep 14, 2018
@5chdn
Copy link
Contributor

5chdn commented Sep 15, 2018

please merge master to update pipelines.

@ordian ordian changed the title deps: cargo update -p jsonrpc-core Fix compilation on Windows Sep 17, 2018
@ordian
Copy link
Collaborator Author

ordian commented Sep 17, 2018

Not sure which test has failed: https://gitlab.parity.io/parity/parity-ethereum/-/jobs/99009 :/

debris added a commit that referenced this pull request Sep 21, 2018
@ordian ordian closed this Sep 21, 2018
@ordian ordian deleted the ao-fix-windows branch September 21, 2018 11:26
debris added a commit that referenced this pull request Sep 24, 2018
* fix windows compilation, replaces #9561

* tokio-named-pipes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A2-insubstantial 👶 Pull request requires no code review (e.g., a sub-repository hash update). M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants