-
Notifications
You must be signed in to change notification settings - Fork 323
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
Update ocaml on Windows: add opam 2.2 #2727
base: main
Are you sure you want to change the base?
Conversation
Beautiful! Thank you very much, @RadioPotin and @rjbou, this is awesome. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful, this reads very nicely! Huge +1 from my side. Some minor comments below.
One detail to address about having a fully functional opam installation is | ||
related to Git. | ||
|
||
On Windows, there are many ways to have a functioning Git installation. Opam will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it recommended to obtain git via winget
, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is indeed. This sentence purpose is to introduce the Git opam init section.
@@ -92,6 +286,8 @@ easier way to get a working Windows environment on your machine. | |||
|
|||
### Visual Studio Code on Windows | |||
|
|||
**If you use opam installation**, you will need to add opam switch prefix on your path that runs VSCode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps there could be a link here on how to add switch prefix to the path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that needed at all? If it is needed, we should file a bug somewhere since that is quite unpleasant for a user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll ping @dra27 on this one
installer that we recommend for new users. However, while [DkML] has a modern OCaml 4.14.0 compiler, | ||
## opam | ||
|
||
Opam now features a fully native Windows compatible installation process that we |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the sentiment, but it isn't accurate to describe a Cygwin installation process as a fully native Windows compatible installation process. IMHO the real win is how easy it is to install Windows with opam 2.2 ... very few questions asked, no prereqs other than Git, etc. ... and the ease of install could be a good lead sentence.
fully functional OCaml compiler available to you: | ||
|
||
```shell-session | ||
> for /f "tokens=*" %i in ('opam env --switch=default') do @%i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I'm wrong, but if you install winget in a terminal, and then install opam using winget, any subsequent opam like opam env
will fail with Not Found, right? Because opam won't be in the PATH. If so, I think we need to insert a step to close and reopen the terminal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, this is specified at the beginning:
Once the package is installed, you can launch a new shell to have access to
your fresh opam binary.
Here, it is have access to OCaml after opam init, so we already have a terminal that have an opam binary in the path.
supporting an external dependency installation for Windows and integrating it with the | ||
Windows shell. From an `opam-repository` perspective, the `ocaml-base-compiler` | ||
packages will support the MinGW-w64 and MSVC variants. | ||
|
||
## Installation Environments | ||
|
||
### `opam-repository-mingw` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this section entirely since it is deprecated and opam-repository is now compatible with Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks all for the reviews! I've addressed some in comments.
One detail to address about having a fully functional opam installation is | ||
related to Git. | ||
|
||
On Windows, there are many ways to have a functioning Git installation. Opam will |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is indeed. This sentence purpose is to introduce the Git opam init section.
fully functional OCaml compiler available to you: | ||
|
||
```shell-session | ||
> for /f "tokens=*" %i in ('opam env --switch=default') do @%i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, this is specified at the beginning:
Once the package is installed, you can launch a new shell to have access to
your fresh opam binary.
Here, it is have access to OCaml after opam init, so we already have a terminal that have an opam binary in the path.
Hey again everybody, Thank you ever so much for the constructive suggestions, hopefully this version is now mergeable, Kind regards, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of details still make reference to a future release of opam 2.2.
Installation of git at the same time as opam should be suggested.
it does not track the latest OCaml compilers. We will officially support Windows as a Tier 1 | ||
platform with a [major release of opam](#opam-22) in the coming months, and it will be compatible with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We
will
officially support Windows as a Tier 1 platform with a [major release of opam]
(#opam-22) in the coming months,
Already happened, hence this PR. This link will be broken.
@@ -38,21 +239,12 @@ The guidance is based on the availability table below: | |||
╰──────────────────────────────────────────────────────────────────────────────────────────╯ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
│ Tier 1 │ OCaml 5 with Opam 2.2 │ Full support.
Coming in the next few months
│
Already happened.
Cygwin Git is functional but can have credentials issues for private repositories, we recommend using: | ||
- Install via 'winget install Git.Git' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be good to know from the outset. https://ocaml.org/install#windows recommends doing
winget install Git.Git OCaml.opam
Co-authored-by: Raja Boujbel <[email protected]>
Co-authored-by: R. Boujbel <[email protected]>
Co-authored-by: R. Boujbel <[email protected]>
Co-authored-by: R. Boujbel <[email protected]>
Co-authored-by: Jonah Beckford <[email protected]>
- Change wording of the introduction - Recommend using winget install Git.Git OCaml.opam - Shorten instructions when they can be made more concise
I've pushed a few changes:
I think this is ready to go, but I'll wait for a thumbs up from @RadioPotin @rjbou if the changes above look good to you, and give a couple days for a last round of review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks all for these inputs!
I'm not sure for the removal of shell output: as pointed out Jonah, it helps users to know should happen, but if the rest of the website is without shell output, it's better to remove indeed.
Remain tiny comments and we should be good to go.
@@ -92,6 +286,8 @@ easier way to get a working Windows environment on your machine. | |||
|
|||
### Visual Studio Code on Windows | |||
|
|||
**If you use opam installation**, you will need to add opam switch prefix on your path that runs VSCode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll ping @dra27 on this one
Co-authored-by: R. Boujbel <[email protected]>
Co-authored-by: R. Boujbel <[email protected]>
Thanks @rjbou! All suggestions applied. We can bring back the shell output if others think this contributes to the clarity of the document, but indeed, we don't do that in the rest of the documentation. |
Greetings,
@rjbou and myself have updated OCaml on Windows tutorial to add opam workflows as the recommended one for installing OCaml on Windows.
Best regards,