-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature proposal: opam install --justinstall
#3380
Comments
That sounds quite useful. I think it could also solve many of @gasche's woes regarding compiler development with opam. |
The feature you propose sounds very nice. I have no strong opinion over whether it should be in (I hadn't thought about the way opam-installer is limited by not being able to register packages within the opam database. Would it make sense for the (un)registration features to be available in an advanced root-administration tool provided in the |
P.S.: I would like to re-do my |
WHAT? Gaaah, I was sure that was merged, should have been done before the announcement ! |
(For the record, it has just been merged by @AltGr) |
yes, sorry about the delay... |
If we do have this flag, it might be better called |
There is currently still something that feels like a hole in our workflows, when working in an opam-aware project: these two are very good
opam install . --deps-only
to have opam handle the local source dependenciesmake
to compile by handThese can be enough, but sometimes, you need to also test the installation of your package by hand, and things get a bit worse:
opam install .
, but if you do it repeatedly, there will be no incremental compilation, so this can get quite longmake install
(possibly callingopam-installer
if you use.install
files), to use the results of yourmake
. But then the resulting installation gets into your opam prefix, without being registered by opam, so this is a bit unclean (I admit I am using this a lot, though).The option
--reuse-build-dir
and--inplace-build
have somehow been attempts at helping here, but are not really satisfactory to that purpose: they are a bit heavy to use, bring some quirks and don't always behave as expected (e.g.--inplace-build
will re-run./configure
with its own options from theopam
file in your project dir, which may get annoying).Enough for the summary of the issue, here is an idea to fill that gap:
let the user run the builds with their own tools, but let opam handle just the install part, from the source directory, and assuming the build was done properly. Could be something like:
assuming
foo
is a locally-pinned package, or a directory containing one or more opam packages, run their installation instructions, including handling their.install
and.config
files if any, and register their installation into opam (then possibly recompiling dependents if any). Another plus is that uninstallation can then be cleanly handled by opam.This could typically be used just after
make
, or directly from a Makefileinstall
rule. Implementation-wise, care should be taken that the command is not allowed to modify any dependency offoo
.I'd like to have the input from the users here!
Another idea could be to just extend
opam-installer
(or a related command built-in opam) so that it registers the installation of the package within opam. It would certainly be simpler, but wouldn't handle installation outside of.install
files, consistency with the package definition, or recompilation of dependents.The text was updated successfully, but these errors were encountered: