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

build: remove unnecessary allocator-api2 dep. #40

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

ErichDonGubler
Copy link
Contributor

No description provided.

@zakarumych
Copy link
Owner

What is negative effect of the dependency?

@ErichDonGubler
Copy link
Contributor Author

ErichDonGubler commented Apr 30, 2024

To directly answer your question: The presence of an unused dependency can be particularly burdensome in situations like Firefox's (i.e., in this patch stack where I'm revendoring WGPU), where trust for third-party dependencies are established by detailed review of each dependency's source. Each dependency in the tree is required to undergo significant scrutiny for the purposes of security, for each version. For what I hope are obvious reasons, when a dependency isn't actually used, our preference is to simply avoid the dependency altogether.

Taking a step back, your question surprises me. What user would want an unused-but-still-built dependency in their project? By default, I wouldn't expect a project using gpu-descriptor to ever be interested in the allocator-api2 crate, because its usage of hashbrown is not directly exposed in gpu-descriptor (which, unless I'm missing something, would be necessary for specifying collection-specific allocators). If a user does want this (i.e., via changing the global allocator in allocator-api2), they can still opt into it by selecting the appropriate features in their own direct dependency on hashbrown.

@ErichDonGubler
Copy link
Contributor Author

ErichDonGubler commented Apr 30, 2024

CC @cwfitzgerald, who was a stakeholder for the hashbrown upgrade that I work with on a regular basis. He's also a stakeholder for this, since WGPU doesn't need this, either.

@zakarumych
Copy link
Owner

It's not like a user would want unused but still built dependency, but many users are not bothered enough to disable default ones.
My question was more like "how exactly it bothered you enough to go and submit a PR to disable it?"
And I thank you for thorough explanation.

@zakarumych zakarumych merged commit 7b71a4e into zakarumych:master Apr 30, 2024
3 checks passed
@ErichDonGubler ErichDonGubler deleted the no-allocator-api2 branch April 30, 2024 21:52
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