Skip to content

RequirementsTxtParser: surface resolution failures as ParseExceptionResult#7326

Merged
Jenson3210 merged 1 commit intomainfrom
requirements-txt-parse-exception-marker
Apr 9, 2026
Merged

RequirementsTxtParser: surface resolution failures as ParseExceptionResult#7326
Jenson3210 merged 1 commit intomainfrom
requirements-txt-parse-exception-marker

Conversation

@Jenson3210
Copy link
Copy Markdown
Contributor

@Jenson3210 Jenson3210 commented Apr 9, 2026

Summary

  • Attach a ParseExceptionResult marker when RequirementsTxtParser cannot produce a PythonResolutionResult (non-PlainText input, workspace creation failure, or empty freeze output) instead of silently returning the source file unchanged.

  • Add a test covering the unresolvable-requirements path.

  • Links: moderneinc/customer-requests#2185

Test plan

  • ./gradlew :rewrite-python:test --tests "*RequirementsTxtParserTest*"

Surface failures (non-PlainText input, workspace creation failure, empty
freeze output) as ParseExceptionResult markers instead of silently
returning the source file unchanged, so users can diagnose why no
PythonResolutionResult was produced.
@github-project-automation github-project-automation bot moved this from In Progress to Ready to Review in OpenRewrite Apr 9, 2026
@Jenson3210 Jenson3210 merged commit aae20a5 into main Apr 9, 2026
1 check passed
@Jenson3210 Jenson3210 deleted the requirements-txt-parse-exception-marker branch April 9, 2026 08:12
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants