Update dependencies to latest (#510)

* Update dependencies

* Update dependencies again

* Enable cargo resolver v2

* Use hashbrown instead and add getrandom js feature flag

* cargo fmt

* Move benchmark to new crate
This commit is contained in:
Luke 2022-11-27 00:04:04 +00:00 committed by GitHub
parent 9d7af243d5
commit c33a808ade
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 115 additions and 96 deletions

View File

@ -20,7 +20,7 @@ jobs:
ref: ${{ github.base_ref }} ref: ${{ github.base_ref }}
- name: Run cargo bench on base - name: Run cargo bench on base
run: cargo bench run: cd packages/tools/bench && cargo bench
- name: Checkout repository head - name: Checkout repository head
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -30,7 +30,7 @@ jobs:
clean: false # Do not remove benchmark results from base branch clean: false # Do not remove benchmark results from base branch
- name: Run cargo bench on head - name: Run cargo bench on head
run: cargo bench run: cd packages/tools/bench && cargo bench
- name: Upload benchmark report - name: Upload benchmark report
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2

View File

@ -1,4 +1,5 @@
[workspace] [workspace]
resolver = "2"
members = [ members = [
# Packages # Packages
"packages/sycamore", "packages/sycamore",
@ -35,5 +36,6 @@ members = [
"website", "website",
# Tools # Tools
"packages/tools/bench",
"packages/tools/bench-diff", "packages/tools/bench-diff",
] ]

View File

@ -5,7 +5,7 @@ version = "0.1.0"
[dependencies] [dependencies]
pulldown-cmark = "0.9.2" pulldown-cmark = "0.9.2"
serde = { version = "1.0.136", features = ["derive"] } serde = { version = "1.0.147", features = ["derive"] }
serde_json = "1.0.79" serde_json = "1.0.89"
syntect = "5.0.0" syntect = "5.0.0"
walkdir = "2.3.2" walkdir = "2.3.2"

View File

@ -8,5 +8,5 @@ edition = "2021"
[dependencies] [dependencies]
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
console_log = "0.2.0" console_log = "0.2.0"
log = "0.4.14" log = "0.4.17"
sycamore = { path = "../../packages/sycamore" } sycamore = { path = "../../packages/sycamore" }

View File

@ -8,7 +8,7 @@ edition = "2021"
[dependencies] [dependencies]
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
console_log = "0.2.0" console_log = "0.2.0"
log = "0.4.14" log = "0.4.17"
reqwasm = "0.4.1" reqwasm = "0.5.0"
serde = "1.0.136" serde = "1.0.147"
sycamore = { path = "../../packages/sycamore", features = ["suspense"] } sycamore = { path = "../../packages/sycamore", features = ["suspense"] }

View File

@ -8,7 +8,7 @@ edition = "2021"
[dependencies] [dependencies]
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
console_log = "0.2.0" console_log = "0.2.0"
log = "0.4.14" log = "0.4.17"
reqwasm = "0.4.1" reqwasm = "0.5.0"
serde = "1.0.136" serde = "1.0.147"
sycamore = { path = "../../packages/sycamore", features = ["suspense"] } sycamore = { path = "../../packages/sycamore", features = ["suspense"] }

View File

@ -8,9 +8,9 @@ edition = "2021"
[dependencies] [dependencies]
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
console_log = "0.2.0" console_log = "0.2.0"
log = "0.4.14" log = "0.4.17"
sycamore = { path = "../../packages/sycamore", features = [ sycamore = { path = "../../packages/sycamore", features = [
"hydrate", "hydrate",
"ssr", "ssr",
] } ] }
wasm-bindgen = "0.2.79" wasm-bindgen = "0.2.83"

View File

@ -6,8 +6,8 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
getrandom = { version = "0.2.5", features = ["js"] } getrandom = { version = "0.2.8", features = ["js"] }
rand = "0.8.5" rand = "0.8.5"
sycamore = { path = "../../packages/sycamore" } sycamore = { path = "../../packages/sycamore" }
wasm-bindgen = "0.2.79" wasm-bindgen = "0.2.83"
web-sys = "0.3.56" web-sys = "0.3.60"

View File

@ -6,5 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
gloo-timers = { version = "0.2.3", features = ["futures"] } gloo-timers = { version = "0.2.4", features = ["futures"] }
sycamore = { path = "../../packages/sycamore", features = ["suspense"] } sycamore = { path = "../../packages/sycamore", features = ["suspense"] }

View File

@ -8,13 +8,13 @@ edition = "2021"
[dependencies] [dependencies]
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
console_log = "0.2.0" console_log = "0.2.0"
log = "0.4.14" log = "0.4.17"
serde = { version = "1.0.136", features = ["derive"] } serde = { version = "1.0.147", features = ["derive"] }
serde_json = "1.0.79" serde_json = "1.0.89"
sycamore = { path = "../../packages/sycamore", features = ["serde"] } sycamore = { path = "../../packages/sycamore", features = ["serde"] }
uuid = { version = "0.8.2", features = ["serde", "v4", "wasm-bindgen"] } uuid = { version = "1.2.2", features = ["serde", "v4", "wasm-bindgen"] }
wasm-bindgen = "0.2.79" wasm-bindgen = "0.2.83"
[dependencies.web-sys] [dependencies.web-sys]
features = ["InputEvent", "KeyboardEvent", "Location", "Storage"] features = ["InputEvent", "KeyboardEvent", "Location", "Storage"]
version = "0.3.56" version = "0.3.60"

View File

@ -8,8 +8,8 @@ edition = "2021"
[dependencies] [dependencies]
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
console_log = "0.2.0" console_log = "0.2.0"
getrandom = { version = "0.2.5", features = ["js"] } getrandom = { version = "0.2.8", features = ["js"] }
gloo-timers = { version = "0.2.3", features = ["futures"] } gloo-timers = { version = "0.2.4", features = ["futures"] }
log = "0.4.14" log = "0.4.17"
rand = "0.8.5" rand = "0.8.5"
sycamore = { path = "../../packages/sycamore", features = ["suspense"] } sycamore = { path = "../../packages/sycamore", features = ["suspense"] }

View File

@ -11,7 +11,7 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.2" version = "0.8.2"
[dependencies] [dependencies]
ahash = "0.7.6" hashbrown = "0.13.1"
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" } sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }
[dev-dependencies] [dev-dependencies]

View File

@ -2,7 +2,7 @@
use std::rc::Rc; use std::rc::Rc;
use ahash::AHashMap; use hashbrown::HashMap;
use sycamore_reactive::*; use sycamore_reactive::*;
use crate::generic_node::GenericNode; use crate::generic_node::GenericNode;
@ -265,7 +265,7 @@ pub fn reconcile_fragments<G: GenericNode>(parent: &G, a: &mut [G], b: &[G]) {
let mut b_end = b_len; let mut b_end = b_len;
let mut a_start = 0; let mut a_start = 0;
let mut b_start = 0; let mut b_start = 0;
let mut map = None::<AHashMap<G, usize>>; let mut map = None::<HashMap<G, usize>>;
// Last node in a. // Last node in a.
let after = a[a_end - 1].next_sibling(); let after = a[a_end - 1].next_sibling();

View File

@ -11,11 +11,11 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.0" version = "0.8.0"
[dependencies] [dependencies]
futures = "0.3.21" futures = "0.3.25"
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" } sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4.29" wasm-bindgen-futures = "0.4.33"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.17.0", features = ["rt"] } tokio = { version = "1.22.0", features = ["rt"] }

View File

@ -14,14 +14,14 @@ version = "0.8.2"
proc-macro = true proc-macro = true
[dependencies] [dependencies]
once_cell = "1.10.0" once_cell = "1.16.0"
proc-macro2 = "1.0.36" proc-macro2 = "1.0.47"
quote = "1.0.15" quote = "1.0.21"
syn = { version = "1.0.86", features = ["extra-traits", "full"] } syn = { version = "1.0.103", features = ["extra-traits", "full"] }
[dev-dependencies] [dev-dependencies]
sycamore = { path = "../sycamore", features = ["hydrate", "suspense"] } sycamore = { path = "../sycamore", features = ["hydrate", "suspense"] }
trybuild = "1.0.56" trybuild = "1.0.71"
[features] [features]
default = [] default = []

View File

@ -11,12 +11,13 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.1" version = "0.8.1"
[dependencies] [dependencies]
ahash = "0.7.6" bumpalo = { version = "3.11.1", features = ["boxed"] }
bumpalo = { version = "3.9.1", features = ["boxed"] } indexmap = "1.9.2"
indexmap = "1.8.0" getrandom = { version = "0.2.8", features = ["js"] }
serde = { version = "1.0.136", optional = true } hashbrown = "0.13.1"
serde = { version = "1.0.147", optional = true }
slotmap = "1.0.6" slotmap = "1.0.6"
smallvec = { version = "1.8.0", features = ["const_generics"] } smallvec = { version = "1.10.0", features = ["const_generics"] }
[features] [features]
default = [] default = []

View File

@ -1,6 +1,6 @@
//! Side effects. //! Side effects.
use ahash::AHashSet; use hashbrown::HashSet;
use crate::*; use crate::*;
@ -17,7 +17,7 @@ pub(crate) struct EffectState<'a> {
/// The callback when the effect is re-executed. /// The callback when the effect is re-executed.
cb: Rc<RefCell<dyn FnMut() + 'a>>, cb: Rc<RefCell<dyn FnMut() + 'a>>,
/// A list of dependencies that can trigger this effect. /// A list of dependencies that can trigger this effect.
dependencies: AHashSet<EffectDependency>, dependencies: HashSet<EffectDependency>,
} }
/// Implements reference equality for [`WeakSignalEmitter`]s. /// Implements reference equality for [`WeakSignalEmitter`]s.
@ -122,7 +122,7 @@ fn _create_effect<'a>(cx: Scope<'a>, mut f: Box<(dyn FnMut() + 'a)>) {
// Initialize initial effect state. // Initialize initial effect state.
*effect.borrow_mut() = Some(EffectState { *effect.borrow_mut() = Some(EffectState {
cb: cb.clone(), cb: cb.clone(),
dependencies: AHashSet::new(), dependencies: HashSet::new(),
}); });
// Initial callback call to get everything started. // Initial callback call to get everything started.

View File

@ -4,7 +4,7 @@ use std::hash::Hash;
use std::mem; use std::mem;
use std::rc::Rc; use std::rc::Rc;
use ahash::AHashMap; use hashbrown::HashMap;
use crate::*; use crate::*;
@ -107,7 +107,7 @@ where
// 0) Prepare a map of indices in newItems. Scan backwards so we encounter them in // 0) Prepare a map of indices in newItems. Scan backwards so we encounter them in
// natural order. // natural order.
let mut new_indices = AHashMap::with_capacity(new_end - start); let mut new_indices = HashMap::with_capacity(new_end - start);
// Indexes for new_indices_next are shifted by start because values at 0..start are // Indexes for new_indices_next are shifted by start because values at 0..start are
// always None. // always None.

View File

@ -16,10 +16,10 @@ use std::marker::PhantomData;
use std::mem; use std::mem;
use std::rc::{Rc, Weak}; use std::rc::{Rc, Weak};
use ahash::AHashMap;
use arena::*; use arena::*;
pub use context::*; pub use context::*;
pub use effect::*; pub use effect::*;
use hashbrown::HashMap;
use indexmap::IndexMap; use indexmap::IndexMap;
pub use iter::*; pub use iter::*;
pub use memo::*; pub use memo::*;
@ -47,7 +47,7 @@ struct ScopeInner<'a> {
/// usually read and rarely created. Making this heap allocated when prevent blowing up the /// usually read and rarely created. Making this heap allocated when prevent blowing up the
/// size of the [`ScopeInner`] struct when most of the times, this field is unneeded. /// size of the [`ScopeInner`] struct when most of the times, this field is unneeded.
#[allow(clippy::box_collection)] #[allow(clippy::box_collection)]
contexts: Option<Box<AHashMap<TypeId, &'a dyn Any>>>, contexts: Option<Box<HashMap<TypeId, &'a dyn Any>>>,
// Make sure that 'a is invariant. // Make sure that 'a is invariant.
_phantom: InvariantLifetime<'a>, _phantom: InvariantLifetime<'a>,
} }

View File

@ -16,13 +16,13 @@ proc-macro = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
nom = "7.1.0" nom = "7.1.1"
proc-macro2 = "1.0.36" proc-macro2 = "1.0.47"
quote = "1.0.15" quote = "1.0.21"
syn = "1.0.86" syn = "1.0.103"
unicode-xid = "0.2.2" unicode-xid = "0.2.4"
[dev-dependencies] [dev-dependencies]
expect-test = "1.2.2" expect-test = "1.4.0"
sycamore-router = { path = "../sycamore-router" } sycamore-router = { path = "../sycamore-router" }
trybuild = "1.0.56" trybuild = "1.0.71"

View File

@ -15,7 +15,7 @@ version = "0.8.0"
[dependencies] [dependencies]
sycamore = { path = "../sycamore", version = "0.8.0" } sycamore = { path = "../sycamore", version = "0.8.0" }
sycamore-router-macro = { path = "../sycamore-router-macro", version = "0.8.0" } sycamore-router-macro = { path = "../sycamore-router-macro", version = "0.8.0" }
wasm-bindgen = "0.2.79" wasm-bindgen = "0.2.83"
[dependencies.web-sys] [dependencies.web-sys]
features = [ features = [
@ -30,7 +30,7 @@ features = [
"Url", "Url",
"Window", "Window",
] ]
version = "0.3.56" version = "0.3.60"
[dev-dependencies] [dev-dependencies]
sycamore = { path = "../sycamore", features = ["ssr"] } sycamore = { path = "../sycamore", features = ["ssr"] }

View File

@ -11,14 +11,14 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.2" version = "0.8.2"
[dependencies] [dependencies]
html-escape = "0.2.11" html-escape = "0.2.12"
indexmap = "1.8.1" indexmap = "1.9.2"
js-sys = "0.3.57" js-sys = "0.3.60"
once_cell = "1.10.0" once_cell = "1.16.0"
sycamore-core = { path = "../sycamore-core", version = "0.8.0" } sycamore-core = { path = "../sycamore-core", version = "0.8.0" }
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" } sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }
wasm-bindgen = "0.2.80" wasm-bindgen = "0.2.83"
web-sys = { version = "0.3.57", features = [ web-sys = { version = "0.3.60", features = [
"console", "console",
"Comment", "Comment",
"Document", "Document",

View File

@ -11,20 +11,20 @@ repository = "https://github.com/sycamore-rs/sycamore"
version = "0.8.2" version = "0.8.2"
[dependencies] [dependencies]
ahash = "0.7.6" futures = { version = "0.3.25", optional = true }
futures = { version = "0.3.21", optional = true } hashbrown = "0.13.1"
html-escape = { version = "0.2.9", optional = true } html-escape = { version = "0.2.12", optional = true }
indexmap = { version = "1.8.0", features = ["std"] } indexmap = { version = "1.9.2", features = ["std"] }
js-sys = { version = "0.3.56", optional = true } js-sys = { version = "0.3.60", optional = true }
once_cell = { version = "1.10.0", optional = true } once_cell = { version = "1.16.0", optional = true }
paste = "1.0.6" paste = "1.0.9"
sycamore-core = { path = "../sycamore-core", version = "0.8.0" } sycamore-core = { path = "../sycamore-core", version = "0.8.0" }
sycamore-futures = { path = "../sycamore-futures", version = "0.8.0", optional = true } sycamore-futures = { path = "../sycamore-futures", version = "0.8.0", optional = true }
sycamore-macro = { path = "../sycamore-macro", version = "0.8.0" } sycamore-macro = { path = "../sycamore-macro", version = "0.8.0" }
sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" } sycamore-reactive = { path = "../sycamore-reactive", version = "0.8.0" }
sycamore-web = { path = "../sycamore-web", version = "0.8.0", optional = true } sycamore-web = { path = "../sycamore-web", version = "0.8.0", optional = true }
wasm-bindgen = { version = "0.2.79", optional = true } wasm-bindgen = { version = "0.2.83", optional = true }
wasm-bindgen-futures = { version = "0.4.29", optional = true } wasm-bindgen-futures = { version = "0.4.33", optional = true }
[dependencies.web-sys] [dependencies.web-sys]
features = [ features = [
@ -43,14 +43,13 @@ features = [
"Text", "Text",
"Window", "Window",
] ]
version = "0.3.56" version = "0.3.60"
optional = true optional = true
[dev-dependencies] [dev-dependencies]
criterion = "0.3.5" expect-test = "1.4.0"
expect-test = "1.2.2" tokio = { version = "1.22.0", features = ["macros", "rt"] }
tokio = { version = "1.17.0", features = ["macros", "rt"] } wasm-bindgen-test = "0.3.33"
wasm-bindgen-test = "0.3.29"
[features] [features]
default = ["web", "wasm-bindgen-interning"] default = ["web", "wasm-bindgen-interning"]
@ -73,15 +72,6 @@ serde = ["sycamore-reactive/serde"]
wasm-bindgen-interning = ["web", "wasm-bindgen/enable-interning"] wasm-bindgen-interning = ["web", "wasm-bindgen/enable-interning"]
web = ["wasm-bindgen", "web-sys", "js-sys", "sycamore-web"] web = ["wasm-bindgen", "web-sys", "js-sys", "sycamore-web"]
[[bench]]
harness = false
name = "reactivity"
[[bench]]
harness = false
name = "ssr"
required-features = ["ssr"]
[[test]] [[test]]
name = "ssr" name = "ssr"
required-features = ["ssr"] required-features = ["ssr"]

View File

@ -2,9 +2,10 @@
name = "bench-diff" name = "bench-diff"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
serde = { version = "1.0.136", features = ["derive"] } serde = { version = "1.0.147", features = ["derive"] }
serde_json = "1.0.79" serde_json = "1.0.89"

View File

@ -0,0 +1,22 @@
[package]
name = "bench"
version = "0.1.0"
edition = "2021"
publish = false
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
sycamore = { path = "../../sycamore" }
[dev-dependencies]
criterion = "0.4.0"
[[bench]]
harness = false
name = "reactivity"
[[bench]]
harness = false
name = "ssr"
required-features = ["sycamore/ssr"]

View File

@ -0,0 +1,3 @@
fn main() {
println!("Run `cargo bench`.");
}

View File

@ -8,15 +8,15 @@ edition = "2021"
[dependencies] [dependencies]
console_error_panic_hook = "0.1.7" console_error_panic_hook = "0.1.7"
console_log = "0.2.0" console_log = "0.2.0"
js-sys = "0.3.56" js-sys = "0.3.60"
log = "0.4.14" log = "0.4.17"
reqwasm = "0.4.1" reqwasm = "0.5.0"
serde-lite = { version = "0.2.0", features = ["derive"] } serde-lite = { version = "0.3.2", features = ["derive"] }
serde_json = "1.0.79" serde_json = "1.0.89"
sycamore = { path = "../packages/sycamore", features = ["suspense"] } sycamore = { path = "../packages/sycamore", features = ["suspense"] }
sycamore-router = { path = "../packages/sycamore-router" } sycamore-router = { path = "../packages/sycamore-router" }
wasm-bindgen = "0.2.79" wasm-bindgen = "0.2.83"
[dependencies.web-sys] [dependencies.web-sys]
features = ["MediaQueryList", "Storage", "Window"] features = ["MediaQueryList", "Storage", "Window"]
version = "0.3.56" version = "0.3.60"