Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI Generated sample program does not work #241

Closed
HBnetDE opened this issue Nov 27, 2022 · 30 comments
Closed

CLI Generated sample program does not work #241

HBnetDE opened this issue Nov 27, 2022 · 30 comments
Labels
A-cli Area: command line interface C-bug Category: bug tribble-reported This issue was reported through Tribble.

Comments

@HBnetDE
Copy link

HBnetDE commented Nov 27, 2022

This issue is reporting a bug in the code of Perseus. Details of the scope will be available in issue labels.
The author described their issue as follows:

I have created an app with perseus new (cli version = 0.4.0.beta.11). Then I attempt to start it with perseus serve. It fails to build.

The steps to reproduce this issue are as follows:

  1. perseus new client
  1. cd client && perseus serve

A minimum reproducible example is available at <>.

  • Hydration-related: false
  • The author is willing to attempt a fix: false
Tribble internal data

dHJpYmJsZS1yZXBvcnRlZCxDLWJ1ZyxBLWNsaQ==

@github-actions github-actions bot added A-cli Area: command line interface C-bug Category: bug tribble-reported This issue was reported through Tribble. labels Nov 27, 2022
@arctic-hen7
Copy link
Member

What error are you getting?

@enrand22
Copy link

Had same issue, updated Rust to 1.65.0 and worked.

@arctic-hen7
Copy link
Member

Ah, I see. That would be because Perseus relies internally on GATs, which were only stabilized in 1.65.0. I haven't updated the MSRV yet (since usually it's in line with Sycamore). Thanks for the report!

@arctic-hen7
Copy link
Member

@HBnetDE please let me know if updating to Rust v1.65.0 doesn't solve your issue.

@HBnetDE
Copy link
Author

HBnetDE commented Nov 29, 2022

I am already at rust 1.65.

Errors produced by perseus serve (edited to remove username)

error[E0432]: unresolved import `crate::sys::IoSourceState`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:12:5
   |
12 | use crate::sys::IoSourceState;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ no `IoSourceState` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:15:17
   |
15 | use crate::sys::tcp::{bind, listen, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:13:17
   |
13 | use crate::sys::tcp::{connect, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0433]: failed to resolve: could not find `Selector` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:301:18
    |
301 |             sys::Selector::new().map(|selector| Poll {
    |                  ^^^^^^^^ could not find `Selector` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:24:14
   |
24 |         sys::event::token(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:38:14
   |
38 |         sys::event::is_readable(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:43:14
   |
43 |         sys::event::is_writable(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:68:14
   |
68 |         sys::event::is_error(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:99:14
   |
99 |         sys::event::is_read_closed(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:129:14
    |
129 |         sys::event::is_write_closed(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:151:14
    |
151 |         sys::event::is_priority(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:173:14
    |
173 |         sys::event::is_aio(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:183:14
    |
183 |         sys::event::is_lio(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:221:26
    |
221 |                     sys::event::debug_details(f, self.0)
    |                          ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `tcp` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:103:18
    |
103 |             sys::tcp::accept(inner).map(|(stream, addr)| (TcpStream::from_std(stream), addr))
    |                  ^^^ could not find `tcp` in `sys`

error[E0433]: failed to resolve: could not find `udp` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:122:14
    |
122 |         sys::udp::bind(addr).map(UdpSocket::from_std)
    |              ^^^ could not find `udp` in `sys`

error[E0433]: failed to resolve: could not find `udp` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:544:14
    |
544 |         sys::udp::only_v6(&self.inner)
    |              ^^^ could not find `udp` in `sys`

error[E0412]: cannot find type `Selector` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:255:20
    |
255 |     selector: sys::Selector,
    |                    ^^^^^^^^ not found in `sys`

error[E0412]: cannot find type `Selector` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:689:44
    |
689 |     pub(crate) fn selector(&self) -> &sys::Selector {
    |                                            ^^^^^^^^ not found in `sys`

error[E0412]: cannot find type `Waker` in module `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/waker.rs:79:17
   |
79 |     inner: sys::Waker,
   |                 ^^^^^ not found in `sys`
   |
help: consider importing one of these items
   |
1  | use core::task::Waker;
   |
1  | use crate::Waker;
   |
1  | use std::task::Waker;
   |
help: if you import `Waker`, refer to it directly
   |
79 -     inner: sys::Waker,
79 +     inner: Waker,
   |

error[E0433]: failed to resolve: could not find `Waker` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/waker.rs:87:14
   |
87 |         sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
   |              ^^^^^ not found in `sys`
   |
help: consider importing one of these items
   |
1  | use core::task::Waker;
   |
1  | use crate::Waker;
   |
1  | use std::task::Waker;
   |
help: if you import `Waker`, refer to it directly
   |
87 -         sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
87 +         Waker::new(registry.selector(), token).map(|inner| Waker { inner })
   |

error[E0412]: cannot find type `Event` in module `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:18:17
   |
18 |     inner: sys::Event,
   |                 ^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::event::Event;
   |
help: if you import `Event`, refer to it directly
   |
18 -     inner: sys::Event,
18 +     inner: Event,
   |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:187:55
    |
187 |     pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
    |                                                       ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
187 -     pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
187 +     pub(crate) fn from_sys_event_ref(sys_event: &Event) -> &Event {
    |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:191:41
    |
191 |             &*(sys_event as *const sys::Event as *const Event)
    |                                         ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
191 -             &*(sys_event as *const sys::Event as *const Event)
191 +             &*(sys_event as *const Event as *const Event)
    |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:217:46
    |
217 |             struct EventDetails<'a>(&'a sys::Event);
    |                                              ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
217 -             struct EventDetails<'a>(&'a sys::Event);
217 +             struct EventDetails<'a>(&'a Event);
    |

error[E0412]: cannot find type `Events` in module `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:43:17
   |
43 |     inner: sys::Events,
   |                 ^^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::Events;
   |
help: if you import `Events`, refer to it directly
   |
43 -     inner: sys::Events,
43 +     inner: Events,
   |

error[E0433]: failed to resolve: could not find `Events` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:94:25
   |
94 |             inner: sys::Events::with_capacity(capacity),
   |                         ^^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::Events;
   |
help: if you import `Events`, refer to it directly
   |
94 -             inner: sys::Events::with_capacity(capacity),
94 +             inner: Events::with_capacity(capacity),
   |

error[E0412]: cannot find type `Events` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:189:47
    |
189 |     pub(crate) fn sys(&mut self) -> &mut sys::Events {
    |                                               ^^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::Events;
    |
help: if you import `Events`, refer to it directly
    |
189 -     pub(crate) fn sys(&mut self) -> &mut sys::Events {
189 +     pub(crate) fn sys(&mut self) -> &mut Events {
    |

error[E0425]: cannot find function `set_reuseaddr` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:74:9
   |
74 |         set_reuseaddr(&listener.inner, true)?;
   |         ^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:74:24
   |
74 |         set_reuseaddr(&listener.inner, true)?;
   |                        ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:76:15
   |
76 |         bind(&listener.inner, addr)?;
   |               ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:77:17
   |
77 |         listen(&listener.inner, 1024)?;
   |                 ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:78:12
   |
78 |         Ok(listener)
   |            ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `stream` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:90:18
   |
90 |         connect(&stream.inner, addr)?;
   |                  ^^^^^^ not found in this scope

error[E0425]: cannot find value `stream` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:91:12
   |
91 |         Ok(stream)
   |            ^^^^^^ not found in this scope

error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:146:20
    |
146 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:155:20
    |
155 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:159:20
    |
159 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:325:20
    |
325 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:334:20
    |
334 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:338:20
    |
338 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `register` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:622:20
    |
622 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:631:20
    |
631 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:635:20
    |
635 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0412, E0425, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `mio` due to 44 previous errors
warning: build failed, waiting for other jobs to finish...

@enrand22
Copy link

enrand22 commented Nov 29, 2022

Seems that you are getting the wrong wasm. On instructions when creating a new app you should write:
perseus new client --wasm-opt-version version_110

instead of just:
perseus new client

i guess is part of being in beta

@arctic-hen7
Copy link
Member

@enrand22 you're right that this looks like a Wasm problem, but not adding that extra flag shouldn't cause this. If that were the problem, you shouldn't be able to even get to compiling the app.

@HBnetDE could you provide the outputs of perseus snoop build and perseus snoop wasm-build? Those will try to build the engine-side and browser-side of the app independently, which might give us a better clue of what's going on. To me, it looks like a Cargo problem...

@arctic-hen7 arctic-hen7 reopened this Nov 29, 2022
@HBnetDE
Copy link
Author

HBnetDE commented Nov 30, 2022

perseus snoop build
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `dist/target_engine/debug/client`

That seems like very little output for a build?

perseus snoop wasm-build
   Compiling mio v0.8.5
   Compiling web-sys v0.3.60
   Compiling wasm-bindgen-futures v0.4.33
error[E0432]: unresolved import `crate::sys::IoSourceState`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:12:5
   |
12 | use crate::sys::IoSourceState;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ no `IoSourceState` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:15:17
   |
15 | use crate::sys::tcp::{bind, listen, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:13:17
   |
13 | use crate::sys::tcp::{connect, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0433]: failed to resolve: could not find `Selector` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:301:18
    |
301 |             sys::Selector::new().map(|selector| Poll {
    |                  ^^^^^^^^ could not find `Selector` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:24:14
   |
24 |         sys::event::token(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:38:14
   |
38 |         sys::event::is_readable(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:43:14
   |
43 |         sys::event::is_writable(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:68:14
   |
68 |         sys::event::is_error(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:99:14
   |
99 |         sys::event::is_read_closed(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:129:14
    |
129 |         sys::event::is_write_closed(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:151:14
    |
151 |         sys::event::is_priority(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:173:14
    |
173 |         sys::event::is_aio(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:183:14
    |
183 |         sys::event::is_lio(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:221:26
    |
221 |                     sys::event::debug_details(f, self.0)
    |                          ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `tcp` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:103:18
    |
103 |             sys::tcp::accept(inner).map(|(stream, addr)| (TcpStream::from_std(stream), addr))
    |                  ^^^ could not find `tcp` in `sys`

error[E0433]: failed to resolve: could not find `udp` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:122:14
    |
122 |         sys::udp::bind(addr).map(UdpSocket::from_std)
    |              ^^^ could not find `udp` in `sys`

error[E0433]: failed to resolve: could not find `udp` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:544:14
    |
544 |         sys::udp::only_v6(&self.inner)
    |              ^^^ could not find `udp` in `sys`

error[E0412]: cannot find type `Selector` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:255:20
    |
255 |     selector: sys::Selector,
    |                    ^^^^^^^^ not found in `sys`

error[E0412]: cannot find type `Selector` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:689:44
    |
689 |     pub(crate) fn selector(&self) -> &sys::Selector {
    |                                            ^^^^^^^^ not found in `sys`

error[E0412]: cannot find type `Waker` in module `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/waker.rs:79:17
   |
79 |     inner: sys::Waker,
   |                 ^^^^^ not found in `sys`
   |
help: consider importing one of these items
   |
1  | use core::task::Waker;
   |
1  | use crate::Waker;
   |
1  | use std::task::Waker;
   |
help: if you import `Waker`, refer to it directly
   |
79 -     inner: sys::Waker,
79 +     inner: Waker,
   |

error[E0433]: failed to resolve: could not find `Waker` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/waker.rs:87:14
   |
87 |         sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
   |              ^^^^^ not found in `sys`
   |
help: consider importing one of these items
   |
1  | use core::task::Waker;
   |
1  | use crate::Waker;
   |
1  | use std::task::Waker;
   |
help: if you import `Waker`, refer to it directly
   |
87 -         sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
87 +         Waker::new(registry.selector(), token).map(|inner| Waker { inner })
   |

error[E0412]: cannot find type `Event` in module `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:18:17
   |
18 |     inner: sys::Event,
   |                 ^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::event::Event;
   |
help: if you import `Event`, refer to it directly
   |
18 -     inner: sys::Event,
18 +     inner: Event,
   |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:187:55
    |
187 |     pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
    |                                                       ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
187 -     pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
187 +     pub(crate) fn from_sys_event_ref(sys_event: &Event) -> &Event {
    |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:191:41
    |
191 |             &*(sys_event as *const sys::Event as *const Event)
    |                                         ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
191 -             &*(sys_event as *const sys::Event as *const Event)
191 +             &*(sys_event as *const Event as *const Event)
    |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:217:46
    |
217 |             struct EventDetails<'a>(&'a sys::Event);
    |                                              ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
217 -             struct EventDetails<'a>(&'a sys::Event);
217 +             struct EventDetails<'a>(&'a Event);
    |

error[E0412]: cannot find type `Events` in module `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:43:17
   |
43 |     inner: sys::Events,
   |                 ^^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::Events;
   |
help: if you import `Events`, refer to it directly
   |
43 -     inner: sys::Events,
43 +     inner: Events,
   |

error[E0433]: failed to resolve: could not find `Events` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:94:25
   |
94 |             inner: sys::Events::with_capacity(capacity),
   |                         ^^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::Events;
   |
help: if you import `Events`, refer to it directly
   |
94 -             inner: sys::Events::with_capacity(capacity),
94 +             inner: Events::with_capacity(capacity),
   |

error[E0412]: cannot find type `Events` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:189:47
    |
189 |     pub(crate) fn sys(&mut self) -> &mut sys::Events {
    |                                               ^^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::Events;
    |
help: if you import `Events`, refer to it directly
    |
189 -     pub(crate) fn sys(&mut self) -> &mut sys::Events {
189 +     pub(crate) fn sys(&mut self) -> &mut Events {
    |

error[E0425]: cannot find function `set_reuseaddr` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:74:9
   |
74 |         set_reuseaddr(&listener.inner, true)?;
   |         ^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:74:24
   |
74 |         set_reuseaddr(&listener.inner, true)?;
   |                        ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:76:15
   |
76 |         bind(&listener.inner, addr)?;
   |               ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:77:17
   |
77 |         listen(&listener.inner, 1024)?;
   |                 ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:78:12
   |
78 |         Ok(listener)
   |            ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `stream` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:90:18
   |
90 |         connect(&stream.inner, addr)?;
   |                  ^^^^^^ not found in this scope

error[E0425]: cannot find value `stream` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:91:12
   |
91 |         Ok(stream)
   |            ^^^^^^ not found in this scope

error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:146:20
    |
146 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:155:20
    |
155 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:159:20
    |
159 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:325:20
    |
325 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:334:20
    |
334 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

   Compiling sycamore-futures v0.8.0
error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:338:20
    |
338 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `register` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:622:20
    |
622 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:631:20
    |
631 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:635:20
    |
635 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0412, E0425, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `mio` due to 44 previous errors
warning: build failed, waiting for other jobs to finish...

@arctic-hen7
Copy link
Member

Alright, your engine-side build is normal, but the Wasm build is completely broken. Are you using rustup? Also, what OS are you running?

@HBnetDE
Copy link
Author

HBnetDE commented Dec 1, 2022

Yes, I am using rustup. My OS is Linux - Ubuntu 22.04.

@rieval
Copy link

rieval commented Dec 2, 2022

Same issue here. I'm using GitHub Workflows and build with Debian 11 based Docker. However, work fine in Windows 10 (all cli command, rustc 1.67.0-nightly).

Dockerfile:

FROM rust:slim AS build

ARG CLI_VERSION=0.4.0-beta.11

# -------------------- snip --------------------

RUN rustup toolchain install nightly

RUN rustup default nightly

RUN rustup update

RUN cargo install perseus-cli --version ${CLI_VERSION}

RUN perseus deploy

# -------------------- snip --------------------

Cargo.toml:

# snip
[dependencies]
perseus = { git = "https://github.com/framesurge/perseus.git", features = [
    "hydrate",
] }
sycamore = { version = "*", features = ["hydrate", "ssr"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
perseus-axum = { git = "https://github.com/framesurge/perseus.git", features = [
    "dflt-server",
] }
tokio = { version = "*", features = ["macros", "rt", "rt-multi-thread"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "*"
wee_alloc = "*"
# snip

workflows log:

#29 239.2    Compiling perseus v0.4.0-beta.11 (https://github.com/framesurge/perseus.git#9e6501a9)
#29 239.2    Compiling flate2 v1.0.25
#29 239.2    Compiling url v2.3.1
#29 239.2    Compiling webpki-roots v0.22.5
#29 239.2    Compiling chunked_transfer v1.4.0
#29 239.2    Compiling base64 v0.13.1
#29 239.2    Compiling closure v0.3.0
#29 239.2    Compiling perseus-axum v0.4.0-beta.11 (https://github.com/framesurge/perseus.git#9e6501a9)
#29 239.2    Compiling ureq v2.5.0
#29 239.2    Compiling frontend v0.1.0 (/app)
#29 239.2     Finished release [optimized] target(s) in 3m 53s
#29 239.2      Running `dist/target_engine/release/frontend`
#29 239.2 thread 'main' panicked at 'you must provide your own error pages in production', /usr/local/cargo/git/checkouts/perseus-f6f2bdad302e666f/9e6501a/packages/perseus/src/error_pages.rs:306:9
#29 239.2 stack backtrace:
#29 239.2    0: rust_begin_unwind
#29 239.2              at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:575:5
#29 239.2    1: core::panicking::panic_fmt
#29 239.2              at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/core/src/panicking.rs:65:14
#29 239.2    2: <perseus::error_pages::ErrorPages<G> as core::default::Default>::default
#29 239.2    3: perseus::init::PerseusAppBase<G,perseus::stores::mutable::FsMutableStore,T>::new
#29 239.2    4: frontend::__perseus_simple_main
#29 239.2    5: perseus::engine::dflt_engine::run_dflt_engine::{{closure}}
#29 239.2    6: tokio::runtime::park::CachedParkThread::block_on
#29 239.2    7: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
#29 239.2    8: tokio::runtime::runtime::Runtime::block_on
#29 239.2    9: frontend::main
#29 239.2 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
#29 ERROR: process "/bin/sh -c RUST_BACKTRACE=1 perseus deploy" did not complete successfully: exit code: 1
------
 > [build 20/20] RUN RUST_BACKTRACE=1 perseus deploy:
#29 239.2              at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/core/src/panicking.rs:65:14
#29 239.2    2: <perseus::error_pages::ErrorPages<G> as core::default::Default>::default
#29 239.2    3: perseus::init::PerseusAppBase<G,perseus::stores::mutable::FsMutableStore,T>::new
#29 239.2    4: frontend::__perseus_simple_main
#29 239.2    5: perseus::engine::dflt_engine::run_dflt_engine::{{closure}}
#29 239.2    6: tokio::runtime::park::CachedParkThread::block_on
#29 239.2    7: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
#29 239.2    8: tokio::runtime::runtime::Runtime::block_on
#29 239.2    9: frontend::main
#29 239.2 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
------
Dockerfile:51
--------------------
  49 |     RUN perseus clean
  50 |     
  51 | >>> RUN RUST_BACKTRACE=1 perseus deploy
  52 |     
  53 |     FROM debian:11-slim
--------------------
ERROR: failed to solve: process "/bin/sh -c RUST_BACKTRACE=1 perseus deploy" did not complete successfully: exit code: 1

with RUST_BACKTRACE=full:

#29 218.0    Compiling perseus v0.4.0-beta.11 (https://github.com/framesurge/perseus.git#9e6501a9)
#29 218.0    Compiling flate2 v1.0.25
#29 218.0    Compiling url v2.3.1
#29 218.0    Compiling webpki-roots v0.22.5
#29 218.0    Compiling closure v0.3.0
#29 218.0    Compiling base64 v0.13.1
#29 218.0    Compiling chunked_transfer v1.4.0
#29 218.0    Compiling ureq v2.5.0
#29 218.0    Compiling perseus-axum v0.4.0-beta.11 (https://github.com/framesurge/perseus.git#9e6501a9)
#29 218.0    Compiling frontend v0.1.0 (/app)
#29 218.0     Finished release [optimized] target(s) in 3m 34s
#29 218.0      Running `dist/target_engine/release/frontend`
#29 218.0 thread 'main' panicked at 'you must provide your own error pages in production', /usr/local/cargo/git/checkouts/perseus-f6f2bdad302e666f/9e6501a/packages/perseus/src/error_pages.rs:306:9
#29 218.0 stack backtrace:
#29 218.0    0:     0x55a12742ba9a - std::backtrace_rs::backtrace::libunwind::trace::hec1c9a33ec35a782
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
#29 218.0    1:     0x55a12742ba9a - std::backtrace_rs::backtrace::trace_unsynchronized::hef44794102f9589c
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
#29 218.0    2:     0x55a12742ba9a - std::sys_common::backtrace::_print_fmt::h3d085ebafa3ff4d4
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/sys_common/backtrace.rs:65:5
#29 218.0    3:     0x55a12742ba9a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1dc483ce0b0acc38
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/sys_common/backtrace.rs:44:22
#29 218.0    4:     0x55a127452eee - core::fmt::write::hdde74b1f9f025400
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/core/src/fmt/mod.rs:[1208](https://github.com/Tangel/koi-no/actions/runs/3599858142/jobs/6063881127#step:6:1210):17
#29 218.0    5:     0x55a127425d55 - std::io::Write::write_fmt::h93bb2bce537087eb
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/io/mod.rs:1682:15
#29 218.0    6:     0x55a12742b865 - std::sys_common::backtrace::_print::hffbee7406e6f5871
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/sys_common/backtrace.rs:47:5
#29 218.0    7:     0x55a12742b865 - std::sys_common::backtrace::print::ha3e39199dd4aff7e
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/sys_common/backtrace.rs:34:9
#29 218.0    8:     0x55a12742d04f - std::panicking::default_hook::{{closure}}::h9d3052b99dbdb269
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:267:22
#29 218.0    9:     0x55a12742cd8b - std::panicking::default_hook::hf85cde60e828679e
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:286:9
#29 218.0   10:     0x55a12742d75c - std::panicking::rust_panic_with_hook::h7bb6b938bd4ce622
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:688:13
#29 218.0   11:     0x55a12742d4b2 - std::panicking::begin_panic_handler::{{closure}}::h894513d3c9ea77f1
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:577:13
#29 218.0   12:     0x55a12742bf4c - std::sys_common::backtrace::__rust_end_short_backtrace::h478da9df1dc8d9c3
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/sys_common/backtrace.rs:137:18
#29 218.0   13:     0x55a12742d202 - rust_begin_unwind
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:575:5
#29 218.0   14:     0x55a127099373 - core::panicking::panic_fmt::h0f7f0682c1639601
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/core/src/panicking.rs:65:14
#29 218.0   15:     0x55a12710fdb9 - <perseus::error_pages::ErrorPages<G> as core::default::Default>::default::h9530715906577bfd
#29 218.0   16:     0x55a1270aac64 - perseus::init::PerseusAppBase<G,perseus::stores::mutable::FsMutableStore,T>::new::h733ff80722ab637c
#29 218.0   17:     0x55a12719080c - frontend::__perseus_simple_main::h8036ffff2c7e7a86
#29 218.0   18:     0x55a1270d759f - perseus::engine::dflt_engine::run_dflt_engine::{{closure}}::hd9c97dd908b58959
#29 218.0   19:     0x55a1270cf4b0 - tokio::runtime::park::CachedParkThread::block_on::h22fc48c8149dbe34
#29 218.0   20:     0x55a1270a760b - tokio::runtime::scheduler::multi_thread::MultiThread::block_on::h163fe71d846bd96d
#29 218.0   21:     0x55a127156a10 - tokio::runtime::runtime::Runtime::block_on::ha11bc5bc26d78aa3
#29 218.0   22:     0x55a127190d2f - frontend::main::h47a05cdbfe823592
#29 218.0   23:     0x55a12711e603 - std::sys_common::backtrace::__rust_begin_short_backtrace::h5fc47d3e25f2b1d7
#29 218.0   24:     0x55a127149d39 - std::rt::lang_start::{{closure}}::h04d38424564156fa
#29 218.0   25:     0x55a12742112c - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h162ddbe93a8e5d3d
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/core/src/ops/function.rs:606:13
#29 218.0   26:     0x55a12742112c - std::panicking::try::do_call::h21b0f0d525d215e5
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:483:40
#29 218.0   27:     0x55a12742112c - std::panicking::try::hd61d2ba99b8182e3
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:447:19
#29 218.0   28:     0x55a12742112c - std::panic::catch_unwind::hd6b0ecc6b055e1e0
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panic.rs:137:14
#29 218.0   29:     0x55a12742112c - std::rt::lang_start_internal::{{closure}}::ha91d000e2bcaf66a
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/rt.rs:148:48
#29 218.0   30:     0x55a12742112c - std::panicking::try::do_call::h594aa1d798036a46
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:483:40
#29 218.0   31:     0x55a12742112c - std::panicking::try::h5ac6b9132cb32902
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:447:19
#29 218.0   32:     0x55a12742112c - std::panic::catch_unwind::h72555755a0c1dc12
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panic.rs:137:14
#29 218.0   33:     0x55a12742112c - std::rt::lang_start_internal::heaabc2d640d42dd4
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/rt.rs:148:20
#29 218.0   34:     0x55a127190e05 - main
#29 218.0   35:     0x7f974d844d0a - __libc_start_main
#29 218.0   36:     0x55a1270997ca - _start
#29 218.0   37:                0x0 - <unknown>
#29 ERROR: process "/bin/sh -c RUST_BACKTRACE=full perseus deploy" did not complete successfully: exit code: 1
------
 > [build 20/20] RUN RUST_BACKTRACE=full perseus deploy:
#29 218.0   31:     0x55a12742112c - std::panicking::try::h5ac6b9132cb32902
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panicking.rs:447:19
#29 218.0   32:     0x55a12742112c - std::panic::catch_unwind::h72555755a0c1dc12
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/panic.rs:137:14
#29 218.0   33:     0x55a12742112c - std::rt::lang_start_internal::heaabc2d640d42dd4
#29 218.0                                at /rustc/c090c6880c0183ba248bde4a16e29ba29ac4fbba/library/std/src/rt.rs:148:20
#29 218.0   34:     0x55a127190e05 - main
#29 218.0   35:     0x7f974d844d0a - __libc_start_main
#29 218.0   36:     0x55a1270997ca - _start
#29 218.0   37:                0x0 - <unknown>
------
Dockerfile:51
--------------------
  49 |     RUN perseus clean
  50 |     
  51 | >>> RUN RUST_BACKTRACE=full perseus deploy
  52 |     
  53 |     FROM debian:11-slim
--------------------
ERROR: failed to solve: process "/bin/sh -c RUST_BACKTRACE=full perseus deploy" did not complete successfully: exit code: 1

image

@HBnetDE
Copy link
Author

HBnetDE commented Dec 2, 2022

@rieval as an aside: you should know that wee_alloc is unmaintained and leaks memory.
rustwasm/wee_alloc#107
rustwasm/wee_alloc#106

@arctic-hen7
Copy link
Member

@rieval could you try with a usual crates.io dependency? The main branch has about 8 breaking changes on it right now, some relating to how error pages are handled, which could be causing your problem. I'm fairly certain these two problems are different though, so would you mind opening a separate issue?

@arctic-hen7
Copy link
Member

@HBnetDE can you try renaming ~/.cargo/registry to ~/.cargo/registry.old? Then run perseus clean && cargo clean in your app's directory, and then try perseus check. That will completely reset your system-level Cargo cache, which can sometimes fix really strange problems like this. I've done it a few times myself for other weird errors, and it's worked. (Just changing the registry directory shouldn't have any other adverse consequences.)

@rieval
Copy link

rieval commented Dec 5, 2022

@rieval could you try with a usual crates.io dependency? The main branch has about 8 breaking changes on it right now, some relating to how error pages are handled, which could be causing your problem. I'm fairly certain these two problems are different though, so would you mind opening a separate issue?

I realized that it was really two different problems, and it was my fault.

I tested 0.4.0-beta.11, and it worked fine(Windows and Debian).

[dependencies]
perseus = { version = "0.4.0-beta.11", features = ["hydrate"] }
serde = { version = "*", features = ["derive"] }
serde_json = "*"
sycamore = { version = "*", features = ["hydrate", "ssr"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
perseus-axum = { version = "0.4.0-beta.11", features = ["dflt-server"] }

@rieval
Copy link

rieval commented Dec 5, 2022

@rieval as an aside: you should know that wee_alloc is unmaintained and leaks memory. rustwasm/wee_alloc#107 rustwasm/wee_alloc#106

Oops! Thanks for letting me know.

@arctic-hen7
Copy link
Member

@rieval no problem, likely my fault, there are a lot of breaking changes on main right now!

@HBnetDE
Copy link
Author

HBnetDE commented Dec 9, 2022

Output of perseus check after renaming ~/.cargo/registry and cleaning
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
   Compiling wasm-bindgen-macro-support v0.2.83
    Checking futures-util v0.3.25
    Checking mio v0.8.5
   Compiling serde v1.0.147
   Compiling darling_macro v0.13.4
    Checking bytes v1.3.0
   Compiling paste v1.0.9
   Compiling unicode-xid v0.2.4
   Compiling async-trait v0.1.58
   Compiling itoa v1.0.4
   Compiling regex-syntax v0.6.28
   Compiling ryu v1.0.11
error[E0432]: unresolved import `crate::sys::IoSourceState`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:12:5
   |
12 | use crate::sys::IoSourceState;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ no `IoSourceState` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:15:17
   |
15 | use crate::sys::tcp::{bind, listen, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:13:17
   |
13 | use crate::sys::tcp::{connect, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0433]: failed to resolve: could not find `Selector` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:301:18
    |
301 |             sys::Selector::new().map(|selector| Poll {
    |                  ^^^^^^^^ could not find `Selector` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:24:14
   |
24 |         sys::event::token(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:38:14
   |
38 |         sys::event::is_readable(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:43:14
   |
43 |         sys::event::is_writable(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:68:14
   |
68 |         sys::event::is_error(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:99:14
   |
99 |         sys::event::is_read_closed(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:129:14
    |
129 |         sys::event::is_write_closed(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:151:14
    |
151 |         sys::event::is_priority(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:173:14
    |
173 |         sys::event::is_aio(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:183:14
    |
183 |         sys::event::is_lio(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:221:26
    |
221 |                     sys::event::debug_details(f, self.0)
    |                          ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `tcp` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:103:18
    |
103 |             sys::tcp::accept(inner).map(|(stream, addr)| (TcpStream::from_std(stream), addr))
    |                  ^^^ could not find `tcp` in `sys`

error[E0433]: failed to resolve: could not find `udp` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:122:14
    |
122 |         sys::udp::bind(addr).map(UdpSocket::from_std)
    |              ^^^ could not find `udp` in `sys`

error[E0433]: failed to resolve: could not find `udp` in `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:544:14
    |
544 |         sys::udp::only_v6(&self.inner)
    |              ^^^ could not find `udp` in `sys`

error[E0412]: cannot find type `Selector` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:255:20
    |
255 |     selector: sys::Selector,
    |                    ^^^^^^^^ not found in `sys`

error[E0412]: cannot find type `Selector` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:689:44
    |
689 |     pub(crate) fn selector(&self) -> &sys::Selector {
    |                                            ^^^^^^^^ not found in `sys`

error[E0412]: cannot find type `Waker` in module `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/waker.rs:79:17
   |
79 |     inner: sys::Waker,
   |                 ^^^^^ not found in `sys`
   |
help: consider importing one of these items
   |
1  | use core::task::Waker;
   |
1  | use crate::Waker;
   |
1  | use std::task::Waker;
   |
help: if you import `Waker`, refer to it directly
   |
79 -     inner: sys::Waker,
79 +     inner: Waker,
   |

error[E0433]: failed to resolve: could not find `Waker` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/waker.rs:87:14
   |
87 |         sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
   |              ^^^^^ not found in `sys`
   |
help: consider importing one of these items
   |
1  | use core::task::Waker;
   |
1  | use crate::Waker;
   |
1  | use std::task::Waker;
   |
help: if you import `Waker`, refer to it directly
   |
87 -         sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
87 +         Waker::new(registry.selector(), token).map(|inner| Waker { inner })
   |

error[E0412]: cannot find type `Event` in module `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:18:17
   |
18 |     inner: sys::Event,
   |                 ^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::event::Event;
   |
help: if you import `Event`, refer to it directly
   |
18 -     inner: sys::Event,
18 +     inner: Event,
   |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:187:55
    |
187 |     pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
    |                                                       ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
187 -     pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
187 +     pub(crate) fn from_sys_event_ref(sys_event: &Event) -> &Event {
    |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:191:41
    |
191 |             &*(sys_event as *const sys::Event as *const Event)
    |                                         ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
191 -             &*(sys_event as *const sys::Event as *const Event)
191 +             &*(sys_event as *const Event as *const Event)
    |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:217:46
    |
217 |             struct EventDetails<'a>(&'a sys::Event);
    |                                              ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
217 -             struct EventDetails<'a>(&'a sys::Event);
217 +             struct EventDetails<'a>(&'a Event);
    |

error[E0412]: cannot find type `Events` in module `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:43:17
   |
43 |     inner: sys::Events,
   |                 ^^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::Events;
   |
help: if you import `Events`, refer to it directly
   |
43 -     inner: sys::Events,
43 +     inner: Events,
   |

error[E0433]: failed to resolve: could not find `Events` in `sys`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:94:25
   |
94 |             inner: sys::Events::with_capacity(capacity),
   |                         ^^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::Events;
   |
help: if you import `Events`, refer to it directly
   |
94 -             inner: sys::Events::with_capacity(capacity),
94 +             inner: Events::with_capacity(capacity),
   |

error[E0412]: cannot find type `Events` in module `sys`
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:189:47
    |
189 |     pub(crate) fn sys(&mut self) -> &mut sys::Events {
    |                                               ^^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::Events;
    |
help: if you import `Events`, refer to it directly
    |
189 -     pub(crate) fn sys(&mut self) -> &mut sys::Events {
189 +     pub(crate) fn sys(&mut self) -> &mut Events {
    |

error[E0425]: cannot find function `set_reuseaddr` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:74:9
   |
74 |         set_reuseaddr(&listener.inner, true)?;
   |         ^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:74:24
   |
74 |         set_reuseaddr(&listener.inner, true)?;
   |                        ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:76:15
   |
76 |         bind(&listener.inner, addr)?;
   |               ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:77:17
   |
77 |         listen(&listener.inner, 1024)?;
   |                 ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:78:12
   |
78 |         Ok(listener)
   |            ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `stream` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:90:18
   |
90 |         connect(&stream.inner, addr)?;
   |                  ^^^^^^ not found in this scope

error[E0425]: cannot find value `stream` in this scope
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:91:12
   |
91 |         Ok(stream)
   |            ^^^^^^ not found in this scope

   Compiling sycamore-router-macro v0.8.0
   Compiling sycamore-reactive v0.8.1
error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:146:20
    |
146 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:155:20
    |
155 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:159:20
    |
159 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:325:20
    |
325 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:334:20
    |
334 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:338:20
    |
338 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `register` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:622:20
    |
622 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:631:20
    |
631 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:635:20
    |
635 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0412, E0425, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `mio` due to 44 previous errors
warning: build failed, waiting for other jobs to finish...

looks like still the same error to me.

@arctic-hen7
Copy link
Member

arctic-hen7 commented Dec 12, 2022

I really have no clue what could be causing this, sorry. I'm on Ubuntu 22.04 as well, and I'm not experiencing this issue. The output of RUST_BACKTRACE=1 perseus snoop wasm-build might contain some clues, but can I just check for absolute certainty that you are definitely using the pure output of perseus new? I've seen these kinds of issues before with Wasm, but only when using a non-Wasm crate, like reqwest or something, in Wasm. For that reason, Perseus advises dependency splitting. But that shouldn't be necessary in the demo app...can you post your Cargo.toml?

Also, maybe run rustup target add wasm32-unknown-unknown to make sure you actually have the Wasm target installed. This should be automatically executed by the CLI, but it might perhaps be being skipped over, and that might have caused this.

The only other thing I can think of right now is that you might have an override somewhere in ~/.cargo for the perseus crate? It's pretty unlikely, but that might cause this...

@HBnetDE
Copy link
Author

HBnetDE commented Dec 12, 2022

It definitely isn't the missing target, since I can build and run sycamore on its own just fine. And yes it is definitely unmodified. I even deleted the app and recreated it before I opened the issue, just to be sure.

I'll check the snoop and the override when I have time.

@lukechu10
Copy link
Contributor

That's weird because somehow mio is being compiled for wasm which it should not. That's where the errors are comming from. As to why it's being compiled for wasm, I don't know.

@arctic-hen7
Copy link
Member

This is why I thought about clearing the registry, in case there was an old version of Tokio doing weird things. Unless there's a new version of Tokio doing weird things?

@HBnetDE
Copy link
Author

HBnetDE commented Dec 24, 2022

Hey, sorry it took so long!

Here is the output of RUST_BACKTRACE=1 perseus snoop wasm-build:

[NOTE]: You should expect unused code warnings here! Don't worry about them, they're just a product of the target-gating.
   Compiling sycamore-core v0.8.2
   Compiling js-sys v0.3.60
   Compiling mio v0.8.5
   Compiling futures v0.3.25
   Compiling console_error_panic_hook v0.1.7
error[E0432]: unresolved import `crate::sys::IoSourceState`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:12:5
   |
12 | use crate::sys::IoSourceState;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ no `IoSourceState` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:15:17
   |
15 | use crate::sys::tcp::{bind, listen, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:13:17
   |
13 | use crate::sys::tcp::{connect, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0433]: failed to resolve: could not find `Selector` in `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:301:18
    |
301 |             sys::Selector::new().map(|selector| Poll {
    |                  ^^^^^^^^ could not find `Selector` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:24:14
   |
24 |         sys::event::token(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:38:14
   |
38 |         sys::event::is_readable(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:43:14
   |
43 |         sys::event::is_writable(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:68:14
   |
68 |         sys::event::is_error(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:99:14
   |
99 |         sys::event::is_read_closed(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:129:14
    |
129 |         sys::event::is_write_closed(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:151:14
    |
151 |         sys::event::is_priority(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:173:14
    |
173 |         sys::event::is_aio(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:183:14
    |
183 |         sys::event::is_lio(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:221:26
    |
221 |                     sys::event::debug_details(f, self.0)
    |                          ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `tcp` in `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:103:18
    |
103 |             sys::tcp::accept(inner).map(|(stream, addr)| (TcpStream::from_std(stream), addr))
    |                  ^^^ could not find `tcp` in `sys`

error[E0433]: failed to resolve: could not find `udp` in `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:122:14
    |
122 |         sys::udp::bind(addr).map(UdpSocket::from_std)
    |              ^^^ could not find `udp` in `sys`

error[E0433]: failed to resolve: could not find `udp` in `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:544:14
    |
544 |         sys::udp::only_v6(&self.inner)
    |              ^^^ could not find `udp` in `sys`

error[E0412]: cannot find type `Selector` in module `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:255:20
    |
255 |     selector: sys::Selector,
    |                    ^^^^^^^^ not found in `sys`

error[E0412]: cannot find type `Selector` in module `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/poll.rs:689:44
    |
689 |     pub(crate) fn selector(&self) -> &sys::Selector {
    |                                            ^^^^^^^^ not found in `sys`

error[E0412]: cannot find type `Waker` in module `sys`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/waker.rs:79:17
   |
79 |     inner: sys::Waker,
   |                 ^^^^^ not found in `sys`
   |
help: consider importing one of these items
   |
1  | use core::task::Waker;
   |
1  | use crate::Waker;
   |
1  | use std::task::Waker;
   |
help: if you import `Waker`, refer to it directly
   |
79 -     inner: sys::Waker,
79 +     inner: Waker,
   |

error[E0433]: failed to resolve: could not find `Waker` in `sys`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/waker.rs:87:14
   |
87 |         sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
   |              ^^^^^ not found in `sys`
   |
help: consider importing one of these items
   |
1  | use core::task::Waker;
   |
1  | use crate::Waker;
   |
1  | use std::task::Waker;
   |
help: if you import `Waker`, refer to it directly
   |
87 -         sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
87 +         Waker::new(registry.selector(), token).map(|inner| Waker { inner })
   |

error[E0412]: cannot find type `Event` in module `sys`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:18:17
   |
18 |     inner: sys::Event,
   |                 ^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::event::Event;
   |
help: if you import `Event`, refer to it directly
   |
18 -     inner: sys::Event,
18 +     inner: Event,
   |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:187:55
    |
187 |     pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
    |                                                       ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
187 -     pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
187 +     pub(crate) fn from_sys_event_ref(sys_event: &Event) -> &Event {
    |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:191:41
    |
191 |             &*(sys_event as *const sys::Event as *const Event)
    |                                         ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
191 -             &*(sys_event as *const sys::Event as *const Event)
191 +             &*(sys_event as *const Event as *const Event)
    |

error[E0412]: cannot find type `Event` in module `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/event.rs:217:46
    |
217 |             struct EventDetails<'a>(&'a sys::Event);
    |                                              ^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
217 -             struct EventDetails<'a>(&'a sys::Event);
217 +             struct EventDetails<'a>(&'a Event);
    |

error[E0412]: cannot find type `Events` in module `sys`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:43:17
   |
43 |     inner: sys::Events,
   |                 ^^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::Events;
   |
help: if you import `Events`, refer to it directly
   |
43 -     inner: sys::Events,
43 +     inner: Events,
   |

error[E0433]: failed to resolve: could not find `Events` in `sys`
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:94:25
   |
94 |             inner: sys::Events::with_capacity(capacity),
   |                         ^^^^^^ not found in `sys`
   |
help: consider importing this struct
   |
1  | use crate::Events;
   |
help: if you import `Events`, refer to it directly
   |
94 -             inner: sys::Events::with_capacity(capacity),
94 +             inner: Events::with_capacity(capacity),
   |

error[E0412]: cannot find type `Events` in module `sys`
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/events.rs:189:47
    |
189 |     pub(crate) fn sys(&mut self) -> &mut sys::Events {
    |                                               ^^^^^^ not found in `sys`
    |
help: consider importing this struct
    |
1   | use crate::Events;
    |
help: if you import `Events`, refer to it directly
    |
189 -     pub(crate) fn sys(&mut self) -> &mut sys::Events {
189 +     pub(crate) fn sys(&mut self) -> &mut Events {
    |

error[E0425]: cannot find function `set_reuseaddr` in this scope
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:74:9
   |
74 |         set_reuseaddr(&listener.inner, true)?;
   |         ^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:74:24
   |
74 |         set_reuseaddr(&listener.inner, true)?;
   |                        ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:76:15
   |
76 |         bind(&listener.inner, addr)?;
   |               ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:77:17
   |
77 |         listen(&listener.inner, 1024)?;
   |                 ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:78:12
   |
78 |         Ok(listener)
   |            ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `stream` in this scope
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:90:18
   |
90 |         connect(&stream.inner, addr)?;
   |                  ^^^^^^ not found in this scope

error[E0425]: cannot find value `stream` in this scope
  --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:91:12
   |
91 |         Ok(stream)
   |            ^^^^^^ not found in this scope

error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:146:20
    |
146 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:155:20
    |
155 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/listener.rs:159:20
    |
159 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpListener>`
    |
   ::: /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:325:20
    |
325 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:334:20
    |
334 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/tcp/stream.rs:338:20
    |
338 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::TcpStream>`
    |
   ::: /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `register` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:622:20
    |
622 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:631:20
    |
631 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/net/udp.rs:635:20
    |
635 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<std::net::UdpSocket>`
    |
   ::: /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/io_source.rs:62:1
    |
62  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /home/bene/.cargo/registry/src/github.com-1ecc6299db9ec823/mio-0.8.5/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

Some errors have detailed explanations: E0412, E0425, E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `mio` due to 44 previous errors
warning: build failed, waiting for other jobs to finish...

I also double checked my Cargo.toml:

[package]
name = "client"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

# Dependencies for the engine and the browser go here
[dependencies]
perseus = { version = "=0.4.0-beta.11" }
sycamore = "^0.8.1"
serde = { version = "1", features = [ "derive" ] }
serde_json = "1"

# Engine-only dependencies go here
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1", features = [ "macros", "rt", "rt-multi-thread" ] }
perseus-warp = { version = "=0.4.0-beta.11", features = [ "dflt-server" ] }

# Browser-only dependencies go here
[target.'cfg(target_arch = "wasm32")'.dependencies]

@arctic-hen7
Copy link
Member

No problem! Your Cargo.toml looks fine unfortunately (that would've been an easy fix), and, worse still, I've installed an entirely fresh system on my laptop, and I cannot replicate this issue. My best idea at this point is for you to totally reinstall Rust on your system, as the only thing that makes sense to me at this point is some kind of old residual package somewhere. (Even though mio v0.8.5 is the latest version...)

@arctic-hen7
Copy link
Member

@HBnetDE have you had any luck with this? There have been a few new beta versions over the last few weeks, so it might be worth trying those as well.

@arctic-hen7
Copy link
Member

@HBnetDE let me know if you're still experiencing this issue and I'll reopen. Closing for now.

@HBnetDE
Copy link
Author

HBnetDE commented Feb 4, 2023

@arctic-hen7 Sorry it took me so long to get back to this. I just tried this with version 0.4.0-beta.17 and it's working now

@arctic-hen7
Copy link
Member

No problem, glad it's working! Let me know if you ever figure out what the problem was!

@El-Wumbus
Copy link

El-Wumbus commented Jun 4, 2023

It seems I was experiencing this same issue when the crate was included in my workspace with other crates, but when it wasn't, it was fine. I added resolver = "2" to my workspace's Cargo.toml and it solved the issue. Everything else seems to work fine with the newer resolver.

@arctic-hen7
Copy link
Member

Ah yes @El-Wumbus I've had the same problem myself a few times! Pretty sure that was in the FAQs at some point, but I'm not sure if it still is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: command line interface C-bug Category: bug tribble-reported This issue was reported through Tribble.
Projects
None yet
Development

No branches or pull requests

6 participants