-
Notifications
You must be signed in to change notification settings - Fork 752
ABI.Initialize gives a helpful message when the TypeOffset interop class is not configured correctly #1340
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
Conversation
…is not configured correctly
I actually think the problem is this line should have been removed:
Changing Python version would also mean |
Python.Runtime.csproj includes all interopXX.cs files
The test failures imply that NativeTypeOffset is in fact not generated on some non-Windows platforms. I'm not sure what to do about that. |
It seems to be a temporary fluke, the test failures are identical between this and your other PR, which are unrelated. |
Oh @tminka , you meant this failure: f59e5d0 I think this is because you must keep <ItemGroup Condition=" '$(PythonInteropFile)' != '' ">
<Compile Include="$(PythonInteropFile)" />
</ItemGroup> I believe the file is generated outside |
I have restored the lines that you mentioned, and the same tests fail. So I don't think that was the problem. Also, if you look at the output of the "Build and Install" step, ubuntu 3.6 prints Perhaps the reason that no interop file is generated is because sys.abiflags was changed in 3.8 to be an empty string. Indeed, MacOS does not generate an interop file for Python 3.8 either. The reason that the "MacOS, 3.8" build succeeds is that the embedded tests were skipped. Maybe "ubuntu, 3.8" should also skip the embedded tests. |
What does this implement/fix? Explain your changes.
When changing Python versions, it is easy to put Python.NET into a misconfigured state. This PR provides a helpful error message in that case.
Does this close any currently open issues?
No
Any other comments?
This change can be tested by manually editing
configured.props
to have an incorrectPythonInteropFile
Checklist
Check all those that are applicable and complete.
AUTHORS
CHANGELOG