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

Bincompat-friendly codegen #1500

Open
kubukoz opened this issue Apr 22, 2024 · 0 comments
Open

Bincompat-friendly codegen #1500

kubukoz opened this issue Apr 22, 2024 · 0 comments
Labels
question Further information is requested
Milestone

Comments

@kubukoz
Copy link
Member

kubukoz commented Apr 22, 2024

Related: #1485, smithy-lang/smithy#2243, Discord discussion

In some situations, such as generating protocol shapes (not limited to, but in particular: traits), it would be beneficial to allow evolving models without breaking binary compatibility of generated code.

For example, adding a new field to a struct trait shouldn't break binary compatibility of the result.

We should come up with and agree on:

  • conditions under which we would generate a shape as bincompat-friendly
    • for example: all traits? per-namespace/per-shape configuration? Something like what we're doing for validated newtypes in Validated newtypes #1454?
  • an exact encoding that'll work across all supported Scala versions. Some starting points for discussion:
    • non-case classes
    • public getters
    • public withX (for a member named x) instead of copy methods
    • mutable builders?

and implement these for the next minor version (0.19), if possible.

@kubukoz kubukoz added the question Further information is requested label Apr 22, 2024
@kubukoz kubukoz added this to the 0.19.0 milestone Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant