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

Use Clang.jl to automate C wrapper #223

Merged
merged 4 commits into from
Aug 19, 2024
Merged

Use Clang.jl to automate C wrapper #223

merged 4 commits into from
Aug 19, 2024

Conversation

odow
Copy link
Member

@odow odow commented Aug 19, 2024

This PR uses Clang.jl to wrap the libnlopt.h header file.

It also gets rid of the various @eval and macro definitions. Boring and verbose is better than clever.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 41.12903% with 146 lines in your changes missing coverage. Please review.

Project coverage is 57.91%. Comparing base (b860c0c) to head (49c4203).
Report is 2 commits behind head on master.

Files Patch % Lines
src/libnlopt.jl 25.21% 86 Missing ⚠️
src/NLopt.jl 54.88% 60 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

❗ There is a different number of reports uploaded between BASE (b860c0c) and HEAD (49c4203). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (b860c0c) HEAD (49c4203)
2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #223      +/-   ##
==========================================
- Coverage   65.63%   57.91%   -7.73%     
==========================================
  Files           2        3       +1     
  Lines         777      948     +171     
==========================================
+ Hits          510      549      +39     
- Misses        267      399     +132     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@odow
Copy link
Member Author

odow commented Aug 19, 2024

This is backwards compatible because we now have two copies of the enums, and Base.converts between them.

@odow
Copy link
Member Author

odow commented Aug 19, 2024

I think this is an improvement. As an example, it now exposes the C API necessary for #122

There's still a bunch of stuff we need to keep around for backwards compatibility, but we can continue to chip away at tidying it up.

src/NLopt.jl Show resolved Hide resolved
@odow odow merged commit e89fa28 into master Aug 19, 2024
9 checks passed
@odow odow deleted the od/clang branch August 19, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants