Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Package.swift to correctly encode revision kind as "revision" #1558

Merged
merged 2 commits into from
Jul 13, 2020

Conversation

ollieatkinson
Copy link
Collaborator

Short description 📝

@natanrolnik noticed that we had a bug when specifying a requirement to a revision:

We received an error that we couldn't handle:
    - Localized description: The data couldn't be read because it is missing.
    - Error: keyNotFound(CodingKeys(stringValue: "kind", intValue: nil), Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "packages", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "requirement", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: \"kind\", intValue: nil) (\"kind\").", underlyingError: nil))"

Solution 📦

Correctly encode "revision" to kind

@pepicrft
Copy link
Contributor

Ouch, good catch. Thanks for fixing it @ollieatkinson. I pushed a commit to update the CHANGELOG.

@pepicrft pepicrft merged commit e8a2683 into master Jul 13, 2020
@pepicrft pepicrft deleted the package-requirement-kind branch July 13, 2020 15:32
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.

3 participants