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

init: install cygwin internally #5545

Merged
merged 9 commits into from
Jul 21, 2023
Merged

Conversation

rjbou
Copy link
Collaborator

@rjbou rjbou commented May 10, 2023

At init, add an item in the cygwin menu to propose to have a cygwin install internal to opam. It is handled by opam itself (prefix stored in <opamroot>/.cygwin/root), when depext are requested, there is no confirmation requested.
It also adds some flags to init, to have a cywgin configuration non interactively: --no-cygwin-setup|--cygwin-internal-install|--cygwin-local-install and --cygwin-location <path>.
These are experimental as they can change name from the finale release.

TODO

@rjbou rjbou added PR: QUEUED Pending pull request, waiting for other work to be merged or closed PR: WAITING FOR REVIEW labels May 10, 2023
@rjbou rjbou added this to the 2.2.0~alpha milestone May 10, 2023
@rjbou rjbou added this to PR in progress in Opam 2.2.0 via automation May 10, 2023
@rjbou rjbou moved this from PR in progress to PR to review for 2.2.0~alpha in Opam 2.2.0 May 10, 2023
Copy link
Member

@AltGr AltGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need lots of foolproof testing, but the patch is good! I only propose a few message rewords.

src/client/opamClient.ml Outdated Show resolved Hide resolved
src/client/opamClient.ml Outdated Show resolved Hide resolved
let required_packages_for_cygwin =
[
"diffutils";
"git"; (* XXX hg & mercurial ? *)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are so little used nowadays that we shouldn't bother with them by default

@rjbou rjbou removed this from the 2.2.0~alpha milestone Jun 16, 2023
@rjbou rjbou moved this from PR to review for 2.2.0~alpha to After ~alpha; before release in Opam 2.2.0 Jun 16, 2023
@rjbou rjbou moved this from After ~alpha; before release to PR to update for alpha2 in Opam 2.2.0 Jul 3, 2023
@rjbou rjbou moved this from PR to update for alpha2 to PR to review for alpha2 in Opam 2.2.0 Jul 17, 2023
@rjbou rjbou removed the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Jul 17, 2023
Comment on lines 306 to 329
let cygwin_internal =
mk_vflag ~cli `none [
cli_from cli2_2, `internal, ["cygwin-internal-install"],
"Let opam setup and manage an internal Cygwin install";
cli_from cli2_2, `default_location, ["cygwin-local-install"],
"Use preexistent Cygwin install";
cli_from cli2_2, `no, ["no-cygwin-setup"],
"Don't setup Cygwin";
]
in
let cygwin_location =
mk_opt ~cli (cli_from cli2_2) ["cygwin-location"] "DIR"
"Specify Cygwin root location"
Arg.(some dirname) None
in
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other proposal: --cygwin [no|internal|default|<location>]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm I like the proposal (but it's ok as is)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional question: do we make sure that the cygwin option don't show up on other OSes ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now, we do

Copy link
Member

@kit-ty-kate kit-ty-kate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aside from the minor indentation change, lgtm (on a code standpoint only, i haven't tested on an actual windows machine)

@rjbou rjbou moved this from PR to review for alpha2 to PR finalised (merge with CI) in Opam 2.2.0 Jul 21, 2023
@rjbou rjbou added this to the 2.2.0~alpha2 milestone Jul 21, 2023
@rjbou rjbou merged commit e0a390d into ocaml:master Jul 21, 2023
37 checks passed
Opam 2.2.0 automation moved this from PR finalised (merge with CI) to Done Jul 21, 2023
@dra27 dra27 mentioned this pull request Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Opam 2.2.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants