-
Notifications
You must be signed in to change notification settings - Fork 404
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
Library variants poll: keep or drop support? #3417
Comments
Hi, Currently variants are used mainly by Mirage to be able to provide 2 implementations of libraries: Even if variants are not virtual modules, for some others projects like Currently, our fundamental use case is to properly build a project with |
I think there are two separate features here:
I use library variants in the ctypes dune port to support threaded/unthreaded variants, and it's also handy in checkseum and digestif and other Mirage libraries. However, I think we can live without the link time selection feature, as users can explicitly select the dependency set in their executables pretty easily. |
It's true in general, but without a default implementation we've seen many users very confused with the resulting error (as it can happen very deep in your dependency tree). |
I think we can keep the default implementations without variants. I would definitely prefer to do that |
Keeping the default implementation seems good. Otherwise, turning a normal library into a virtual library cannot be done without a breaking change. @dinosaure could you show us an example of what users of @avsm, given your message I'm considering that we can safely ignore the ctypes case in the decision process here. Finally, just a remark: a few people replied that they wanted to try library variants but didn't because they were experimental. Next time, we should think whether we can do better. For instance, in this case we could have proceeded as follow: make the |
Currently, due to the default mechanism provided by
Otherwise, it will have a link-error (reproducible with |
Indeed. That's something that could probably be improved. So regarding the current topic, would you be sad if we dropped support for library variants? We would keep support for default implementation though. The only thing you would have to do on your side is re-release your package without |
From what I know about |
Perfect, that's settled then. Let's promote Thanks to all who participated in this poll/discussion! |
Agreed, that would work great for all the usecases I can find. Thanks @jeremiedimino! |
This poll is now closed, I opened #3483 to track the change |
About a year ago, Dune got a new experimental feature called "library variants". This feature is an automated selection mechanism for virtual libraries. Because this feature has a high-cost in terms of code complexity and maintenance and also getting the design right turned out to be difficult, we decided to mark this feature as experimental and guard it under a
(using library_variants 0.1)
stanza in thedune-project
file.We would now like to move forward and either commit to long term support by promoting this feature to the vanilla language, or discard it entirely and simplify the Dune code base, making room for other exciting features.
From our point of view, it seems that this feature is unused. However, we wanted to get feedback from the community before making a decision.
So please react to this message with:
The default choice will be to drop support for library variants.
Note that this only concerns library variants, not virtual libraries. Virtual libraries are part of the vanilla dune language and there is no plan to get rid of them at this point.
The text was updated successfully, but these errors were encountered: