Skip to content
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

Bump to Ocaml 4.08 #1000

Merged
merged 21 commits into from
Jan 9, 2020
Merged

Bump to Ocaml 4.08 #1000

merged 21 commits into from
Jan 9, 2020

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented Dec 10, 2019

No description provided.

@nomeata
Copy link
Collaborator Author

nomeata commented Dec 11, 2019

Looks like ocaml 4.08 in nixpkgs isn’t quite there yet, e.g. the version of https://opam.ocaml.org/packages/base/ is too told to build with 4.08

@nomeata
Copy link
Collaborator Author

nomeata commented Dec 11, 2019

Also see NixOS/nixpkgs#75485. But I guess it is not urgent to update to 4.08? 4.07 is already a good step?

we still use the multi-value AST internally. Bumping the wasm dependency
needs to happen separately.
nomeata added a commit that referenced this pull request Dec 16, 2019
this prepares for #1000

This rips out multi-value support in our serializer/parser.
@nomeata
Copy link
Collaborator Author

nomeata commented Dec 16, 2019

Once #1032 is in this is good to go

mergify bot pushed a commit that referenced this pull request Dec 16, 2019
* Bump wasm dependency to v1.1

this prepares for #1000

This rips out multi-value support in our serializer/parser.

* Special stack_type encoding/decoding

* Bumping wasm changed the FloatLit printing

I hope that is ok.

* Update nix/ocaml-wasm.nix

Co-Authored-By: Gabor Greif <ggreif@gmail.com>
@nomeata
Copy link
Collaborator Author

nomeata commented Dec 17, 2019

Ok, we can have Ocaml 4.08. Do we want that? It would certainly make building Motoko easier once we open source, since we can use the opam version of wasm?

@kritzcreek
Copy link
Contributor

Once this is merged we can also go through our Lib and delete some of the stuff that is now in Stdlib. I think that would be a good thing before open sourcing (being up-to-date).

@nomeata nomeata marked this pull request as ready for review December 17, 2019 14:13
@nomeata
Copy link
Collaborator Author

nomeata commented Jan 7, 2020

I kinda dropped the ball here. Should we do this? Was there anything preventing this?

@ggreif
Copy link
Contributor

ggreif commented Jan 7, 2020

Two questions:

  • will anybody be left behind/stuck when we do this?
  • what are the benefits?

@rossberg since you are the not nix user under us, would it hurt you if the rest of the team would start coding in OCaml 4.08?

@nomeata nomeata mentioned this pull request Jan 7, 2020
@ggreif
Copy link
Contributor

ggreif commented Jan 8, 2020

@nomeata @rossberg Now that this is basically a one-liner, I guess we can fearlessly merge it. When we start using the 4.08 (or later) features, it will become obvious soon enough whether it is incompatible with individual dev-envs.

@nomeata
Copy link
Collaborator Author

nomeata commented Jan 8, 2020

I’ll wait for a green light or veto from Andreas (or merge it if none comes in a day or two :-))

Copy link
Contributor

@ggreif ggreif left a comment

Choose a reason for hiding this comment

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

LGTM!

@ggreif
Copy link
Contributor

ggreif commented Jan 9, 2020

Just for the record, I did the obvious change to bump to 4.09.0 in my local environment. Here is the first resulting error that I got:

Build error with OCaml 4.09.0
[nix-shell:~/motoko]$ nix build
builder for '/nix/store/43drqcnc4fm0s0mqvd87cg3r6fg1phc1-js_of_ocaml-3.4.0.drv' failed with exit code 1; last 10 log lines:
  clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
        ocamlc ppx/ppx_js/lib_internal/.ppx_js_internal.objs/byte/ppx_js_internal__Compat.{cmi,cmo,cmt} (exit 2)
  (cd _build/default && /nix/store/hgfd5hkrrkyvzll52fq7xgf0f97zh4i8-ocaml-4.09.0/bin/ocamlc.opt -w -40 -g -bin-annot -I ppx/ppx_js/lib_internal/.ppx_js_internal.objs/byte -I /nix/store/1zjxvgb3p06ncrih6kfvrgw7bih9bj30-ocaml4.09.0-ppx_derivers-1.2.1/lib/ocaml/4.09.0/site-lib/ppx_derivers -I /nix/store/8zgj217wkb9pnir594qabrgam0dir9ys-ocaml4.09.0-result-1.2/lib/ocaml/4.09.0/site-lib/result -I /nix/store/9f7nc6iblf3f6zdri8d183cy1xacy2ii-ocaml4.09.0-ocaml-migrate-parsetree-1.4.0/lib/ocaml/4.09.0/site-lib/ocaml-migrate-parsetree -I /nix/store/hgfd5hkrrkyvzll52fq7xgf0f97zh4i8-ocaml-4.09.0/lib/ocaml/compiler-libs -I /nix/store/pvpmy0wl4b1px165qy0gbrhg0syhnh4z-ocaml4.09.0-ppx_tools_versioned-5.2.3/lib/ocaml/4.09.0/site-lib/ppx_tools_versioned -no-alias-deps -open Ppx_js_internal__ -o ppx/ppx_js/lib_internal/.ppx_js_internal.objs/byte/ppx_js_internal__Compat.cmo -c -impl ppx/ppx_js/lib_internal/compat.pp.ml)
  File "ppx/ppx_js/lib_internal/compat.ml", line 11, characters 31-34:
  11 |   let rec extension_of_error ({loc; msg; if_highlight; sub} : Location.error) =
                                      ^^^
  Error: This record pattern is expected to have type
           Migrate_parsetree.OCaml_406.Ast.Location.error
         The field loc does not belong to type Migrate_parsetree.OCaml_406.Ast.Location.report
cannot build derivation '/nix/store/yph7p2jbaxlsfp2l5wa49l4nb78ndp8b-moc.js.drv': 1 dependencies couldn't be built
[0 built (1 failed), 0.0 MiB DL]
error: build of '/nix/store/4hq36z1kjlxkm8vdczvpsapxvadjha89-produce-exchange.drv', '/nix/store/5ipd5fa45liz0c62yhlwn19c7qdd2587-didc-mkstandalone.drv', '/nix/store/61l45lpgwpcxljf5jpg7y5h4h68i2q3p-deser-mkstandalone.drv', '/nix/store/8hcqdgfwnns5kvs5yi49yr3m8glcc6sr-all-systems-go.drv', '/nix/store/a0w34vag1ww0a0f4158razys608rc0zb-moc.drv', '/nix/store/bx3brw1liznzk4w9cx05822r5w1qq01m-mo-ide-mkstandalone.drv', '/nix/store/ggnz6dpd9rxg31ilfdpxddn3x2sv80zr-mo-ld-mkstandalone.drv', '/nix/store/grkhnbd9b74pd6j082rfzcgwcir2fylm-stdlib.drv', '/nix/store/gwx1m4lzz7212kf2wdfc2r9kacl43zmr-moc-mkstandalone.drv', '/nix/store/s4g4vskxl7gxx3qrqq52a09mx129gjkf-samples.drv', '/nix/store/xv76ljrvdz9i5vzah0q8zkbn257a4s60-nix-shell.drv', '/nix/store/yph7p2jbaxlsfp2l5wa49l4nb78ndp8b-moc.js.drv' failed
Now we have some time to contemplate about how to fix this, before we venture into another bump.

@rossberg
Copy link
Contributor

rossberg commented Jan 9, 2020

LGTM

@nomeata nomeata merged commit 0665f8b into master Jan 9, 2020
@nomeata nomeata deleted the joachim/ocaml-4.08 branch January 9, 2020 09:34
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.

4 participants