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

chore(deps): bump zip-extract to 0.2.0 #161

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

DaniPopes
Copy link
Contributor

Gets rid of old duplicate zip dependencies.

zip-extract = "0.1.3"
zip = { version = "2.1.3", default-features = false, features = [
"deflate",
"bzip2",
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need bzip2, knowing we only use this lib to create zip archives?

Copy link
Contributor Author

@DaniPopes DaniPopes Aug 26, 2024

Choose a reason for hiding this comment

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

Used to extract downloaded zip archives 8b126d3

Copy link
Contributor

Choose a reason for hiding this comment

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

But we use zip-extract for that, and it doesn't have a feature flag for bzip2.

Copy link
Contributor

@beeb beeb Aug 26, 2024

Choose a reason for hiding this comment

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

Also, at that point why not add the other compression techniques like flate2, zlib, lzma etc? (if the goal is to increase compatibility)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

zip-extract is a thin wrapper around zip

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added support upstream and added in 5ee2b3e, in any case if the versions diverge it duplicates zip again which is not good

There's no need if the only one used is bzip2, we only need to extract what we compressed ourselves

Copy link
Contributor

@beeb beeb Aug 27, 2024

Choose a reason for hiding this comment

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

There's no need if the only one used is bzip2, we only need to extract what we compressed ourselves

That's not strictly true, users can pass a custom URL for their dependencies, and we need to decompress the result archive. This could potentially be any format supported by zip if we add the relevant flags. So it's a decision we can make: do we want to support URLs with files only containing zip/deflate, or do we want to support more archive formats. Still don't understand where bzip2 comes into play, what's the reason for adding it, sorry for my confusion 😕 It's not a standard format for zip archives.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for fixing the upstream flags though! That's nice to have the same options as zip

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense, however I would probably enforce the method; cargo uses .crate files which are .tar.gz

My main problem with enabling more compression methods is that most of them are C libraries so it adds a lot of dependencies, and I don't know how widely used they are to justify this cost

For example the zip linux manpage lists only deflate and bzip2; bzip2 is required for a test to pass in this repository

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh okay my bad, I didn't know one test relied on bzip2 and that it was mentioned in the manpage. the flate feature flag covers tar.gz right? If so then I think I'm okay with the current choice!

@mario-eth mario-eth merged commit 792ebb5 into mario-eth:main Sep 3, 2024
5 checks passed
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.

3 participants