-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
v13: Update deploy types (add setter to ArtifactDependency.Checksum
and TryGetValue()
/GetEntityTypes()
to IFileTypeCollection
)
#15318
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me, and as you say, is mostly comments and cleanup.
Looks good to me! 👍 |
@nul800sebastiaan, I think we should revert this, if it cant be made non-breaking. The final release is too near IMO |
Hopefully should be solved by providing a default implementation for the interface additions #15363 |
it's not really fixing the problem. If people implemented the old interface, but our code now calls these new methods it will throw. |
@bergmania This is how we encourage other contributors to do it, and we've merged quite a few PRs that way in the past year, should we stop doing this altogether then? |
The biggest issue here is timing.. Breaking changes of existing code should have been part of the first RC so package developers have better odds for making their packages compatible. Default interface implementations are fine in some case, but just throwing an exception still makes it break at runtime, but effectively hides it for developers on build time. In cases where a sensible default implementation cannot be made (e.g calling another method from the interface), I think it is a better solution to have the new methods on a new interface and let both be implemented. Then the using code can check if it is implemented. |
discussing with @ronaldbarendse now as well, things are clarifying for me - he's updated the PR with a much more reasonable response for those methods |
Merged #15363 to unbreak it! |
PR #15144 added the
Checksum
property toArtifactDependency
to be able to remove the customJsonConverter
workaround in Deploy 13 that (de)serializes this property to/from the artifact JSON. The checksums are only calculated/populated when doing an export and without the workaround we don't need to create a new instance of a subclassed type anymore, so we should actually make the property settable/writable 😄The
IFileTypeCollection
implementation in Deploy now also requires being able to return all registered entity types inGetEntityTypes()
and we've added aTryGetValue()
method for a more performant lookup. These methods are now added to the interface.Finally, I've updated all deploy related XML docs/comments, because some didn't have any or were not really explaining the concepts correctly.