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

v13: Update deploy types (add setter to ArtifactDependency.Checksum and TryGetValue()/GetEntityTypes() to IFileTypeCollection) #15318

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

ronaldbarendse
Copy link
Contributor

PR #15144 added the Checksum property to ArtifactDependency to be able to remove the custom JsonConverter 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 in GetEntityTypes() and we've added a TryGetValue() 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.

Copy link
Contributor

@AndyButland AndyButland left a 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.

src/Umbraco.Core/Deploy/ArtifactSignature.cs Show resolved Hide resolved
@nul800sebastiaan nul800sebastiaan merged commit 12a43c2 into release/13.0 Dec 4, 2023
4 of 6 checks passed
@nul800sebastiaan nul800sebastiaan deleted the v13/improvement/deploy-types branch December 4, 2023 15:00
@nul800sebastiaan
Copy link
Member

Looks good to me! 👍

@bergmania
Copy link
Member

@nul800sebastiaan, I think we should revert this, if it cant be made non-breaking. The final release is too near IMO

nul800sebastiaan added a commit that referenced this pull request Dec 5, 2023
@nul800sebastiaan
Copy link
Member

Hopefully should be solved by providing a default implementation for the interface additions #15363

@bergmania
Copy link
Member

it's not really fixing the problem. If people implemented the old interface, but our code now calls these new methods it will throw.

@nul800sebastiaan
Copy link
Member

@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?

@bergmania
Copy link
Member

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.

@nul800sebastiaan
Copy link
Member

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

@nul800sebastiaan
Copy link
Member

Merged #15363 to unbreak it!

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

Successfully merging this pull request may close these issues.

4 participants