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

Renaming files is a breaking change #16997

Closed
MikeAlhayek opened this issue Nov 12, 2024 · 0 comments · Fixed by #16996
Closed

Renaming files is a breaking change #16997

MikeAlhayek opened this issue Nov 12, 2024 · 0 comments · Fixed by #16996
Labels

Comments

@MikeAlhayek
Copy link
Member

MikeAlhayek commented Nov 12, 2024

In PR #16976, the SiteServiceCollectionExtensions class was renamed to ServiceCollectionExtensions, which introduced a binary breaking change.

Suppose you are using Package A from NuGet, which targets Orchard Core 2.0 and is compatible with the 2.x series. Meanwhile, your project depends on Orchard Core 2.1-previews and also includes Package A as a dependency.

In this case, you might encounter an exception like the following:

An unhandled exception was thrown by the application. System.TypeLoadException: Could not load type 'OrchardCore.DisplayManagement.Handlers.SiteServiceCollectionExtensions' from assembly 'OrchardCore.DisplayManagement, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null'.

If Package A were compiled with the 2.1-previews, this issue would not occur. However, since we have no control over external projects (like Package A in this case), renaming public types or files in minor or patch releases is not advisable, as it can introduce breaking changes for users of those dependencies.

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 a pull request may close this issue.

1 participant