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

Update to clang 10? #25

Closed
StephenHodgson opened this issue Apr 15, 2020 · 12 comments
Closed

Update to clang 10? #25

StephenHodgson opened this issue Apr 15, 2020 · 12 comments

Comments

@StephenHodgson
Copy link
Contributor

Any plans to update this library to use clang 10?

@xoofx
Copy link
Owner

xoofx commented Apr 15, 2020

What are you looking for specifically in clang 10?

@StephenHodgson
Copy link
Contributor Author

See xoofx/CppAst.CodeGen#3

@xoofx
Copy link
Owner

xoofx commented Apr 15, 2020

But why do you think that clang 10 is fixing this?
They barely make changes to the libclang API and implementation, so usually bugs like this can stay for a while...

@xoofx
Copy link
Owner

xoofx commented Apr 15, 2020

the issue is usually with libclang, not with clang. Libclang makes a C wrapper of their internal C++ API, but their wrapper is incomplete, so things perfectly exposed in C++ can be wrongly exposed (or not exposed at all) through libclang, that's a known issue unfortunately (for example: https://foonathan.net/2017/04/cppast/)

@StephenHodgson
Copy link
Contributor Author

Idk I thought it would help. I get correct tokens from other forms of this library

@xoofx
Copy link
Owner

xoofx commented Apr 15, 2020

Idk I thought it would help. I get correct tokens from other forms of this library

Which one? Do you have a small repro with these other libraries that I could check?

@StephenHodgson
Copy link
Contributor Author

Not a small repo, no. I was using the main branch of https://github.com/microsoft/ClangSharp

I also tried https://github.com/mono/CppSharp

All three don't really work for me but in lots of different ways lol.

I'm beginning to think it's impossible to generate good bindings for third party libraries.

@xoofx
Copy link
Owner

xoofx commented Apr 16, 2020

I will probably wait that https://github.com/microsoft/ClangSharp release NuGet packages.

I had to release my own https://github.com/xoofx/libclang but I would really prefer that there is a single source to manage that.

@StephenHodgson
Copy link
Contributor Author

Their beta came out recently.

I was trying to get their p/invoke gen setup but was unsuccessful. Tbh, I really like how you've setup the code gen in https://github.com/xoofx/CppAst.CodeGen better. Just makes more sense.

@xoofx
Copy link
Owner

xoofx commented May 2, 2020

So latest master is using ClangSharp 10.0 beta package, though, I'm not able to get tests running on the CI for some reasons...

@xoofx
Copy link
Owner

xoofx commented May 2, 2020

Tracking the issue with RID with ClangSharp here

@xoofx
Copy link
Owner

xoofx commented May 2, 2020

So CppAst 0.5.0-alpha-001 and CppAst.CodeGen are now both using clang 10

@xoofx xoofx closed this as completed May 2, 2020
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