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
Fail in application running on MessagepackCompiler.RunAsync on Windows (works on Linux & macOS) #1770
Comments
I'm no windows developer, but fired up a windows box and did some digging, seems that just changing So I guess the real solution to this problem in general is to just update MessagePack-CSharp to dotnet 8 and it should not be a problem. And seems that #1725 is on it's way? But perhaps it might be a good? or maybe a really bad? Idea to just update MPC to support In the meantime, my workaround was to just clone the repo, from
|
Thanks for the report and sharing your workaround. I don't know why merely targeting .NET 8 would fix this, but it seems like a bug is present and a .NET 8 target may just be masking it. The repro may be useful. That said, we're not investing in |
Alright, good to know. Would it possible to do a small patch release with just the workaround similar to what I did enabling others that might be upgrading to dotnet8 and happens to be on Windows? I could do the work needed and submit a PR if it would be an acceptable solution. For my specific use case we can always build and carry our own mpc for the windows folks. I haven't found any bugs from the generated code we have so far and the code we generate is used quite a lot and using dotnet8 server side and il2cpp client side. |
Thank you for offering the PR. However I hesitate to take a PR that makes a problem go away without understanding why it works. |
Yeah, that's quite understandable... I've been looking at this for a while now as well trying to understand what's going on. It seems that it might be due to a bug in dotnet itself, on later versions of dotnet 8 this is a non-issue. It just won't repro in that case when on dotnet 8.0.200 |
Bug description
Starting with dotnet 8 and message pack stand alone generator it crashes when generating on Windows.
This is the case for latest (2.5.140) as well as prev versions, and specifically for Windows. The same code and generation flow works as expected on macOS and Linux respectively
Repro steps
Code to reproduce the behavior have been added to gist https://gist.github.com/SneWs/5c9baa2945f398c7b4661a450876e0da
And I invoke the command to generate as follows:
And the tool is defined in .config/dotnet-tools.json as:
Expected behavior
That it generates the code just as it's done before and as it still does on macOS and Linux
Actual behavior
What happened instead of what you expected.
I get a crash/exception thrown and the program stops running. The output is:
Version used:
Additional context
I can't make out why this only fails on Windows 11 and works on macOS and Linux.
The text was updated successfully, but these errors were encountered: