microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.52k stars 4.42k forks source link

[Update Request]: OCaml.opam including Git.Git in PackageDependencies #170902

Open dra27 opened 2 weeks ago

dra27 commented 2 weeks ago

What type of update are you requesting?

A change to the package metadata

Current Package Identifier

OCaml.opam

Package Version

2.2.1

Please describe the changes you would like to see

The OCaml.opam package installs OCaml's package manager, opam.

The first command which must be run to use opam is opam init which will strongly recommend that the user installs Git for Windows and recommends winget install Git.Git as a way to do this. It will recommend this even if an alternate Git implementation (such as Cygwin's) is found and the official advice on the OCaml website recommends install the Git.Git winget package (cf. update in ocaml/ocaml.org#2658).

Would it be acceptable for Git.Git to be added to the experimental PackageDependencies field, so that winget install OCaml.opam automatically installs Git-for-Windows, rather than continuing to guide users to have to enter winget install Git.Git OCaml.opam?

mdanish-kh commented 2 weeks ago

If that's the official advice for the best possible experience for a user installing the app, then i am inclined to say yes.

I'm a little worried about the semantics because PackageDependencies say to me - "these are the set of packages that must be present prior to package installation, otherwise the package installation will fail or package won't function correctly". This case sounds more - "it would be really helpful to have this package, but it isn't mandatory for installation or using the package". It would help if we could understand more the relation of the package with Git.Git, is a major feature not going to be available if they don't have Git? @denelon What would be your thoughts?

An alternate could be to use InstallationNotes in the manifest for guiding users for next steps post-installation. I see we already have it in the latest opam manifest, we could add a line "The publisher strongly recommends that you install Git-for-Windows. If you don't have it installed, use 'winget install Git.Git'"

experimental PackageDependencies field

Side note: They aren't experimental anymore, must be a case of outdated docs somewhere. Could you point to where you read about it? :D

dra27 commented 2 weeks ago

I agree that PackageDependencies isn't the ideal fit - Debian, for example, put it in Recommends (cf. https://packages.debian.org/trixie/opam).

opam init will proceed without forcing the installation of Git for Windows, although it will subsequently install either Cygwin or MSYS2's build of Git (which may then cause subsequent problems, e.g. for users accessing Git remotes using domain certs, etc. as that build of Git uses openssl rather than schannel).

It's definitely not "the package won't function correctly without Git.Git" but more "some users may encounter issues they wouldn't otherwise have done had they installed Git.Git". Expert users are able to configure opam to use whichever git binary they wish (and, indeed, expert users can probably use the PowerShell installation script from opam's GitHub repo too!)

experimental PackageDependencies field

Side note: They aren't experimental anymore, must be a case of outdated docs somewhere. Could you point to where you read about it? :D

https://github.com/microsoft/winget-pkgs/blob/ae58eab695b0ed6b6694885e19955b05c056bf90/doc/manifest/schema/1.7.0/singleton.md?plain=1#L75-L79