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

Should rebar3_hex use hex_tarball:create_docs/2? #318

Open
onno-vos-dev opened this issue Jan 27, 2023 · 1 comment
Open

Should rebar3_hex use hex_tarball:create_docs/2? #318

onno-vos-dev opened this issue Jan 27, 2023 · 1 comment

Comments

@onno-vos-dev
Copy link

Linked issue: hexpm/hex_core#136

When trying to publish docs for aws-beam/aws-erlang I ran into an issue where trying to publish the docs resulted in the following error: "tarball error, unknown POSIX error".

After patching OTP to include the actual error as per my local OTP patch I figured the actual error is too_big which comes from hex_tarball.erl#L143

rebar3_hex uses hex_tarball:create_docs/1 and does not allow overriding the default configs coming from: hex_tarball.erl#L114

One can argue for one of two things:

  1. rebar3_hex should not use create_docs/1 but should instead use create_docs/2 and allow the overriding of tarball_max_size and tarball_max_uncompressed_size.
  2. The defaults chosen in hex_core are too small and hence should be increased.

I've already opened a pull request towards hex_core to bump the default but I'd like to discuss if it'd make sense to allow passing in an even bigger tarball_max_size and tarball_max_uncompressed_size as an option by using hex_tarball:create_docs/2 instead.

@onno-vos-dev onno-vos-dev changed the title Should we use hex_tarball:create_docs/2? Should rebar3_hex use hex_tarball:create_docs/2? Jan 27, 2023
@starbelly
Copy link
Member

Right, so the max size is currently 8MB, I also see that the max size on hexpm (service) is 10MB, so unless there's an update to hexpm per the issue and pr you've opened, there wouldn't be much point at the moment in allowing a user to configure this. I'm not sure being able to configure this with rebar3_hex rather, hex_core should be aligned with hexpm as far as the max upload size.

Let's see what falls out of the issue and PR you've opened.

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

No branches or pull requests

2 participants