Skip to content

Conversation

ErichDonGubler
Copy link
Contributor

@ErichDonGubler ErichDonGubler commented May 2, 2024

Hey there @kyren! 👋🏻 Positive heckler at 0:29 of your RustConf 2018 talk here. 🙂 We (sorta) meet again!

This time, I come representing some dependency management effort at Mozilla, where I've been auditing dependencies of crates like libsqlite 0.31, which includes hashlink 0.9.0. We've used previous versions of hashlink via this transitive dependency, but hashlink's update to hashbrown 0.14 has an interesting wrinkle in it: it includes the allocator-api2 feature/dependency combo by default. But…it doesn't seem like it's being meaningfully consumed by most crates using hashbrown, including hashlink's case. 😖

Turns out, this feature probably doesn't make sense unless a consumer-of-a-consumer crate (i.e., something using hashlink) uses allocator-api2 directly and has access to the allocators that hashlink's underlying hashbrown collections use (which isn't currently exposed). So, I disable this feature with this PR for Mozilla's sake. End-user applications can still re-enable this with a direct dependency on hashbrown, with which they can request the hashbrown/allocator-api2 themselves.

I don't know why hashbrown made this a default feature, TBH. 🫤 It's been annoying (but doable) to combat this unnecessary dependency in other crates like gpu-descriptor (see zakarumych/gpu-descriptor#40).

@kyren
Copy link
Collaborator

kyren commented May 7, 2024

Hey there @kyren! 👋🏻 Positive heckler at 0:29 of your RustConf 2018 talk here. 🙂 We (sorta) meet again!

That's probably the friendliest introduction to a PR I've ever gotten haha. Nice to see you again! 👋

Yeah, this makes complete sense and I'm gonna merge it. Do you need me to do another hashlink release to get everyone lined up?

Just let me know!

@kyren kyren merged commit c6097a7 into djc:master May 7, 2024
@ErichDonGubler ErichDonGubler deleted the no-allocator-api2 branch May 7, 2024 16:12
@ErichDonGubler
Copy link
Contributor Author

ErichDonGubler commented May 7, 2024

@kyren: Yes please! A release would definitely facilitate, but is not hard-blocking for us. Thank you so much! 😊

@kyren
Copy link
Collaborator

kyren commented May 12, 2024

Okay, release is done!

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