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

stdweb feature no longer builds? #8

Closed
tangmi opened this issue Nov 2, 2019 · 1 comment
Closed

stdweb feature no longer builds? #8

tangmi opened this issue Nov 2, 2019 · 1 comment

Comments

@tangmi
Copy link

tangmi commented Nov 2, 2019

Hi, I noticed recently while working on winit that it no longer builds in the stdweb configuration due to this crate. Building instant directly yields (rustc 1.38.0 (625451e37 2019-09-23)):

PS D:\code\instant> cargo build --target wasm32-unknown-unknown --features stdweb
   Compiling instant v0.1.2 (D:\code\instant)
error[E0433]: failed to resolve: use of undeclared type or module `wasm_bindgen`
  --> src\wasm.rs:92:13
   |
92 |     let v = js! { return performance.now(); };
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type or module `wasm_bindgen`
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared type or module `WasmDescribe`
  --> src\wasm.rs:92:13
   |
92 |     let v = js! { return performance.now(); };
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type or module `WasmDescribe`
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0425]: cannot find function `inform` in this scope
  --> src\wasm.rs:92:13
   |
92 |     let v = js! { return performance.now(); };
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error[E0425]: cannot find value `FUNCTION` in this scope
  --> src\wasm.rs:92:13
   |
92 |     let v = js! { return performance.now(); };
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0425, E0433.
For more information about an error, try `rustc --explain E0425`.
error: Could not compile `instant`.

To learn more, run the command again with --verbose.

This was working in the past (sorry! I don't know exactly when!) and I noticed this in the last week or so. I'm pretty confident the stdweb and wasm-bindgen versions don't matter here, as I've tried older versions with the same results.

Adding an explicit dependency in instant's Cargo.toml to wasm-bindgen seems to solve the problem, but I'm mostly confused that (as far as I know) nothing changed to cause this break...?

Edit: I just realized I may have upgraded rust itself in between this working and not. Looking through the changelog, maybe rust-lang/cargo#6860 could cause a change here? But 1.36.0 was released in July and the last successful CI build for instant ran when 1.1.2 released earlier this month. 😕

@tangmi
Copy link
Author

tangmi commented Nov 2, 2019

Oh my goodness I'm such a doof, I wasn't building with cargo web. This is embarrassing.

Please ignore this issue!

@tangmi tangmi closed this as completed Nov 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant