fix(packaging): keep node_modules out of the sdist - #6
Merged
Conversation
hatchling honours only the root .gitignore, so everything ui/.gitignore covers still lands in the sdist. The release workflow runs `pnpm install` before `uv build`, so ui/node_modules — 44k files — went in with it: 350 MB against PyPI's 100 MB per-file limit. PyPI rejected it *after* the wheel had already uploaded, which is the worst shape for this failure: v1.7.0 has a correct wheel, no sdist, and no GitHub Release, and a PyPI upload cannot be replaced. Excludes ui/node_modules, ui/.next, ui/out and ui/public/monaco from the sdist (350 MB -> 7.0 MB), and adds a workflow guard that fails the publish before anything is uploaded if the sdist ever grows past the limit again.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by the v1.7.0 release failing halfway.
pypi-publishuploaded the wheel, then rejected the sdist:Cause
hatchling honours only the root
.gitignore. Everythingui/.gitignorecovers —node_modules,.next,out,public/monaco— is invisible to it and lands in the sdist. Thepypi-publishjob runspnpm installbeforeuv build, so 44k files of node_modules went along.It never bit before because 1.7.0 is the first release where the workflow builds a web UI, and so the first where
node_modulesexists at packaging time.Changes
ui_staticfiles, verified).State of v1.7.0
1.7.0/1.7/latest