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 Nov 10, 2019
1 parent e4b6512 commit 293c052
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 25 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ before_cache:
- ./ci/clear_cache.sh

rust:
- 1.35.0 # min supported
- stable
- 1.39.0 # min supported
# - stable (enable when 1.40.0 is released)
- beta
- nightly

Expand All @@ -31,7 +31,7 @@ install:
- rustup component add clippy
- rustup target add wasm32-unknown-unknown
- cargo install cargo-update || true
- cargo install-update-config --version =0.2.50 wasm-bindgen-cli
- cargo install-update-config --version =0.2.54 wasm-bindgen-cli
- cargo install-update wasm-bindgen-cli
- LATEST_CHROMEDRIVER_VERSION=`curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"`
- curl --retry 5 -LO "https://chromedriver.storage.googleapis.com/${LATEST_CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ 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.50"
wasm-bindgen = "0.2.54"

[target.'cfg(target_os = "emscripten")'.dependencies]
ryu = "=1.0.0" # 1.0.1 breaks emscripten
Expand All @@ -49,7 +49,7 @@ trybuild = "1.0"
rustversion = "0.1"

[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))'.dev-dependencies]
wasm-bindgen-test = "=0.2.50"
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/11/07/Rust-1.39.0.html"><img alt="Rustc Version 1.39+" src="https://img.shields.io/badge/rustc-1.39+-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.50"
wasm-bindgen = "0.2.54"
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
2 changes: 1 addition & 1 deletion tests/macro/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ macro_rules! pass_helper {
pass_helper! { @ html $($tail)* }
};
( @html $head:stmt; $($tail:tt)* ) => {
$head;
$head
pass_helper! { @ html $($tail)* }
};
( $($content:tt)* ) => {
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`.
14 changes: 8 additions & 6 deletions tests/macro/html-component-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ error: expected type, found `/`
--> $DIR/html-component-fail.rs:74:14
|
74 | html! { </Child> };
| ^
| ^ expected type

error: this open tag has no corresponding close tag
--> $DIR/html-component-fail.rs:75:13
Expand Down Expand Up @@ -113,7 +113,7 @@ error[E0599]: no method named `unknown` found for type `ChildPropertiesBuilder<C
| - method `unknown` not found for this
...
65 | html! { <Child unknown="unknown" /> };
| ^^^^^^^
| ^^^^^^^ method not found in `ChildPropertiesBuilder<ChildPropertiesBuilderStep_missing_required_prop_int>`

error[E0308]: mismatched types
--> $DIR/html-component-fail.rs:67:33
Expand Down Expand Up @@ -162,6 +162,10 @@ error[E0308]: mismatched types
|
72 | 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
|
72 | 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:73:20
Expand All @@ -170,7 +174,7 @@ error[E0599]: no method named `string` found for type `ChildPropertiesBuilder<Ch
| - method `string` not found for this
...
73 | 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:77:5
Expand All @@ -179,7 +183,7 @@ error[E0599]: no method named `children` found for type `ChildPropertiesBuilder<
| - method `children` not found for this
...
77 | 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,3 @@ 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.
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`.
4 changes: 1 addition & 3 deletions tests/macro/html-tag-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ error[E0599]: no method named `to_string` found for type `NotToString` in the cu
| ------------------- method `to_string` not found for this
...
37 | html! { <input string=NotToString /> };
| ^^^^^^^^^^^
| ^^^^^^^^^^^ method not found in `NotToString`
|
= note: the method `to_string` exists but the following trait bounds were not satisfied:
`NotToString : std::string::ToString`
Expand All @@ -213,5 +213,3 @@ error[E0308]: mismatched types
|
= note: expected type `yew::html::NodeRef`
found type `()`

Some errors occurred: E0277, E0308, E0599.
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(stable(1.39.0), cfg_attr(not(feature = "web_test"), test))]
fn tests() {
let t = trybuild::TestCases::new();

Expand Down

0 comments on commit 293c052

Please sign in to comment.