-
Notifications
You must be signed in to change notification settings - Fork 455
Add a doc entry for setting up an OxCaml project with dune pkg #12780
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
base: main
Are you sure you want to change the base?
Conversation
|
The main title doesn't need to say |
shonfeder
left a comment
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.
Glad to have this included!
65b4bc6 to
64d39ec
Compare
|
At some point these how-to's turned into markdown rather than being rst documents which is slightly confusing. In rst we have syntax highlighting for dune files etc. Does anybody remember why markdown was chosen for these? I would suggest writing this tutorial in rst, not only for consistency, but because it will play better with cross-linking that we have elsewhere in the docs. |
135bb8e to
9f8c4b7
Compare
I'm not opposed to doing this, but wouldn't be weird if only one of the dune-package-management entries is in rst, while others are in markdown? |
|
Ideally they should be all in rst, but would blow this PR out of scope. If you think it would be too much work to do in this PR, let's instead create an issue so that we remember to do it eventually. I won't block on this point. |
|
Ah, I dug a bit around and it is because of this PR by @emillon where he notes:
Which all sound like pretty decent points. |
| (version 3.1.0+ox))) | ||
| (lock_dir | ||
| (path "dune.lock") |
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 path is probably optional.
|
We also have a macros for the latest dune lang version which might be sensible to use. |
9f8c4b7 to
df5006f
Compare
| [OxCaml](https://oxcaml.org/) project. OxCaml is a compiler branch with fast | ||
| moving set of extensions to OCaml. Some tweaks are required to set up a project |
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.
| [OxCaml](https://oxcaml.org/) project. OxCaml is a compiler branch with fast | |
| moving set of extensions to OCaml. Some tweaks are required to set up a project | |
| [OxCaml](https://oxcaml.org/) project. OxCaml is a compiler branch with a fast | |
| moving set of extensions to OCaml. Some tweaks are required to set up a project |
| (lock_dir | ||
| (path "dune.lock") | ||
| (repositories :standard oxcaml)) |
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.
| (repositories :standard oxcaml)) | |
| (pins ocamlbuild) | |
| (repositories :standard oxcaml)) |
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.
Apparently the pins in a workspace are just declarations of names (unlike pin in a dune-project, which work differently for some reason?), and to get the pin to actually pin you have also declare it for every lock_dir
5e002b9 to
dd17e0c
Compare
|
Perhaps the solution for the oxcaml-side is just to undo (my suggestion of) using the lockless package management until that is fixed? We could create a TODO on the docs to simplify, and cross link from #12851, which would allow us to close this with correct information, and track the need to update it when the latter is fixed. Does this sound like an OK way forward, @Sudha247 ? |
|
That sounds good to me. I will undo the autolocking part, write a TODO in the docs to fix this, and note it down in #12851. |
Signed-off-by: Sudha Parimala <[email protected]>
Signed-off-by: Sudha Parimala <[email protected]>
Signed-off-by: Sudha Parimala <[email protected]>
Signed-off-by: Sudha Parimala <[email protected]>
Signed-off-by: Sudha Parimala <[email protected]>
Signed-off-by: Sudha Parimala <[email protected]>
dd17e0c to
68ef80e
Compare

Closes #11652
Adds a tutorial for setting up an OxCaml project with Dune package management.
I contemplated where this should go, and thought this might be a good place, after all. It shows (1) how to setup an OxCaml project, (2) servers as a live example of the previous two tutorials.
#12111 is a more comprehensive tutorial about parametric libraries and OxCaml, but it doesn't specifically cover the topic of Dune package management with OxCaml. I recently ported an OxCaml project to build with Dune package management and the configuration was not as straightforward as I expected, and thought a tutorial on this topic might be useful.
This takes some material from https://github.com/gridbugs/hello-oxcaml (thanks @gridbugs!).