Skip to content

Conversation

@mflatt
Copy link
Contributor

@mflatt mflatt commented Aug 13, 2025

Based on the approach by @rmolives in #966. The difference here is more specific checking for ESPIPE to make sure that the reason lseek failed is that a device does not support seeking.

Seeking is used by do-load for three reasons: to check for a starting #! line to treat as a comment, to check whether the input is a compiled file, and to create a source-file description to be used later (if possible) to convert positions to lines and columns. The last of those really expects a regular file, so it could be avoiding when seeking is not supported, and the other two could be handled by generalizing peeking/ungetting for a small, bounded number of characters. But probably reading everything into a bytevector before parsing is good enough for this small corner.

@mflatt mflatt merged commit a29d800 into cisco:main Sep 1, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant