-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add separate docs tarball limits and support infinity
#143
Conversation
I like the idea of separating the package and docs settings. But I think it's time to bump package sizes as well since we've had a few requests for it. Can we also have the option to skip the limits if the field is set to |
undefined
Good call, updated! |
src/hex_tarball.erl
Outdated
@@ -601,6 +616,12 @@ gzip_no_header(Uncompressed) -> | |||
%% Helpers | |||
%%==================================================================== | |||
|
|||
%% @private | |||
valid_size(Binary, undefined) when is_binary(Binary) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another idea is to call the sentinel value infinity
:
valid_size(Binary, undefined) when is_binary(Binary) -> | |
valid_size(Binary, infinity) when is_binary(Binary) -> |
but perhaps undefined is more often used for things like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like infinity
more 👍
@ericmj okay, let's bump package tarball sizes too. Same limit for both, 16 MiB compressed & 128 MiB uncompressed? |
src/hex_tarball.erl
Outdated
@@ -601,6 +616,12 @@ gzip_no_header(Uncompressed) -> | |||
%% Helpers | |||
%%==================================================================== | |||
|
|||
%% @private | |||
valid_size(Binary, undefined) when is_binary(Binary) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like infinity
more 👍
undefined
infinity
Closes #136
Closes #137
Before this patch we had a single tarball limit i.e. used for package and docs tarballs. The original issue is about bumping docs tarball limits so I'd focus on just that and wait for concrete uses cases for bumping the package tarball limit.
This additionally avoids the issue of someone publishing a bigger package tarball and users not being able to unpack it until they are on latest Hex (which would have bumped the limit).
WDYT?