Skip to content

Conversation

@danadajian
Copy link
Collaborator

@danadajian danadajian commented May 8, 2024

📝 Description

The change in v3.0.0 to generate open classes was a mistake. These should be Kotlin interfaces or abstract classes, not open classes. This will ensure more strict inheritance which is more appropriate for the use cases here.

  • Renames resolverClasses config to resolverInterfaces
  • Generates Kotlin interface rather than open class for resolverInterfaces types and types whose fields all have arguments
  • Generates Kotlin abstract class rather than open class for types where some but not all fields have arguments

This is technically a breaking change, but will release this as a bug fix because it corrects this massive oversight.

@danadajian danadajian marked this pull request as ready for review May 8, 2024 15:04
@danadajian danadajian requested a review from a team as a code owner May 8, 2024 15:04
@danadajian danadajian force-pushed the switch-to-interface branch from 34e68c2 to 4ebea8f Compare May 8, 2024 15:16
@danadajian danadajian changed the title fix: use Kotlin interfaces rather than open class fix: generate Kotlin interfaces rather than open classes May 8, 2024
@danadajian danadajian enabled auto-merge (squash) May 8, 2024 16:50
packageName: optional(string()),
/**
* Denotes types that should be generated as classes. Resolver classes can inherit from these to enforce a type contract.
* Denotes types that should be generated as interfaces rather than classes. Resolver classes should inherit from these to enforce a type contract.

Choose a reason for hiding this comment

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

Nit: "Resolver classes should implement the interface functions to enforce a type contract".

@danadajian danadajian merged commit 3f6e1f8 into main May 8, 2024
@danadajian danadajian deleted the switch-to-interface branch May 8, 2024 16:50
@github-actions
Copy link

github-actions bot commented May 8, 2024

🎉 This PR is included in version 3.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants