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

Crate upgrades, fix ahash #6324

Merged
merged 3 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ result
# It also ensures the compiler can always pull in 1 version of things and doesn't get restricted by sub lockfiles.
/**/Cargo.lock
!/Cargo.lock
!/examples/static-site-gen/platform/Cargo.lock
# static-site-gen exception is because of https://github.com/tkaitchuck/aHash/issues/195

# snapshot tests temp file
*.pending-snap
Expand Down
129 changes: 95 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ fnv = "1.0.7"
fs_extra = "1.3.0"
futures = "0.3.26"
glyph_brush = "0.7.7"
hashbrown = { version = "0.13.2", features = ["bumpalo"] }
hashbrown = { version = "0.14.3" }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were not using the bumpalo feature.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also thought at first that hashbrown 0.14.3 was no longer using ahash but I was wrong.

iced-x86 = { version = "1.18.0", default-features = false, features = ["std", "decoder", "op_code_info", "instr_info"] }
im = "15.1.0"
im-rc = "15.1.0"
indexmap = "1.9.2"
indexmap = "2.1.0"
indoc = "1.0.9"
insta = "1.28.0"
js-sys = "0.3.61"
Expand All @@ -120,7 +120,7 @@ maplit = "1.0.2"
memmap2 = "0.5.10"
mimalloc = { version = "0.1.34", default-features = false }
nonempty = "0.8.1"
object = { version = "0.30.3", features = ["read", "write"] }
object = { version = "0.32.2", features = ["read", "write"] }
packed_struct = "0.10.1"
page_size = "0.5.0"
palette = "0.6.1"
Expand All @@ -139,7 +139,7 @@ quote = "1.0.23"
rand = "0.8.5"
regex = "1.7.1"
remove_dir_all = "0.8.1"
reqwest = { version = "0.11.20", default-features = false, features = ["blocking", "rustls-tls"] } # default-features=false removes libopenssl as a dependency on Linux, which might not be available!
reqwest = { version = "0.11.23", default-features = false, features = ["blocking", "rustls-tls"] } # default-features=false removes libopenssl as a dependency on Linux, which might not be available!
rlimit = "0.9.1"
rustyline = { git = "https://github.com/roc-lang/rustyline", rev = "e74333c" }
rustyline-derive = { git = "https://github.com/roc-lang/rustyline", rev = "e74333c" }
Expand Down
15 changes: 0 additions & 15 deletions crates/compiler/collections/src/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ pub type SendMap<K, V> = im::hashmap::HashMap<K, V, BuildHasher>;

pub type SendSet<K> = im::hashset::HashSet<K, BuildHasher>;

// pub type BumpMap<'a, K, V> = hashbrown::HashMap<K, V, BuildHasher, hashbrown::BumpWrapper<'a>>;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newest hashbrown no longer supports BumpWrapper, so uncommenting this code would not work anymore.

// pub type BumpSet<'a, K> = hashbrown::HashSet<K, BuildHasher, hashbrown::BumpWrapper<'a>>;

pub type BumpMap<K, V> = hashbrown::HashMap<K, V, BuildHasher>;
pub type BumpSet<K> = hashbrown::HashSet<K, BuildHasher>;

Expand All @@ -46,32 +43,20 @@ pub trait BumpMapDefault<'a> {

impl<'a, K, V> BumpMapDefault<'a> for BumpMap<K, V> {
fn new_in(_arena: &'a bumpalo::Bump) -> Self {
// hashbrown::HashMap::with_hasher_in(default_hasher(), hashbrown::BumpWrapper(arena))
hashbrown::HashMap::with_hasher(default_hasher())
}

fn with_capacity_in(capacity: usize, _arena: &'a bumpalo::Bump) -> Self {
// hashbrown::HashMap::with_capacity_and_hasher_in(
// capacity,
// default_hasher(),
// hashbrown::BumpWrapper(arena),
// )
hashbrown::HashMap::with_capacity_and_hasher(capacity, default_hasher())
}
}

impl<'a, K> BumpMapDefault<'a> for BumpSet<K> {
fn new_in(_arena: &'a bumpalo::Bump) -> Self {
// hashbrown::HashSet::with_hasher_in(default_hasher(), hashbrown::BumpWrapper(arena))
hashbrown::HashSet::with_hasher(default_hasher())
}

fn with_capacity_in(capacity: usize, _arena: &'a bumpalo::Bump) -> Self {
// hashbrown::HashSet::with_capacity_and_hasher_in(
// capacity,
// default_hasher(),
// hashbrown::BumpWrapper(arena),
// )
hashbrown::HashSet::with_capacity_and_hasher(capacity, default_hasher())
}
}
Expand Down
Loading