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

Prometheus.ITimer vs System.Threading.ITimer in .NET8 #455

Open
JDA88 opened this issue Nov 28, 2023 · 2 comments
Open

Prometheus.ITimer vs System.Threading.ITimer in .NET8 #455

JDA88 opened this issue Nov 28, 2023 · 2 comments

Comments

@JDA88
Copy link

JDA88 commented Nov 28, 2023

.NET8 introduce an new System.Threading.ITimer interface that have the same name as Prometheus.ITimer

You need to change all ITimer to Prometheus.ITimer to fix the .NET8 upgrade.
Maybe ITimer is a little too generic of a name no?

@sandersaares
Copy link
Member

sandersaares commented Dec 3, 2023

Yes, perhaps indeed. However, it seems too late to change anything here. This is exactly the naming conflict that namespaces exist to work around. Or do you propose some specific change to the library with this issue? It is not clear what is the purpose of this post - please clarify.

@JDA88
Copy link
Author

JDA88 commented Dec 3, 2023

It was mostly to point out the issue as most of the people using the library will face the issue upgrading to .NET8+ considering how common System.Threading namespace is.

The fix is easy enough and just require to convert most variable declaration from ITimer to Prometheus.ITimer.

So, if you think changing the interface name is much worse than that (and I think you are probably right) you can archive the issue.

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

No branches or pull requests

2 participants