Skip to content

Commit

Permalink
bump wasm-bindgen to 0.2.51 (#681)
Browse files Browse the repository at this point in the history
* upgrade wasm-bindgen to 0.2.51

* Run macro tests on beta and update readme

* Update README.md

* Update .travis.yml
  • Loading branch information
ctaggart authored and jstarry committed Oct 11, 2019
1 parent 4f31997 commit 54ca9b4
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 27 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ branches:
- staging
- trying
- master
- futures

language: rust

Expand All @@ -19,8 +20,8 @@ cache:
- $HOME/.local/share/cargo-web/emscripten

rust:
- 1.35.0 # min supported
- stable
# - 1.39.0 # min supported
# - stable
- beta
- nightly

Expand All @@ -33,7 +34,7 @@ install:
- nvm install 9
- rustup component add rustfmt
- rustup target add wasm32-unknown-unknown
- cargo install --force --version 0.2.42 -- wasm-bindgen-cli
- cargo install --force --version 0.2.51 -- wasm-bindgen-cli
- curl --retry 5 -LO https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip
- unzip chromedriver_linux64.zip
- ./ci/install_cargo_web.sh
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ toml = { version = "0.4", optional = true }
yew-macro = { version = "0.10.0", path = "crates/macro" }

[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))'.dependencies]
wasm-bindgen = "=0.2.42"
wasm-bindgen = "0.2.51"

[dev-dependencies]
serde_derive = "1"
trybuild = "1.0"
rustversion = "0.1"

[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))'.dev-dependencies]
wasm-bindgen-test = "0.2"
wasm-bindgen-test = "0.3.1"

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<p>
<a href="https://travis-ci.com/yewstack/yew"><img alt="Build Status" src="https://travis-ci.com/yewstack/yew.svg?branch=master"/></a>
<a href="https://gitter.im/yewframework/Lobby"><img alt="Gitter Chat" src="https://badges.gitter.im/yewframework.svg"/></a>
<a href="https://blog.rust-lang.org/2019/05/23/Rust-1.35.0.html"><img alt="Rustc Version 1.35+" src="https://img.shields.io/badge/rustc-1.35+-lightgray.svg"/></a>
<a href="https://blog.rust-lang.org/2019/09/30/Async-await-hits-beta.html"><img alt="Rustc Version beta (1.39)+" src="https://img.shields.io/badge/rustc-beta+-lightgray.svg"/></a>
</p>

<h4>
Expand Down
2 changes: 1 addition & 1 deletion examples/js_callback/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ yew = { path = "../.." }
stdweb = "^0.4.20"

[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))'.dependencies]
wasm-bindgen = "=0.2.42"
wasm-bindgen = "0.2.51"
7 changes: 4 additions & 3 deletions tests/derive_props/fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ error[E0599]: no method named `build` found for type `t3::PropsBuilder<t3::Props
| - method `build` not found for this
...
34 | Props::builder().build();
| ^^^^^
| ^^^^^ method not found in `t3::PropsBuilder<t3::PropsBuilderStep_missing_required_prop_value>`

error[E0599]: no method named `b` found for type `t4::PropsBuilder<t4::PropsBuilderStep_missing_required_prop_a>` in the current scope
--> $DIR/fail.rs:48:26
Expand All @@ -28,7 +28,8 @@ error[E0599]: no method named `b` found for type `t4::PropsBuilder<t4::PropsBuil
| - method `b` not found for this
...
48 | Props::builder().b(1).a(2).build();
| ^ help: did you mean: `a`
| ^ help: there is a method with a similar name: `a`

Some errors occurred: E0277, E0599.
Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `yew-tests`.
2 changes: 1 addition & 1 deletion tests/derive_props_test.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[allow(dead_code)]
#[rustversion::attr(stable(1.35.0), cfg_attr(not(feature = "web_test"), test))]
#[rustversion::attr(beta, cfg_attr(not(feature = "web_test"), test))]
fn tests() {
let t = trybuild::TestCases::new();
t.pass("tests/derive_props/pass.rs");
Expand Down
1 change: 1 addition & 0 deletions tests/macro/html-block-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
= note: required because of the requirements on the impl of `std::convert::Into<yew::virtual_dom::vnode::VNode<_>>` for `()`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `yew-tests`.
1 change: 1 addition & 0 deletions tests/macro/html-component-fail-unimplemented.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ error[E0277]: the trait bound `std::string::String: yew::html::Component` is not
| ^^^^^^ the trait `yew::html::Component` is not implemented for `std::string::String`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `yew-tests`.
27 changes: 16 additions & 11 deletions tests/macro/html-component-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ error: expected type, found `/`
--> $DIR/html-component-fail.rs:70:14
|
70 | html! { </Child> };
| ^
| ^ expected type

error: this open tag has no corresponding close tag
--> $DIR/html-component-fail.rs:71:13
Expand All @@ -47,7 +47,7 @@ error[E0599]: no method named `build` found for type `ChildPropertiesBuilder<Chi
| - method `build` not found for this
...
56 | html! { <Child with /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Expand All @@ -58,7 +58,7 @@ error[E0599]: no method named `build` found for type `ChildPropertiesBuilder<Chi
| - method `build` not found for this
...
57 | html! { <Child props /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Expand All @@ -69,7 +69,7 @@ error[E0599]: no method named `build` found for type `ChildPropertiesBuilder<Chi
| - method `build` not found for this
...
60 | html! { <Child with props () /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Expand All @@ -80,7 +80,7 @@ error[E0599]: no method named `build` found for type `ChildPropertiesBuilder<Chi
| - method `build` not found for this
...
61 | html! { <Child type=0 /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Expand All @@ -91,7 +91,7 @@ error[E0599]: no method named `build` found for type `ChildPropertiesBuilder<Chi
| - method `build` not found for this
...
62 | html! { <Child invalid-prop-name=0 /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Expand All @@ -110,7 +110,7 @@ error[E0599]: no method named `unknown` found for type `ChildPropertiesBuilder<C
| - method `unknown` not found for this
...
63 | html! { <Child unknown="unknown" /> };
| ^^^^^^^
| ^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`

error[E0599]: no method named `build` found for type `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>` in the current scope
--> $DIR/html-component-fail.rs:64:5
Expand All @@ -119,7 +119,7 @@ error[E0599]: no method named `build` found for type `ChildPropertiesBuilder<Chi
| - method `build` not found for this
...
64 | html! { <Child string= /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Expand Down Expand Up @@ -161,6 +161,10 @@ error[E0308]: mismatched types
|
68 | html! { <Child int=0u32 /> };
| ^^^^ expected i32, found u32
help: you can convert an `u32` to `i32` and panic if the converted value wouldn't fit
|
68 | html! { <Child int=0u32.try_into().unwrap() /> };
| ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no method named `string` found for type `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>` in the current scope
--> $DIR/html-component-fail.rs:69:20
Expand All @@ -169,7 +173,7 @@ error[E0599]: no method named `string` found for type `ChildPropertiesBuilder<Ch
| - method `string` not found for this
...
69 | html! { <Child string="abc" /> };
| ^^^^^^
| ^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`

error[E0599]: no method named `children` found for type `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>` in the current scope
--> $DIR/html-component-fail.rs:73:5
Expand All @@ -178,7 +182,7 @@ error[E0599]: no method named `children` found for type `ChildPropertiesBuilder<
| - method `children` not found for this
...
73 | html! { <Child>{ "Not allowed" }</Child> };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`
|
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Expand Down Expand Up @@ -227,5 +231,6 @@ error[E0277]: the trait bound `yew::virtual_dom::vcomp::VChild<Child, ChildConta
= note: required because of the requirements on the impl of `std::convert::Into<yew::virtual_dom::vcomp::VChild<Child, ChildContainer>>` for `yew::virtual_dom::vnode::VNode<_>`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

Some errors occurred: E0277, E0308, E0425, E0599, E0609.
Some errors have detailed explanations: E0277, E0308, E0425, E0599, E0609.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `yew-tests`.
1 change: 1 addition & 0 deletions tests/macro/html-iterable-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,4 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
= note: required because of the requirements on the impl of `std::convert::Into<yew::virtual_dom::vnode::VNode<_>>` for `&()`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `yew-tests`.
2 changes: 2 additions & 0 deletions tests/macro/html-list-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ error: expected valid html element
|
10 | html! { <>invalid</> };
| ^^^^^^^

error: could not compile `yew-tests`.
7 changes: 4 additions & 3 deletions tests/macro/html-node-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ error: unsupported type
11 | html! { b"str" };
| ^^^^^^

error: int literal is too large
error: integer literal is too large
--> $DIR/html-node-fail.rs:12:14
|
12 | html! { 1111111111111111111111111111111111111111111111111111111111111111111111111111 };
Expand All @@ -40,7 +40,7 @@ error: unsupported type
14 | html! { <span>{ b"str" }</span> };
| ^^^^^^

error: int literal is too large
error: integer literal is too large
--> $DIR/html-node-fail.rs:15:22
|
15 | html! { <span>{ 1111111111111111111111111111111111111111111111111111111111111111111111111111 }</span> };
Expand Down Expand Up @@ -76,5 +76,6 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
= note: required because of the requirements on the impl of `std::convert::From<()>` for `yew::virtual_dom::vnode::VNode<_>`
= note: required by `std::convert::From::from`

Some errors occurred: E0277, E0425.
Some errors have detailed explanations: E0277, E0425.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `yew-tests`.
3 changes: 2 additions & 1 deletion tests/macro/html-tag-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,6 @@ error[E0277]: the trait bound `yew::html::Href: std::convert::From<()>` is not s
<yew::html::Href as std::convert::From<std::string::String>>
= note: required because of the requirements on the impl of `std::convert::Into<yew::html::Href>` for `()`

Some errors occurred: E0277, E0308.
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `yew-tests`.
2 changes: 1 addition & 1 deletion tests/macro_test.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[allow(dead_code)]
#[rustversion::attr(stable(1.35.0), cfg_attr(not(feature = "web_test"), test))]
#[rustversion::attr(beta, cfg_attr(not(feature = "web_test"), test))]
fn tests() {
let t = trybuild::TestCases::new();

Expand Down

0 comments on commit 54ca9b4

Please sign in to comment.