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

Simplification #12

Open
wants to merge 9 commits into
base: cabalization
Choose a base branch
from
Open

Simplification #12

wants to merge 9 commits into from

Conversation

BurningWitness
Copy link
Collaborator

The changes:

  • Removed all wrapping functions, removed *.Internal modules;
  • Removed all record field name prefixes; HasField and Offset use C names as well. DuplicateRecordFields is now turned on in every type-defining module. NoFieldSelectors is also included in every module if GHC 9.2+ is used.
  • Bumped FreeType to 2.12.1;
  • Removed the lens conversion test. For the record using lens for field access was a complete misuse of the library, so I never went through with it.
  • Adjusted the example application.

This is most probably the last huge breaking rewrite, as at this point in time I don't believe there's a better way of making bindings. The two main library use patterns, ExceptT and exception throwing, are fundamentally at odds with each other and for certain functions in-place allocations are unwanted (ft_Get_Kerning under soft real-time constraints is a great example of this). As such leaving these definitions to the user is the only graceful way of handling this.

As with #8, the migration guide is a lousy "use the new format", although unlike that PR the changes are mostly just recreating wrappers and checking for errors manually. 0.2.* functions with a single quote at the end are identical to their 0.3.* counterparts without the single quote.

I am aware that as a repository collaborator I don't need explicit approval to proceed with merging this PR. Nonetheless I will most probably let it hang for a week or two as I wish to realign my other two binding libraries to this exact reasoning and then push all three to Hackage. The access issue with CI will hopefully resolve itself until then as well.

@dagit
Copy link
Owner

dagit commented Nov 15, 2022

The access issue with CI will hopefully resolve itself until then as well.

I tried to set things up on circle ci (long ago enough that I don't even remember it now). I don't know if that's what you're referring to or not. If there is something I can do to help, please let me know.

@BurningWitness
Copy link
Collaborator Author

@dagit There's no issue to resolve on your side, CircleCI did work yesterday just fine.

The failure I'm referring to is Linux containers not working today (e.g. link) with the message:

E: Repository 'https://cli-assets.heroku.com/apt ./ InRelease' changed its 'Origin' value from 'Heroku' to 'Jeff Dickey @jdxcode'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

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

Successfully merging this pull request may close these issues.

2 participants