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

[Core] AsReadOnly<T> conflicts with System.Collections.Generic.CollectionExtensions #2225

Open
Tracked by #8339
MartinZikmund opened this issue Mar 29, 2024 · 4 comments
Labels
kind/enhancement New feature or request. triage/untriaged Indicates an issue requires triaging or verification.

Comments

@MartinZikmund
Copy link
Member

MartinZikmund commented Mar 29, 2024

What would you like to be added:

Note this extension does not come from Uno Extensions, but from Uno.Core package

When Uno Extensions are included in an app, the Uno.Core AsReadOnly extension will conflict with the .NET built-in one, as Uno Extensions adds global using for Uno.Extensions namespace, so both are included by default when the user uses Uno Extensions, so AsReadOnly is essentially unusable as an extension method.

image

I think it may be just better to keep this one internal only or remove it altogether.

Why is this needed:

Usability

For which Platform:

All

@MartinZikmund MartinZikmund added kind/enhancement New feature or request. triage/untriaged Indicates an issue requires triaging or verification. labels Mar 29, 2024
@MartinZikmund MartinZikmund transferred this issue from unoplatform/uno.extensions Mar 29, 2024
@jeromelaban jeromelaban transferred this issue from unoplatform/uno Apr 1, 2024
@jeromelaban
Copy link
Member

Uno.Core does not provide this particular extension, it is a sub-package that provides it. If need be, the dependency should be decomposed to avoid using that particular sub-package that provides this extension.

@nickrandolph
Copy link
Contributor

@MartinZikmund / @jeromelaban has anything been done about this?

@MartinZikmund
Copy link
Member Author

@nickrandolph not yet, not sure if this would be a breaking change that we can safely do?

@nickrandolph nickrandolph changed the title AsReadOnly<T> conflicts with System.Collections.Generic.CollectionExtensions [Core] AsReadOnly<T> conflicts with System.Collections.Generic.CollectionExtensions May 7, 2024
@jeromelaban
Copy link
Member

No change has been done for this. The only way to change this is to ensure that uno.extensions does not rely on uno.core, but only the required sub packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request. triage/untriaged Indicates an issue requires triaging or verification.
Projects
None yet
Development

No branches or pull requests

3 participants