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

Add a --download-only flag to "opam install" #4071

Merged
merged 3 commits into from
Dec 12, 2020
Merged

Conversation

Armael
Copy link
Member

@Armael Armael commented Jan 21, 2020

This implements #4036 (cc @kit-ty-kate ).

This is still WIP because even when using the option, we get the usual message:

The following actions will be performed:
  ∗ install dune            2.1.3
  ∗ install conf-gmp        1      [required by z3]
...
===== ∗ 9 =====
Do you want to continue? [Y/n]

It would be better to recall explicitly at this point that in fact, this will only fetch the sources of the packages. I'm not sure how to do it though, in part because this message is currently printed using the graph before the build and fetch actions are made explicit, so we only have install/remove/reinstall/(change?) actions.

@rjbou
Copy link
Collaborator

rjbou commented Feb 18, 2020

Thanks for the pr!

For that, there is two way to proceed:

  • update request type to handle fetch actions, but it is maybe too intrusive for just a download only option
  • handle this case without calling all install mechanism, but by resolving the given request and downloading all its dependencies. A function can be added in OpamClient.

Another thing, on the behavior: If the package if already installed, install mechanism would end on a noop. In the meantime, an opam clean can have been launched, and its dependencies no more available locally. In this case, should it download them even if installed (and its deps) or assume that it is installed, no need to?

@rjbou rjbou added the PR: WIP Not for merge at this stage label Mar 3, 2020
@AltGr AltGr added this to the Next milestone Mar 9, 2020
@rjbou rjbou removed this from the Next milestone May 20, 2020
@rjbou rjbou linked an issue May 22, 2020 that may be closed by this pull request
@rjbou
Copy link
Collaborator

rjbou commented Jul 1, 2020

Also related to #2895

@rjbou rjbou added this to the 2.1.0~beta3 milestone Oct 9, 2020
@rjbou rjbou added PR: QUEUED Pending pull request, waiting for other work to be merged or closed and removed PR: NEEDS UPDATE PR: WIP Not for merge at this stage labels Oct 9, 2020
@rjbou
Copy link
Collaborator

rjbou commented Oct 12, 2020

Finalised, just waiting got cli versioning PR to be merged

@rjbou rjbou changed the title [WIP] Add a --download-only flag to "opam install" Add a --download-only flag to "opam install" Nov 13, 2020
Armael and others added 3 commits December 11, 2020 09:40
When this flag is enabled, sources are fetched but no other actions
are executed. This is useful to fill the download cache for a future
request in advance, for instance.
@rjbou rjbou removed the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Dec 11, 2020
@rjbou rjbou merged commit 1e53030 into ocaml:master Dec 12, 2020
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.

Feature request: Add the --download-only option to opam install
3 participants