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
Add compat module. #4
Conversation
I think that this is a good idea since there will necessarily be projects that will not update to camomile 2.0.0 and it will be up to package maintainers to keep comparability. Having a dedicated compat module is a much less invasive strategy than maintaining a series of patches. |
Just pushed an update that should make the Could you confirm? I'm ready to release this. |
I haven't been able to confirm this yet, but I will ASAP. |
So I was testing liquidsoap 2.1.4 and I get:
ah whoops nevermind. I just realised I need to patch |
Yes, the diff is annoying but that's because our build system pre-dune is also annoying :-) It's here: https://gist.github.com/toots/ca314c1829c729ff4384d3c500ef8f6b |
@toots Is there anything left for this? |
After some thinking, I'm a little hesitant to release a compat module actually. My original thought was that, without a compat module, there is no way to build all the modules depending on the old camomile API. However, this also comes at the same time as the new In other words, all the projects currently broken because they do not support the new camomile API are, in fact, broken because they do not support the new compiler API. For this reason, there doesn't seem to be a pressing need to provide a compat module from a usability perspective. The argument against a compat module, on the other hand, is that, once it is provided, it will be carried for a while, kicking down the road the issue of fixing unrelated code that, eventually, needs to be updated. So, I'd rather use the opportunity of the global OCaml This would include, I believe, the code for the compat module, which could be provided as an example but not in the official API. |
Very well, in that case we can turn the compat API here into a migration guide for people looking to port their libraries. |
Exactly! I'll push that shortly! |
@Alizter I added an entry in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adds a new internal, non-public library. This library should provide a backward-compatible API so that all projects using
camomile
pre-2.0.0 API can use it if needed. We want to encourage user to migrate to the new API so the library is only provided as example and not as public package.