-
Notifications
You must be signed in to change notification settings - Fork 99
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
NuGet package 10.0.0-beta #149
Comments
The raw bindings (https://github.com/microsoft/LLVMSharp/tree/master/sources/LLVMSharp/Interop) and minimal wrapper API (https://github.com/microsoft/LLVMSharp/tree/master/sources/LLVMSharp/Interop.Extensions) should be stable and could be published as a 10.0.0 package. The proper managed wrapper (such as https://github.com/microsoft/LLVMSharp/tree/master/sources/LLVMSharp/Values, https://github.com/microsoft/LLVMSharp/tree/master/sources/LLVMSharp/Types however is not and would likely need to be ifdef'd out or pulled out to a separate library. |
Would this mean one package for raw bindings and one package for managed wrappers? Raw could be Apologies for my confusion, but it sounds like the managed wrappers need to be updated to match the raw binding changes caused by an API change from LLVM 9 -> 10. Is that correct? In other words, can I approximate what work needs to be done by diffing the relevant raw binding changes for the commit(s) that correspond to the update from 9 -> 10? Thanks! |
Yes, that could be a possibility. Although I think
Not quite. The API surface was changed pretty drastically between 5.0.0 and 8.0.0-beta. Namely the interop bindings went through some breaking changes to make them easier to generate and maintain. The high level managed wrapper is also a complete rewrite and is being designed to more closely match the LLVM C++ bindings (i.e. https://llvm.org/doxygen/classllvm_1_1LLVMContext.html, https://llvm.org/doxygen/classllvm_1_1Type.html, https://llvm.org/doxygen/classllvm_1_1Value.html). However, there is a lot of surface that hasn't been defined yet and that still needs work before it could be considered stable. So @mjsabby, do you see any issues with making this split so we can have stable interop bindings without requiring the managed wrapper to have the same stability? |
Ok thanks. I'll take a look at the C++ bindings to get some more context. A bit of a tangent, but have you looked at using ClangSharp to consume the C++ bindings and try to generate the managed wrapper classes automatically? I'm guessing you have, but I had to ask :) |
I personally don't like the idea of two assemblies for essentially the same functionality. It is sort of expected that the LLVM C APIs are somewhat stable, but not completely. I mean LLVM makes a lot of breaking changes (or at least did in the past). Couldn't we follow the same model? Also is the -beta thing more of an annoyance or does it cause grievance when including in a product (because it is called beta)? |
Possibly clueless question: Is it true that the reason these two things have different notions of stability is because the raw bindings are auto-generated while the proper managed wrapper requires stuff to be done by hand? |
The raw bindings are auto-generated and since they are generated as 1-to-1 they should always be "correct" and therefore are basically stable from the moment they are checked in (minus minor bugs or issues that can easily be patched). The higher level bindings however, are a manually written API that has a higher chance of introducing bugs or mistakes and which might not be in the right shape based on user feedback. Breaks introduced here might also be more painful to respond to. |
I'm not worried about introducing breaks between 10.0.0 and 11.0.0, as that just follows the standard SemVer model. I am concerned with saying the current managed wrapper is "stable" at 10.0.0 and then breaking it in 10.0.1 because some more work was done and we found things weren't done the right way. Using 10.1.0 might be easier, but if LLVM itself ships a 10.1, then it might get confusing as to how things match up. |
Currently it's an annoyance for myself, but it will develop into a grievance as my project progresses. Valid technical issues aside, I think the beta tag causes some doubt about the authority of the |
Could we not, in principle, walk the declarations of the LLVM C++ API using |
For this reason, I think of these as two rather different pieces of software, and having them be separate packages would make sense to me. |
Not easily. There isn't a 1-to-1 mapping (or even always a clear mapping) between the C types and APIs exposed and the available C++ APIs. It's really a best effort approach after examining the C API and comparing to what the C++ API exposes. I haven't had as much time to invest into LLVMSharp which is why its managed wrapper isn't as far done as the ClangSharp version is. LLVM 11 will also be coming out soon (I think just one blocking bug) and so versions off both projects should be coming out shortly after that. |
That being said, now that .NET 5 work is slowing down as we prepare for the November release; I might be able to put some more effort in here to try and finish rounding it out. |
I've split the project into The |
Does anyone know/remember what's remaining to get this package up to
10.0.0
?The text was updated successfully, but these errors were encountered: