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

.NET Modernization #2

Open
Skyppid opened this issue May 13, 2024 · 3 comments
Open

.NET Modernization #2

Skyppid opened this issue May 13, 2024 · 3 comments

Comments

@Skyppid
Copy link

Skyppid commented May 13, 2024

Any chance this library will be updated to .NET 5+? I've been desperately searching for exactly this since dotNext seems to have a bug in it's async state machine that causes problems with my code. I wanted to try it out but we're running .NET 8 which is not at all compatible with Framework at all.

@avonwyss
Copy link
Owner

avonwyss commented May 13, 2024

@Skyppid The reason for this library not being updated is that we're still on the legacy .NET Framework. However, I think that there is nothing really specific to the .NET Framework in there, and that it may just work. The code uses plain LINQ lambdas which are fully supported in the dotNext AFAIK, so it may be worth getting the source and trying it out.

Just out of curiosity, what is the bug in the state machine of dotNext which is causing you trouble?

@Skyppid
Copy link
Author

Skyppid commented May 13, 2024

@avonwyss Alright, I might just fork it and try if it's enough to just add .NET 8 as target. Maybe you could merge the PR if all is fine so I can use the official package for that?

The issue is odd. It fires a NullReferenceException when doing the transition(ref this). On inspection I found that the State of the machine was completely empty, all fields null - which would explain why this would throw. I can't figure out why though, I'm not that deep into it. So I figured your library might be worth a try since it basically does the same thing and it should be easy to adapt the current code to. The thing is it does not always happen. Sometimes the compiled function works fine. I couldn't identify it exactly but it seems like subsequent calls fail then. Or maybe it's due to the async nature when being called simulatenously on different threads, idk.

EDIT: Oh I see it's not even a SDK-style project. Makes things a lot more difficult. Maybe I would fork it, recreate a new solution and add the files and publish the package on our internal feed then. What would you say? I just don't have a lot of time right now to modernize it in a way it can be pushed back into your repository...

@avonwyss
Copy link
Owner

@Skyppid Sure, go ahead and use the files in your internal feed, no problem (..,.it's not GPL, it's MIT...). Feel free to create your own public derivative if you feel like it, I have no issue with that either. This is basically a library I use internally which I decided to share to give back to the community, since I thought it may be useful for others as well.

That being said, getting feedback or suggestions for improvement is always welcome, so that I can improve on the library.

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