fix: support fractional profile skips on pipes #1392
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1392
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/profile-skip-pipes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
After #1094, a fractional
skipon a pipe reads the whole stream and then fails when it tries to rewind. For nonseekable input withskip, spool the lines to a temporary file while counting them, then apply the existing slice. Regular captures still use the two-pass reader and a pipe with zero skip streams directly.The regression uses a real pipe and covers CRLF, blank lines, a final line without a newline, and positive and negative skips. The old code fails on the nonzero cases. The game-free suite and a
/dev/stdinCLI check passed on macOS.AI assistance from OpenAI Codex is recorded in the commit trailers.
This landed in the v2.0.12 branch (merged there for testing; it reaches
mainwith that release), so closing. Thanks!Reopened: closing this was a mistake on my side. It was tested in the v2.0.12 branch, and it will be merged into main here, so it shows as merged. Sorry for the noise.
Looks good. I walked through the new pipe branch and the skip arithmetic holds up:
The test is already picked up by run_all.py's tests/test_*.py glob, and CI is green on both Python jobs. The Windows Vulkan and F2I jobs were still pending when I looked, but nothing here touches them.
Nit: the pipe test patches seekable() to True, which exercises the S_ISREG half of the check but not a genuinely non-seekable pipe. That is fine, since the S_ISREG half is the one that matters on Windows. Thanks for the fix.