v13: Update deploy types (add setter to ArtifactDependency.Checksum and TryGetValue()/GetEntityTypes() to IFileTypeCollection)#15318
Conversation
AndyButland
left a comment
There was a problem hiding this comment.
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
Checksumproperty toArtifactDependencyto be able to remove the customJsonConverterworkaround 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
IFileTypeCollectionimplementation 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.