Skip to content

Commit

Permalink
Merge pull request #1035 from shonfeder/1034/dune-2
Browse files Browse the repository at this point in the history
Update to dune 2
  • Loading branch information
raphael-proust authored Oct 29, 2024
2 parents 53916cf + 341b721 commit 8f45a63
Show file tree
Hide file tree
Showing 67 changed files with 189 additions and 562 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:

- run: opam install lwt_react lwt --deps-only --with-test

- run: opam install lwt_ppx lwt_ppx_let --deps-only --with-test
- run: opam install lwt_ppx --deps-only --with-test
if: ${{ matrix.ppx == true }}

- run: opam exec -- dune build --only-packages lwt_react,lwt
Expand All @@ -104,9 +104,6 @@ jobs:
- run: opam exec -- dune runtest --only-packages lwt_ppx
if: ${{ matrix.ppx == true }}

- run: opam exec -- make ppx_let-test
if: ${{ matrix.ppx == true }}

lint-opam:
runs-on: ubuntu-latest

Expand Down
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,3 @@ lib/

# Wikidoc output.
/docs/api/

# Junk from packaging tests.
*.cm*
*.o
a.out
30 changes: 0 additions & 30 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,6 @@ doc-api-html: build
doc-api-wiki: build
$(MAKE) -C docs api/wiki/index.wiki

# Packaging tests. These are run with Lwt installed by OPAM, typically during
# CI. To run locally, run the install-for-packaging-test target first.
.PHONY: packaging-test
packaging-test:
ocamlfind query lwt
for TEST in `ls -d test/packaging/*/*` ; \
do \
$(MAKE) -wC $$TEST || exit 1 ; \
echo ; \
echo ; \
done

.PHONY: install-for-packaging-test
install-for-packaging-test: clean
opam pin add --yes --no-action lwt .
opam pin add --yes --no-action lwt_ppx .
opam pin add --yes --no-action lwt_react .
opam reinstall --yes lwt lwt_ppx lwt_react

.PHONY: uninstall-after-packaging-test
uninstall-after-packaging-test:
opam remove --yes lwt lwt_ppx lwt_react
opam pin remove --yes lwt
opam pin remove --yes lwt_ppx
opam pin remove --yes lwt_react

# ppx_let integration test.
.PHONY : ppx_let-test
ppx_let-test :
Expand All @@ -81,10 +55,6 @@ clean :
dune clean
rm -fr docs/api
rm -f src/unix/discover_arguments
for TEST in `ls -d test/packaging/*/*` ; \
do \
$(MAKE) -wC $$TEST clean ; \
done
rm -rf _coverage/

EXPECTED_FILES := \
Expand Down
12 changes: 2 additions & 10 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 1.12)
(lang dune 2.0)

(name lwt)

Expand All @@ -12,21 +12,13 @@
(source (github ocsigen/lwt))
(documentation "https://ocsigen.org/lwt")

(package
(name lwt_ppx_let)
(synopsis "Dummy package context for ppx_let tests")
(description "Internal package used to partition ppx_let tests.")
(depends
(ocaml (>= 4.08))
(ppx_let :with-test)
lwt))

(package
(name lwt_ppx)
(synopsis "PPX syntax for Lwt, providing something similar to async/await from JavaScript")
(depends
(ocaml (>= 4.08))
(ppxlib (>= 0.16.0))
(ppx_let :with-test)
lwt))

(package
Expand Down
3 changes: 1 addition & 2 deletions lwt.opam
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ homepage: "https://github.com/ocsigen/lwt"
doc: "https://ocsigen.org/lwt"
bug-reports: "https://github.com/ocsigen/lwt/issues"
depends: [
"dune" {>= "1.12"}
"dune" {>= "2.0"}
"ocaml" {>= "4.08"}
"cppo" {build & >= "1.1.0"}
"ocamlfind" {dev & >= "1.7.3-1"}
Expand Down Expand Up @@ -54,4 +54,3 @@ build: [
"@doc" {with-doc}
]
]
available: os-family != "windows" | "ocaml-version" < "5.2"
5 changes: 3 additions & 2 deletions lwt_ppx.opam
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ homepage: "https://github.com/ocsigen/lwt"
doc: "https://ocsigen.org/lwt"
bug-reports: "https://github.com/ocsigen/lwt/issues"
depends: [
"dune" {>= "1.12"}
"dune" {>= "2.0"}
"ocaml" {>= "4.08"}
"ppxlib" {>= "0.16.0"}
"ppx_let" {with-test}
"lwt"
]
dev-repo: "git+https://github.com/ocsigen/lwt.git"
build: [
["dune" "subst"] {dev}
[
Expand All @@ -30,4 +32,3 @@ build: [
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/lwt.git"
14 changes: 14 additions & 0 deletions lwt_ppx.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
33 changes: 0 additions & 33 deletions lwt_ppx_let.opam

This file was deleted.

4 changes: 2 additions & 2 deletions lwt_react.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ homepage: "https://github.com/ocsigen/lwt"
doc: "https://ocsigen.org/lwt"
bug-reports: "https://github.com/ocsigen/lwt/issues"
depends: [
"dune" {>= "1.12"}
"dune" {>= "2.0"}
"ocaml" {>= "4.08"}
"cppo" {build & >= "1.1.0"}
"lwt" {>= "3.0.0"}
"react" {>= "1.0.0"}
]
dev-repo: "git+https://github.com/ocsigen/lwt.git"
build: [
["dune" "subst"] {dev}
[
Expand All @@ -30,4 +31,3 @@ build: [
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/ocsigen/lwt.git"
14 changes: 14 additions & 0 deletions lwt_react.opam.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
Loading

0 comments on commit 8f45a63

Please sign in to comment.