Skip to content

Update for Dune-Coq 0.8 and Coq 8.17#7

Open
palmskog wants to merge 3 commits into
v8.16from
v8.17+0.8
Open

Update for Dune-Coq 0.8 and Coq 8.17#7
palmskog wants to merge 3 commits into
v8.16from
v8.17+0.8

Conversation

@palmskog

Copy link
Copy Markdown
Member

Experiment with Dune-Coq 0.8 using docker-coq-action CI.

Comment thread src/dune
@ejgallego

Copy link
Copy Markdown
Collaborator

Thanks @palmskog , looks good to me !

@palmskog

Copy link
Copy Markdown
Member Author

@ejgallego I did some further changes to README.md, are they OK with you?

If things look reasonable, I propose we put this into a branch v8.17 and make that branch the default.

@ejgallego ejgallego left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, but maybe you'd like to update the template for Coq 8.17.1 + Dune 3.8.2 which can use the findlib-based method for plugin loading, which solves the longstanding issue of plugins with dependencies not working.

Comment thread coq-my-plugin.opam
"ocaml" {>= "4.07.1"}
"dune" {>= "2.5"}
"coq" {>= "8.14" & < "8.15"}
"ocaml" {>= "4.09.0"}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe better to use a more recent OCaml version? I suggest 4.14.1

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But 4.14.1 isn't required, right? I thought we keep this the lower bound.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No it is not. That's a good question about what versions we put here. In general it will depend on the OCaml features the plugin writer uses.

Note also that 8.17.0 is not either a lower bound here, as the template works fine with 8.16.x

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

As dicussed in Zulip, generally a template has a range of versions that it is suitable for, so we may want just to document the ranges users can do here.

  • In the case of Coq, for this version of the template >= 8.16 , tho it is trivial to adapt for 8.14, 8.15
  • In the case of OCaml, the bound is basically any OCaml in the 4.x series

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This PR doesn't work on Coq 8.16 since I removed -rectypes.

Comment thread coq-my-plugin.opam Outdated
Comment thread coq-my-plugin.opam Outdated
@palmskog palmskog marked this pull request as ready for review July 13, 2023 16:08
@palmskog

Copy link
Copy Markdown
Member Author

@ejgallego so can this become the v8.17 branch now, and we set it as default for the repo?

Comment thread .github/workflows/docker-action.yml Outdated
Comment thread CHANGES
0.0.1
-----

* Initial version (Emilio J. Gallego Arias)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A changelog may be useful for users, WDYT?

@palmskog palmskog Jul 13, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

But this repo is meant to be a template for people to fork, right? So I think it would be confusing for users if they have a long changelog that has nothing to do with their project.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good point, where to set the changelog and README then? We can store the changes in the README.

It is a good practice for dune-release to have a CHANGES.md file actually, so we could maybe just ship a template there.

Comment thread dune-project
@@ -1,3 +1,3 @@
(lang dune 2.9)
(using coq 0.3)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

While we are at it we can use (generate_opam_files) and (opam_file_location)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The problem with opam file generation is that it brings another level of indirection. I think it's easier if we just keep the opam files manual...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Leaving the opam files manual is OK but has quite a few downsides too, in particular newer dune offers nice stuff if you declare the packages on dune-package, like source download, on top of the user having now to learn both opam syntax and dune syntax.

On other other hand, I can't see see any problem in the workflow with automatic file generation, what problems do you foresee? I don't understand what kind of indirection you refer to.

In fact the only reason that opam files need to be committed to the repository is due to "pinning", which is not yet smart enough to generate them on the fly. If you don't care about pinning you don't need to commit the .opam files and you can just ignore them, as dune-release will take care of properly generating them for repos upload.

@ejgallego

Copy link
Copy Markdown
Collaborator

@ejgallego so can this become the v8.17 branch now, and we set it as default for the repo?

I think so!

We may need to add a known issues part, I'd also keep the changelog.

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.

2 participants