Skip to content

Propagate underlying error in Runner.Error.invalidPackage#264

Open
giginet wants to merge 1 commit intomainfrom
propagate-underlying-error-in-invalid-package
Open

Propagate underlying error in Runner.Error.invalidPackage#264
giginet wants to merge 1 commit intomainfrom
propagate-underlying-error-in-invalid-package

Conversation

@giginet
Copy link
Copy Markdown
Owner

@giginet giginet commented Mar 17, 2026

Summary

  • Runner.Error.invalidPackage now carries the underlying Swift.Error that caused the failure
  • When DescriptionPackage initialization fails, the original error (e.g. package resolution failure, manifest parsing error) is preserved and displayed to the user instead of being silently discarded
  • This makes it much easier to diagnose CI failures like "Failed to parse package manifests"

Test plan

  • swift build succeeds
  • Verify that when DescriptionPackage initialization fails, the error message now includes the underlying cause

🤖 Generated with Claude Code

When DescriptionPackage initialization fails, the original error was
discarded and replaced with a generic invalidPackage error containing
only the package directory path. This made it impossible to diagnose
the root cause of failures such as package resolution or manifest
parsing errors.

Add a Swift.Error associated value to the invalidPackage case so
the underlying error details are preserved and displayed to the user.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@giginet giginet requested a review from ikesyo March 17, 2026 02:58
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