ReviewOS

pantry-pm/pantry

publish:commit fails with error.BufferTooSmall

#199
Closed glennmichael123 opened this 24 days ago · 0 comments
24 days ago

Description

pantry publish:commit '.' fails with error.BufferTooSmall when publishing the ts-watches package from stacksjs/ts-watches.

Steps to Reproduce

  1. Push to main on stacksjs/ts-watches
  2. CI runs pantry publish:commit '.'
  3. Pantry finds the package, scans ignore files, then fails

Error Output

Publishing ts-watches...
  Scanning for ignore files in: /home/runner/work/ts-watches/ts-watches/.
    Checking: /home/runner/work/ts-watches/ts-watches/./.pantryignore
  Using .pantryignore for exclusions (347 bytes)
    + exclude: packages/ts-watches/bin/watch
    + exclude: .cache
    ...
  ✗ Failed: error.BufferTooSmall

Context

  • The package has "files": ["README.md", "dist"] in package.json, so it should use the explicit files path (not rsync/default)
  • The dist directory is only 516K with 41 files
  • All file paths are under 60 characters
  • Previously failed with Tarball exceeds maximum size of 50MB (before adding .pantryignore to exclude a 58MB compiled binary), then started failing with this different error after the size issue was resolved

Likely Source

Based on reading the Zig source, the error.BufferTooSmall likely comes from either:

  • The redirect_buf: [8192]u8 in uploadCommitViaHttp() during HTTP redirect handling
  • The multipart body buffer construction in uploadCommitViaHttp() if the pre-allocated buffer size calculation is off
  • Possibly std.http.Client.fetch() internals when processing the server response

Environment

  • GitHub Actions (ubuntu-latest)
  • Pantry Action: home-lang/pantry/packages/action@main
  • Package: ts-watches v0.1.0

Sign in to comment on this issue.