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

[SR-15271] Improve Codable Diagnostics When CodingKeys Do Not Match Properties #57593

Open
CodaFi opened this issue Oct 1, 2021 · 3 comments
Open

Comments

@CodaFi
Copy link
Member

@CodaFi CodaFi commented Oct 1, 2021

Previous ID SR-15271
Radar rdar://83771311
Original Reporter @CodaFi
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, DiagnosticsQoI, StarterBug
Assignee None
Priority Medium

md5: 3c54547b3d23d4952661aaf14230a55d

Issue Description:

Consider

struct Foo: Codable {
  var bar: String

  private enum CodingKeys: String, CodingKey {
    case ba
  }
}

What we should have is some kind of notes that explain that the manually-provided CodingKeys are insufficient to satisfy the ad-hoc "nested type requirement" of Codable because of the typo. Instead, all we say is that Foo doesn't conform to Codable.

@CodaFi
Copy link
Member Author

@CodaFi CodaFi commented Oct 1, 2021

Marking as a starter bug, but this one probably requires a little bit of up-front knowledge of the conformance derivation machinery. I'd be happy to bring somebody up to speed here if need be.

@jirid
Copy link
Contributor

@jirid jirid commented Oct 21, 2021

WIP: #39825

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented Oct 25, 2021

Comment by Waheed Afolabi (JIRA)

@CodaFi I'd be happy to take this up and hoping you bring me up to speed!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@jirid jirid self-assigned this Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants