Repository navigation
pack: a public folder over the output file limit stops the deploy before anything is sent - #102
Merged
Conversation
…ore anything is sent Astro copies the public folder into the built site whole, dotfiles included, so that folder's file count is a floor on the site's. A project holding more than 1,000 files there passed every local check, uploaded, built, and was then refused for producing more files than a site may hold. The answer was available locally, for nothing. The count is made inside Limits over the walk's own list under the public folder the deploy resolved from the config, so files the walk excluded are not counted and the disk is not read a second time. Which files sit under the folder is asked of the same function the name check uses, so the two cannot disagree about a sibling folder. It refuses strictly over the limit, as the server does, and it has its own check and failure id, limit-public-files, so that one id names one number. The fallback warning now says the default folder was also the one counted, and the README, the deploy tool's description and CLAUDE.md say the public folder is checked locally while everything else the build emits is still the server's to count.
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.
What was wrong. Astro copies the public folder into the built site whole, dotfiles included, so the number of files in that folder is a floor on the number in the site. A project with more than 1,000 files there passed every local check, uploaded, built, and was then refused for producing more files than a site may hold. The answer was available on the user's own machine, for nothing.
Measured once before building the stop, because a wrong floor would be a refusal with no way past: Astro 7.3.5 on a project with 1,001 tiny files under
public/(nested two deep, one a dotfile) and one page built 1,004 files, every one of the 1,001 present byte for byte.What changes.
limit-public-files, with its own check and failure id so that one id names one number. It refuses a public folder holding more thanMaxOutputFiles(strictly more, as the server does: exactly 1,000 passes).Limitsover the walk's own list, under the public folder the deploy resolved from the config. Files the walk excluded are not counted and the disk is not read a second time. Which files sit under the folder is asked of the function the file-name check already uses, so a sibling such aspublic-old/cannot be counted by one and not the other.publicDirsomewhere narrower instead.publicDircannot be read, the existing warning now says the default folder was the one checked and counted, and it sits beside the stop.MaxOutputFilesis bound in the README test; the troubleshooting entry and the failure catalog gain the new id.Rows (written before the finding existed, and red against a stub that answered the row with no finding):
public/, nested, with a dotfile: one hard stop naming 1,001 and 1,000, never the whole tree's count. 1,000: no finding.public-old/: no finding. A configuredstatic/over the limit: refused and named;public/over the limit whilestatic/is configured: no finding..: the whole walked tree is counted, 1,001 refused and 1,000 not, and the finding says the project itself is the folder.Mutations, each run and reverted: count the whole tree;
>=for>; a prefix match without the separator; ignore the folder argument; state the whole tree's count; rank directories over the whole tree; downgrade to a warning; decline the manifest row; have the deploy pass a fixedpublic; word the root's finding as a named folder's; the README figure off by one. Each reds the row its comment names.