Skip to content

Conversation

@danfairs
Copy link
Contributor

@danfairs danfairs commented Apr 28, 2025

This change modifies the requirements file parser to improve very long line handling. Previously, lines (including continuations) that were longer than the data chunk that scanner.Text() passed in (4096 bytes) would be truncated at the boundary. This caused invalid requirements files to be generated, as was observed in #2280.

I have added a test which failed with the old code, but passes with the new code. My own problematic image also proceeds past the requirements generation step.

It would be good if a few other people could confirm this works on their images. I only have one - the first one I built with cog ran into this problem!

Signed-off-by: Dan Fairs <[email protected]>
@8W9aG 8W9aG marked this pull request as ready for review April 30, 2025 19:57
@8W9aG
Copy link
Contributor

8W9aG commented Apr 30, 2025

Thanks for this @danfairs ! The implementation and test look great, I'll see if we can get this in

@8W9aG 8W9aG self-requested a review April 30, 2025 19:57
@8W9aG 8W9aG enabled auto-merge (squash) May 1, 2025 18:56
@erbridge erbridge disabled auto-merge May 2, 2025 11:10
@8W9aG
Copy link
Contributor

8W9aG commented May 2, 2025

Moved the PR to #2292 and merged it, will close now

@8W9aG 8W9aG closed this May 2, 2025
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.

2 participants