frenetic-lang / frenetic

The Frenetic Programming Language and Runtime System
http://www.frenetic-lang.org/
Other
223 stars 51 forks source link

Upgrade To Core et al. 113.33, Use PPX'es Where Possible #482

Closed craig-riecke closed 8 years ago

craig-riecke commented 8 years ago

New builds are failing because Jane Street removed camlp4 extensions from OPAM. Convert over to new PPX syntax for the following:

The NetKAT parser and NetKAT camlp4 extension still use the camlp4 processor, but they compile, test, and run fine.

craig-riecke commented 8 years ago

Small bonus: we can now ditch OUnitHack. Small setback: integrating Jane Street PPX for defining inline unit tests requires hacking _tags file, as seen here: https://github.com/janestreet/ppx_inline_test/issues/3

smolkaj commented 8 years ago

cool!

smolkaj commented 8 years ago

Once this is merged in we can use deriving magic to simplify a lot of code :)

craig-riecke commented 8 years ago

After I release this, merging master into your branch will mostly likely break it. In particular, you can't run the new code under older versions of Jane Street core or Ocaml < 4.02.3. So to update all the relevant stuff on your frenetic-vm:

$ sudo apt-get update
# The following should install latest Ocaml as the system compiler
$ sudo apt-get upgrade
# It's assumed you have merged Master at this point and resolved all conflicts.
# The following will update all the relevant OPAM packages.
$ opam update
$ opam upgrade core.113.33.00
$ make distclean
# You will get a bunch of warnings about "topdirs.cmi" here.  You can ignore them.
$ make

If the opam upgrade core.113.33.00 fails to compile - in particular if ppx_deriving doesn't install properly - I've found that running opam upgrade followed by opam install -y frenetic seems to clear it up.

If the "topdirs.cmi" stuff bugs you, you can sudo rm /usr/lib/ocaml/topdirs.cmi and things will run fine. At least they do on my VM.