crystal-lang / crystal_lib

Automatic binding generator for native libraries in Crystal
138 stars 30 forks source link

Use crystal-lib/clang.cr as libClang binding #56

Closed olbat closed 6 years ago

olbat commented 6 years ago

(I will rebase and remove the cherry-picked commit that adds support to Crystal 0.26 once we'll be sure the tests are passing)

olbat commented 6 years ago

One test is still failing.

I don't understand why ATM but unexposed structs are not parsed the same way when using the clang.cr library.

Someone may have an idea? (@ysbaddaden maybe ?)

ysbaddaden commented 6 years ago

No idea, sorry :(

olbat commented 6 years ago

Ok, thank you!

I just took a look again and I guess I finally got what's wrong: there seems to be typo in clang.cr (see https://github.com/ysbaddaden/clang.cr/pull/5).

With this fix the PR will pass the tests.

olbat commented 6 years ago

Tests are fixed so the PR is ready to be reviewed/merged.

Note: I had to fix a version in the shards file and I chose 0.1.0, please let me know if you prefer to use another version number

olbat commented 6 years ago

Thanks!

@RX14 , @mverzilli, do you think it's ready to be merged/it can be merged?

RX14 commented 6 years ago

I don't know enough to review this.

If @ysbaddaden thinks it's okay, he can merge it right now.

ysbaddaden commented 6 years ago

I believe this is fine, but that means my clang bindings must be kept up-to-date —I didn't check clang 7, by-the-way.

olbat commented 6 years ago

I believe it might be a good idea to centralize the effort of maintaining an up-to-date/working clang binding :-)

I'll try to find some time this week to test your binding with clang 7.

olbat commented 6 years ago

I added a test for LLVM 7.0, everything seems to be OK :)

olbat commented 6 years ago

Are any other changes needed?

ysbaddaden commented 6 years ago

No changes needed, but we're discussing to move clang.cr to the crystal-lang organization :)

ysbaddaden commented 6 years ago

I just did the transfer: https://github.com/crystal-lang/clang.cr

olbat commented 6 years ago

Okay! Should I modify the shards.yml and shards.lock files accordingly?

bcardiff commented 6 years ago

If you can @olbat , yes please :-)

olbat commented 6 years ago

@bcardiff done!

bcardiff commented 6 years ago

Thanks @olbat !