Skip to content

fix(archive): avoid Windows command limits for large libraries - #1696

Merged
zackees merged 3 commits into
mainfrom
fix/archive-response-file-1656
Oct 22, 2026
Merged

zackees merged 3 commits into
mainfrom
fix/archive-response-file-1656

Conversation

@zackees

@zackees zackees commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Fixes #1656. Part of #1689.

Route library and core archiving through a shared fbuild-core::archive helper. On Windows, or when the estimated command size reaches 30,000 UTF-16 units, put object paths in a GNU-compatible response file. Preserve each caller's watchdog (60s library / 120s core), diagnostic label, and stale-member removal.

  • Quote literal filenames, including spaces and apostrophes; normalize Windows path separators without applying compiler-define transformations to filenames.
  • Use a unique NamedTempFile scoped to the subprocess. Drop it on success, error and cancellation; no persistent response-file cache.
  • Keep short Unix invocations direct.
  • Add a real compiler/archiver regression: 525 objects on Windows, and 700 objects with long Linux paths to exceed this host's 2MB ARG_MAX. Check every member, replacement after removing an object, and response-file cleanup.
  • Unit checks cover the bounded invocation, scoped cleanup and archiver spawn failures.
  • Extend existing Windows/Ubuntu checks and the exact local replay contract. No workflow files added.

Validation:

  • RED: the previous direct invocation failed with Argument list too long (os error 7) on Linux with an oversized real object list.
  • GREEN: the real GNU archiver regression passes with a >2MB object list, including spaces/apostrophes and stale-member replacement; final focused rerun passed.
  • The first local oversized fixture used 16,000 members and hit the unchanged 60s archiver timeout after response-file expansion. Replaced it with 700 longer paths so it still exceeds ARG_MAX and completes in seconds; no production timeout was relaxed.
  • Core response-file cleanup tests, workspace tests, workspace Clippy with warnings denied, formatting, USB literal guard, platform inventory, workflow render/YAML checks and repository code review passed.
  • Shared replay contract test first caught the new Ubuntu step missing from local-gate.toml; it passes after adding the exact step to coverage.

A pinned native Windows baseline runs at 39726942818, before the implementation fix. Windows verification of corrected head ec827043 is running at 39728179273. Native Windows success is not yet claimed. Subsequent commit 5de1e372 fixes Dylint’s path API findings using AsRef and NormalizedPath::display_slash(); the real large-archive regression and Clippy pass again, and hosted Dylint is green on that head.

The required source-bound local CI proof remains pending because Bosn creates a temporary Git copy, conflicting with the active no-additional-copies instruction. No gate has been bypassed.

Fresh Windows replay for latest head 5de1e372: 39729874761, currently active. The original native Windows baseline completed with failure at the archive_objects call (test line 42), after compilation and fixture creation succeeded. The GitHub log omits the oversized panic payload, so its exact OS diagnostic is not asserted here. The local Linux baseline explicitly reported E2BIG; corrected Windows replay remains pending.

Windows evidence: corrected source head ec827043 passed the real 525-object archive regression in 39728179273, including quoted paths, member replacement and response-file cleanup. The remaining smoke steps in that job and the latest-head 5de1e372 replay are still active; complete latest-head Windows success is not yet claimed.

Latest-head Windows evidence: 39729874761 passed the real 525-object archive regression on 5de1e372, including quoted paths, stale-member replacement and response-file cleanup. The remaining esptool smoke checks also passed; this complete latest-head Windows job is green.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 35 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 13f0a69 and 16f9c5d.

⛔ Files ignored due to path filters: 1
  • ci/platform_boundary_research.tsv is excluded by !**/*.tsv
📒 Files selected for processing: 10
  • .github/workflows/check-ubuntu.yml
  • .github/workflows/check-windows.yml
  • crates/fbuild-build-engine/src/linker.rs
  • crates/fbuild-core/Cargo.toml
  • crates/fbuild-core/src/README.md
  • crates/fbuild-core/src/archive.rs
  • crates/fbuild-core/src/lib.rs
  • crates/fbuild-library/src/library/library_compiler.rs
  • crates/fbuild-library/src/library/library_compiler_tests.rs
  • local-gate.toml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees force-pushed the fix/archive-response-file-1656 branch from 5de1e37 to 16f9c5d Compare October 22, 2026 16:24
@zackees
zackees merged commit db66f23 into main Oct 22, 2026
24 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Oct 23, 2026
@zackees
zackees deleted the fix/archive-response-file-1656 branch November 5, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Windows: archiving a large local library fails with os error 206 (archive_objects passes every object on the command line)

1 participant