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

Report inconsistent lifetime registrations in conventions #115

Open
kzu opened this issue Nov 12, 2024 · 0 comments
Open

Report inconsistent lifetime registrations in conventions #115

kzu opened this issue Nov 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kzu
Copy link
Member

kzu commented Nov 12, 2024

A given type may match more than once when using convention registrations (i.e. typeof(IDisposable) and separately, by regex).

Ideally there should be no overlap for the same concrete type, as that may cause weird lifetime bugs due to the first one to register the implementation type to "win" (since we use TryAddXXX). So it should be a warning to have a case where this happens.

Back this issue
Back this issue

@kzu kzu added the enhancement New feature or request label Nov 12, 2024
@kzu kzu changed the title Add analyzer that detects inconsistent lifetime registrations in conventions Report inconsistent lifetime registrations in conventions Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant