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

Support building with older versions of libuv that may be installed on the system #97

Merged
merged 39 commits into from
Feb 15, 2021

Conversation

aantron
Copy link
Owner

@aantron aantron commented Feb 14, 2021

Will resolve #96. cc @andyli.

  • Try to decrease version all the way down to 1.7.0, the minimum libuv version that exposes version macros 1.0.0 1.3.0.
  • Add documentation to the feature flags module.
  • Add instructions on how to use the feature flags to the user guide.
  • Show feature flags by every API that has them.
  • Link back to each API from each feature flag.
  • Eagerly intercept some of the more dangerous unimplemented API calls and raise some exception. Review the behaviors in general (though most behaviors are safe).
  • Add feature flag testing to the test suite.
  • Make sure the feature detector is using the system libuv's version number, if using the system libuv.

@aantron aantron added this to the 0.5.7 milestone Feb 14, 2021
@aantron aantron marked this pull request as draft February 14, 2021 20:14
@aantron
Copy link
Owner Author

aantron commented Feb 15, 2021

With enough shims, I've gotten Luv to build against every libuv starting from 1.3.0. This will cover all the distros linked by @andyli here — as @andyli already mentioned in #94, the lowest libuv version that is included in distros that include libuv 1.x is 1.8.0. Some distros seem to have libuv 0.x, but Luv definitely will not support that.

At 1.3.0 there is an ABI change that is slightly difficult to bind across using Ctypes, but it can be worked around by hiding a struct field behind an accessor function. I decided not to bother with it and just stop, because 1.3.0 is, again, older than 1.8.0.

I'll now work on all the docs on using the shims safely, and review the exact behavior of all the shims. Most just fail with ENOSYS, but some have to forward to existing functions — for the latter, I need to make sure no surprising behavior is triggered, probably by returning ENOSYS at the OCaml level when unsupported option arguments are used, etc.

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.

Support linking against older versions of libuv
1 participant