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

bump wasm-bindgen to 0.2.51 #681

Merged
merged 4 commits into from
Oct 11, 2019
Merged

Conversation

ctaggart
Copy link
Contributor

@ctaggart ctaggart commented Oct 6, 2019

I think the problems in #586 go away with wasm-bindgen 0.2.51. My app compiles and runs with this combination.

@ctaggart
Copy link
Contributor Author

ctaggart commented Oct 6, 2019

It may be worth mentioning that in my app, I'm using stdweb = "0.4.19" and running rust nightly.

@ctaggart
Copy link
Contributor Author

ctaggart commented Oct 6, 2019

This new version of wasm-bindgen is using async/await, so it will need Rust 1.0.39 or above which becomes stable in a month.

.travis.yml Show resolved Hide resolved
@jstarry
Copy link
Member

jstarry commented Oct 6, 2019

@ctaggart I think the error in CI is the same error I was seeing on later versions of wasm-bindgen. Not sure why this is happening yet 🤷‍♂

@ctaggart
Copy link
Contributor Author

ctaggart commented Oct 7, 2019

I'm able to reproduce the error in CI with:

wasm-pack test --headless --chrome -- --features wasm_test --test vtag_test

To debug in chrome, just remove the --headless.

[INFO]: 🎯  Checking for the Wasm target...
   Compiling yew v0.10.0 (/Users/cameron/rs/yew)
    Finished dev [unoptimized + debuginfo] target(s) in 4.84s
   Compiling yew v0.10.0 (/Users/cameron/rs/yew)
    Finished dev [unoptimized + debuginfo] target(s) in 3.13s
     Running target/wasm32-unknown-unknown/debug/deps/vtag_test-5787caba51472b0c.wasm
Running headless tests in Chrome on `http://127.0.0.1:53873/`
Try find `webdriver.json` for configure browser's capabilities:
Not found
running 16 tests                                  

test vtag_test::it_checks_misleading_gt ... ok
test vtag_test::it_checks_mixed_closing_tags ... ok
test vtag_test::it_allows_aria_attributes ... ok
test vtag_test::it_compares_checked ... ok
test vtag_test::it_compares_kinds ... ok
test vtag_test::it_compares_values ... ok
test vtag_test::keeps_order_of_classes ... ok
test vtag_test::supports_svg ... FAIL
test vtag_test::supports_multiple_classes_vec ... ok
test vtag_test::supports_multiple_classes_string ... ok
test vtag_test::classes_from_local_variables ... ok
test vtag_test::it_compares_classes ... ok
test vtag_test::it_compares_children ... ok
test vtag_test::it_compares_attributes ... ok
test vtag_test::it_compares_text ... ok
test vtag_test::it_compares_tags ... ok

failures:

---- vtag_test::supports_svg output ----
    error output:
        wasm-bindgen: imported JS function that was not marked as `catch` threw an error: expected a number argument
        
        Stack:
        Error: expected a number argument
            at _assertNum (http://127.0.0.1:53872/wasm-bindgen-test:48:39)
            at imports.wbg.__wbg_cargowebsnippet1c30acb32a1994a07c75e804ae9855b43f191d63_beff0ef6225b5524 (http://127.0.0.1:53872/wasm-bindgen-test:1141:13)
            at stdweb::webcore::initialization::initialize::snippet::__cargo_web_snippet_1c30acb32a1994a07c75e804ae9855b43f191d63::__cargo_web_snippet_1c30acb32a1994a07c75e804ae9855b43f191d63::h18950609c7a1cc14 (wasm-function[4590]:0x19c203)
            at stdweb::webcore::initialization::initialize::snippet::__cargo_web_snippet_1c30acb32a1994a07c75e804ae9855b43f191d63::h821c229247e168f7 (wasm-function[8730]:0x1dd1a7)
            at stdweb::webcore::initialization::initialize::snippet::hbc1973c07faf38ab (wasm-function[8833]:0x1dd7ed)
            at stdweb::webcore::initialization::initialize::he0742ef887fb22e7 (wasm-function[3020]:0x16bd62)
            at stdweb::webcore::ffi::wasm_bindgen::get_module::hca38bfffdf994bc9 (wasm-function[8452]:0x1db40d)
            at stdweb::webapi::document::document::snippet::__cargo_web_snippet_6fcce0aae651e2d748e085ff1f800f87625ff8c8::hc0ca4204b9ec4a16 (wasm-function[6435]:0x1c1493)
            at stdweb::webapi::document::document::snippet::h99e6984dd9080559 (wasm-function[6735]:0x1c621a)
            at stdweb::webapi::document::document::h6caa3f5aac207969 (wasm-function[774]:0xd665d)
    
    JS exception that was thrown:
        Error: expected a number argument
            at _assertNum (http://127.0.0.1:53872/wasm-bindgen-test:48:39)
            at imports.wbg.__wbg_cargowebsnippet1c30acb32a1994a07c75e804ae9855b43f191d63_beff0ef6225b5524 (http://127.0.0.1:53872/wasm-bindgen-test:1141:13)
            at stdweb::webcore::initialization::initialize::snippet::__cargo_web_snippet_1c30acb32a1994a07c75e804ae9855b43f191d63::__cargo_web_snippet_1c30acb32a1994a07c75e804ae9855b43f191d63::h18950609c7a1cc14 (wasm-function[4590]:0x19c203)
            at stdweb::webcore::initialization::initialize::snippet::__cargo_web_snippet_1c30acb32a1994a07c75e804ae9855b43f191d63::h821c229247e168f7 (wasm-function[8730]:0x1dd1a7)
            at stdweb::webcore::initialization::initialize::snippet::hbc1973c07faf38ab (wasm-function[8833]:0x1dd7ed)
            at stdweb::webcore::initialization::initialize::he0742ef887fb22e7 (wasm-function[3020]:0x16bd62)
            at stdweb::webcore::ffi::wasm_bindgen::get_module::hca38bfffdf994bc9 (wasm-function[8452]:0x1db40d)
            at stdweb::webapi::document::document::snippet::__cargo_web_snippet_6fcce0aae651e2d748e085ff1f800f87625ff8c8::hc0ca4204b9ec4a16 (wasm-function[6435]:0x1c1493)
            at stdweb::webapi::document::document::snippet::h99e6984dd9080559 (wasm-function[6735]:0x1c621a)
            at stdweb::webapi::document::document::h6caa3f5aac207969 (wasm-function[774]:0xd665d)

failures:

    vtag_test::supports_svg

test result: FAILED. 15 passed; 1 failed; 0 ignored
console.log div contained:
    wasm-bindgen: imported JS function that was not marked as `catch` threw an error:
    expected a number argument
    
    Stack:
    Error: expected a number argument
        at _assertNum (http://127.0.0.1:53872/wasm-bindgen-test:48:39)
        at imports.wbg.__wbg_cargowebsnippet1c30acb32a1994a07c75e804ae9855b43f191d63_beff0ef6225b5524 (http://127.0.0.1:53872/wasm-bindgen-test:1141:13)
        at stdweb::webcore::initialization::initialize::snippet::__cargo_web_snippet_1c30acb32a1994a07c75e804ae9855b43f191d63::__cargo_web_snippet_1c30acb32a1994a07c75e804ae9855b43f191d63::h18950609c7a1cc14 (wasm-function[4590]:0x19c203)
        at stdweb::webcore::initialization::initialize::snippet::__cargo_web_snippet_1c30acb32a1994a07c75e804ae9855b43f191d63::h821c229247e168f7 (wasm-function[8730]:0x1dd1a7)
        at stdweb::webcore::initialization::initialize::snippet::hbc1973c07faf38ab (wasm-function[8833]:0x1dd7ed)
        at stdweb::webcore::initialization::initialize::he0742ef887fb22e7 (wasm-function[3020]:0x16bd62)
        at stdweb::webcore::ffi::wasm_bindgen::get_module::hca38bfffdf994bc9 (wasm-function[8452]:0x1db40d)
        at stdweb::webapi::document::document::snippet::__cargo_web_snippet_6fcce0aae651e2d748e085ff1f800f87625ff8c8::hc0ca4204b9ec4a16 (wasm-function[6435]:0x1c1493)
        at stdweb::webapi::document::document::snippet::h99e6984dd9080559 (wasm-function[6735]:0x1c621a)
        at stdweb::webapi::document::document::h6caa3f5aac207969 (wasm-function[774]:0xd665d)

error: some tests failed                          
error: test failed, to rerun pass '--test vtag_test'
Error: Running Wasm tests with wasm-bindgen-test failed
Caused by: failed to execute `cargo test`: exited with exit code: 1

I think it is just the supports_svg test. I think it is reproducible with just document().

@ctaggart
Copy link
Contributor Author

ctaggart commented Oct 7, 2019

It reproduces with just:

use wasm_bindgen_test::{wasm_bindgen_test, wasm_bindgen_test_configure};
wasm_bindgen_test_configure!(run_in_browser);
#[wasm_bindgen_test]
fn test_document() {
    stdweb::web::document();
}

@ctaggart
Copy link
Contributor Author

ctaggart commented Oct 7, 2019

I submitted the minimal test to koute/stdweb#373

@jstarry
Copy link
Member

jstarry commented Oct 7, 2019

Thanks for digging in! Are you sure this only affects tests?

@ctaggart
Copy link
Contributor Author

ctaggart commented Oct 7, 2019

No, I am not.

@ctaggart
Copy link
Contributor Author

ctaggart commented Oct 7, 2019

This needs to wait for stdweb 0.4.20 for compatibility.

@jstarry
Copy link
Member

jstarry commented Oct 10, 2019

@ctaggart stdweb 0.4.20 is out! Want to give it a whirl?

@ctaggart
Copy link
Contributor Author

ctaggart commented Oct 11, 2019

This test works for me locally now! Let's see if we can get CI to light up green too.

wasm-pack test --headless --chrome -- --features wasm_test --test vtag_test

@ctaggart
Copy link
Contributor Author

CI is green! I just need to remove the submodule changes. One sec.

@jstarry jstarry changed the base branch from master to futures October 11, 2019 13:02
@jstarry
Copy link
Member

jstarry commented Oct 11, 2019

Let's keep master on stable for now and have futures-related work live in the futures branch until 1.39.0 is released. Sound good?

@jstarry jstarry merged commit 54ca9b4 into yewstack:futures Oct 11, 2019
@ctaggart ctaggart deleted the wasm-bindgen-version branch October 11, 2019 14:52
jstarry pushed a commit to jstarry/yew that referenced this pull request Nov 10, 2019
* upgrade wasm-bindgen to 0.2.51

* Run macro tests on beta and update readme

* Update README.md

* Update .travis.yml
jstarry pushed a commit that referenced this pull request Nov 11, 2019
* bump wasm-bindgen to 0.2.51 (#681)

* upgrade wasm-bindgen to 0.2.51

* Run macro tests on beta and update readme

* Update README.md

* Update .travis.yml

* implement send_future

* cargo fmt

* add todo question

* static dispatch on Error in future

* Add framework for example using futures

* add a basic future to indicate that futures work

* change example to fetch markdown instead of just resolving a string

* remove unnneded import

* Force users to handle errors in their future

* Force users to handle errors in their future

* cleanup and introduction of FetchState

* respond to feedback

* update comment

* fix cargo.toml dependency issues
llebout pushed a commit to llebout/yew that referenced this pull request Jan 20, 2020
* bump wasm-bindgen to 0.2.51 (yewstack#681)

* upgrade wasm-bindgen to 0.2.51

* Run macro tests on beta and update readme

* Update README.md

* Update .travis.yml

* implement send_future

* cargo fmt

* add todo question

* static dispatch on Error in future

* Add framework for example using futures

* add a basic future to indicate that futures work

* change example to fetch markdown instead of just resolving a string

* remove unnneded import

* Force users to handle errors in their future

* Force users to handle errors in their future

* cleanup and introduction of FetchState

* respond to feedback

* update comment

* fix cargo.toml dependency issues
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

Successfully merging this pull request may close these issues.

2 participants