Add -files-from option to lint command to avoid ARG_MAX limit#6858
Open
adamrtalbot wants to merge 2 commits intomasterfrom
Open
Add -files-from option to lint command to avoid ARG_MAX limit#6858adamrtalbot wants to merge 2 commits intomasterfrom
adamrtalbot wants to merge 2 commits intomasterfrom
Conversation
When pre-commit passes many file paths as CLI arguments to 'nextflow lint', the OS ARG_MAX limit can be exceeded, causing E2BIG errors. Add a -files-from option that reads file paths from a file (one per line), with support for stdin via '-'. Closes #6857 Generated by Claude Code Signed-off-by: adamrtalbot <12817534+adamrtalbot@users.noreply.github.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
d9fa5cd to
d752bc2
Compare
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.
Summary
-files-fromoption tonextflow lintthat reads file paths from a file (one per line), avoiding the OSARG_MAXlimit when many files are passed as CLI arguments-files-from -Motivation
When using
nextflow lintwith tools like pre-commit on large repositories (1700+.nffiles), all filenames are passed as CLI arguments, which can exceed the OSARG_MAXlimit (~2MB on Linux), causingE2BIG: Argument list too longerrors.This is Option B from #6857 — a
-files-fromflag that reads file paths from a file, following the convention used byrsync,tar, and other Unix tools.Usage
Changes
CmdLint.groovy: Added-files-fromparameter and file-reading logic inrun()that reads lines, trims whitespace, skips blank lines, and appends paths toargsbefore existing processingCmdLintTest.groovy: Added 3 tests — files-from basic usage, combined with positional args, and empty file list error handlingTesting
All 5
CmdLintTesttests pass (2 existing + 3 new).Closes #6857