Skip to content

Commit

Permalink
[build] Migrate to dune / ocaml-migrate-parsetree / OPAM 2.0
Browse files Browse the repository at this point in the history
Fixes ocaml-ppx#26. Changes:

- Build system migrated to Dune.
- Remove use of `cppo` in favor of ocaml-migrate-parsetree
- Introduce migration functions for elements of `Asttypes`
- Remove use of `topkg` in favor of `dune-release`
- Updated `.gitignore`
- Upgrade to OPAM 2.0
- Update Travis CI.

We had to raise dependencies on quite a few packages, thus ppx_import
now requires OCaml >= 4.04.2.

The question of whether we should use `ppx_tools_versioned` or
`ppxlib` does remain, but it can be addressed at a later point.
  • Loading branch information
ejgallego committed Nov 9, 2018
1 parent 5f36463 commit b6b05fe
Show file tree
Hide file tree
Showing 22 changed files with 261 additions and 634 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
*.native
*.byte
*.docdir
*~
_build
*.install
pkg/META
.merlin
1 change: 0 additions & 1 deletion .merlin

This file was deleted.

24 changes: 15 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
language: c
env:
- OCAML=4.02.3
- OCAML=4.03.0
global:
- OPAMYES="true"
- OPAMJOBS="2"
matrix:
- OCAML=4.04.2
- OCAML=4.05.0
- OCAML=4.06.0
- OCAML=4.06.1
- OCAML=4.07.0
script:
- echo "yes" | sudo add-apt-repository ppa:avsm/ppa
# The opam package in this repository seems not to be working.
# - echo "yes" | sudo add-apt-repository ppa:avsm/ppa-opam-experimental
# - sudo apt-get install -qq opam
- echo "yes" | sudo add-apt-repository ppa:ansible/bubblewrap
- sudo apt-get update -qq
- sudo apt-get install -qq opam
- export OPAMYES=1
- opam init
- eval `opam config env`
- opam switch $OCAML
- sudo apt-get install -qq bubblewrap
- sudo curl -sL https://github.com/ocaml/opam/releases/download/2.0.0/opam-2.0.0-x86_64-linux -o /usr/bin/opam
- sudo chmod 755 /usr/bin/opam
- opam init -c $OCAML
- opam switch set $OCAML
- eval $(opam env)
- opam pin add -n -k path ppx_import .
- opam install --deps-only -d -t ppx_import
- opam install -d -t -v ppx_import
8 changes: 8 additions & 0 deletions CHANGELOG.md → CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

1.6
---

* ocaml-migrate-parsetree + dune support #26
(Jérémie Dimino & Emilio Jesús Gallego Arias)

* Move to OPAM 2.0, adapt Travis CI.

1.5
---

Expand Down
File renamed without changes.
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
build:
cp pkg/META.in pkg/META
ocaml pkg/build.ml native=true native-dynlink=true
dune build

test: build
rm -rf _build/src_test
ocamlbuild -j 0 -use-ocamlfind -classic-display src_test/test_ppx_import.native --
test:
dune runtest

clean:
ocamlbuild -clean
dune clean

.PHONY: build test clean
.PHONY: build test clean release

VERSION := $$(opam query --version)
NAME_VERSION := $$(opam query --name-version)
Expand All @@ -21,5 +19,3 @@ release:
opam publish prepare $(NAME_VERSION) $(ARCHIVE)
opam publish submit $(NAME_VERSION)
rm -rf $(NAME_VERSION)

.PHONY: release
4 changes: 0 additions & 4 deletions _tags

This file was deleted.

2 changes: 2 additions & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
(lang dune 1.1)

5 changes: 5 additions & 0 deletions dune-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
(lang dune 1.1)

(env
(dev (flags :standard))
(release (flags :standard)))
9 changes: 0 additions & 9 deletions myocamlbuild.ml

This file was deleted.

30 changes: 0 additions & 30 deletions opam

This file was deleted.

3 changes: 0 additions & 3 deletions pkg/META.in

This file was deleted.

14 changes: 0 additions & 14 deletions pkg/build.ml

This file was deleted.

Loading

0 comments on commit b6b05fe

Please sign in to comment.