darklang / tablecloth

A standard library with the same API in F#, Rescript and OCaml

Home Page:https://www.tablecloth.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for OCaml 4.11

pbiggar opened this issue · comments

See #182. Note the problem here seems to be that the standard OCaml docker container does not support 4.11 yet: https://github.com/ocaml/infrastructure/wiki/Containers

OCaml docker now supports 4.11 and 4.12. What changes need to be made to make this project work with OCaml 4.11?

I believe you just need to add it to the list here, and then see what comes up.

- native-build-and-test:

Hmmm... so these are the changes I made:

Unstaged changes after reset:
M	.circleci/config.yml
M	tablecloth-native.opam
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 8d51101..e36cff7 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -162,11 +162,10 @@ workflows:
                  - "v0.12.2"
                  - "v0.13.2"
                  #- "v0.14.0"
-      # Base 12 does not support OCaml 4.10
       - native-build-and-test:
           matrix:
             parameters:
-              ocaml-version: ["4.10"]
+              ocaml-version: ["4.11"]
               base-version: ["v0.13.2"]
       - source-code-formatting
       - documentation-generator-build
diff --git a/tablecloth-native.opam b/tablecloth-native.opam
index 3c0a1d2..1c60d2f 100644
--- a/tablecloth-native.opam
+++ b/tablecloth-native.opam
@@ -14,5 +14,5 @@ license: "MIT with some exceptions"
 homepage: "https://github.com/darklang/tablecloth"
 bug-reports: "https://github.com/darklang/tablecloth/issues"
 dev-repo: "git://github.com/darklang/tablecloth"
-depends: [ "ocaml" {>= "4.08" & < "4.11" } "dune" {build} "base" { >= "v0.12.0" & < "v0.14.0" } ]
+depends: [ "ocaml" {>= "4.08" } "dune" {build} "base" { >= "v0.12.0" & < "v0.14.0" } ]
 build: ["dune" "build" "-p" name "-j" jobs]

But tablecloth still won't install on an Ocaml 4.11 switch:

❯ opam install .
[NOTE] Ignoring uncommitted changes in /Users/ethanbrooks/tablecloth (`--working-dir' not active).
[tablecloth-native.0.0.7] no changes from git+file:///Users/ethanbrooks/tablecloth#master
The following dependencies couldn't be met:
  - tablecloth-native → ocaml < 4.11
      base of this switch (use `--unlock-base' to force)

No solution found, exiting

I am a little new to opam so thank you for walking me through this.

Hmm, I actually don't know what's going on here. It feels like something stale is happening maybe?

Are you thinking there is some kind of cache that we need to delete?

Yeah. I can't imagine any other reason it would think it needed < 4.11 once it's been removed from the opam file.

Do you think this is an issue for opam?

Hmmm, I'd try again with a clean switch first.

Looks like that was the issue. Opam had retained the previous attempt to install tablecloth, before removing the upper bound.

Now supported