-
Notifications
You must be signed in to change notification settings - Fork 407
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
dune developer preview: automatic depext handling? #11000
Comments
I agree having the command |
Agreed that it's definitely not worth it. A command to print all the depexts in a way that is easy to consume by |
@moyodiallo could you have a look at this? |
We could do this, opam-depexts package already exist but it's frozen because already integrated in This is my proposition how it could be done.
What do you think ? |
Or, we can just let the user install the depexts manually or using the opam command. Copying code from opam doesn't buy us much. None of the installation is done within dune's sandbox anyway, and the command requires sudo, so the user needs to see it before its executed. |
Having a command that prints all depexts for the current OS in a machine parseable form (e.g. one per line or separated by spaces) would be useful. The user can then call the package manager themselves, e.g. |
OK, let's go for |
Desired Behavior
I was trying out the Dune preview on OBuilder, and it has shown this message:
This is good (I installed the package, and tried again), but
opam
has this functionality built-in withopam depext
.It would be good if
dune pkg
had a similar feature: it can already print the depexts, so would be good if there was a command to either automatically install them, or query them all so that one can manually install them.Example
dune pkg depext
should print a list of packages that need to be installed with the distro's package manager, such that$distro_package_manager $(dune pkg depext)
would install all the missing depexts of the current dune project.Alternatively
dune pkg depext --install
could also attempt to automatically invoke the appropriate package manager withsudo
, but I'm not sure whether it is worth duplicating all that code from opam (could perhaps theopam depext
code be moved to a package that both opam and dune share so that improvements to one are not lost in the other?This can be tested using OBuilder's dune-project as a starting point https://github.com/ocurrent/obuilder/blob/v0.6.0/dune-project, which includes the dependency on sqlite3 (make sure you don't already have sqlite3 installed, e.g. by trying to run this in a fresh container).
The text was updated successfully, but these errors were encountered: