Skip to content

Conversation

@thomasvl
Copy link
Collaborator

@thomasvl thomasvl commented Jan 7, 2025

Upstream added a recent conformance test to ensure things fail for an empty @type or one that doesn't have atleast a single slash. This updates the library to do that validations during parsing from JSON only.

The change for this enforcement is pretty small (just the code in Sources/SwiftProtobuf/AnyMessageStorage.swift). The rest is to add a new error in the new SwiftProtobufError approach and then to update all of the apis to document that there are an additional type of error that could be throw.

Upstream added a recent conformance test to ensure things fail for an empty
`@type` or one that doesn't have atleast a single slash. This updates the
library to do that validations during parsing from JSON *only*.

The change for this enforcement is pretty small (just the code in
Sources/SwiftProtobuf/AnyMessageStorage.swift). The rest is to add a new error
in the new SwiftProtobufError approach and then to update all of the apis to
document that there are an additional type of error that could be throw.
@thomasvl thomasvl marked this pull request as ready for review January 7, 2025 18:47
Copy link
Collaborator

@tbkka tbkka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@thomasvl thomasvl merged commit e876103 into apple:main Jan 8, 2025
12 checks passed
@thomasvl thomasvl deleted the fix_conformance branch January 8, 2025 15:04
@thomasvl thomasvl added the 🔨 semver/patch No public API change. label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants