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

build: Upgrade dune file. #903

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bench.esy.lock/index.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions bench/exe/dune
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
(executable
(name bench)
(public_name ReveryBench)
(libraries ReveryBench.lib Skia_Bench)
(package ReveryBench)
)
(modes byte exe)
(name bench)
(public_name ReveryBench)
(libraries ReveryBench.lib Skia_Bench)
(package ReveryBench))

(install
(section bin)
(package ReveryBench)
(files TestFont.ttf))
(section bin)
(package ReveryBench)
(files TestFont.ttf))
9 changes: 4 additions & 5 deletions bench/lib/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
(library
(name ReveryBench)
(public_name ReveryBench.lib)
(ocamlopt_flags -linkall)
(libraries Revery reperf.lib)
)
(name ReveryBench)
(public_name ReveryBench.lib)
(ocamlopt_flags -linkall)
(libraries Revery reperf.lib))
11 changes: 3 additions & 8 deletions bench/reason-skia/dune
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
(library
(name Skia_Bench)
(ocamlopt_flags -linkall)
(libraries
skia
skia.wrapped
skia.wrapped.bindings
reperf.lib
))
(name Skia_Bench)
(ocamlopt_flags -linkall)
(libraries skia skia.wrapped skia.wrapped.bindings reperf.lib))
2 changes: 1 addition & 1 deletion doc.esy.lock/index.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dune
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(dirs src test examples bench)
(dirs src test examples bench)
6 changes: 4 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
(lang dune 1.6)
(using fmt 1.0 (enabled_for reason))
(lang dune 2.0)

(formatting
(enabled_for reason dune))
2 changes: 1 addition & 1 deletion esy.lock/index.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(executables
(modes byte exe)
(names Examples)
(preprocess
(pps brisk-reconciler.ppx lwt_ppx))
Expand Down
34 changes: 17 additions & 17 deletions examples/font-manager-cli/dune
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
(executable
(name FontQuery)
(public_name FontQuery)
(libraries
font-manager
; NOTE:
; There is a known leak on Linux that causes us to not run it generally:
; It's caused by not calling FcFini(), but FcFini() crashes if we call it -
; seems like a libconfig bug.
;
; Direct leak of 256 byte(s) in 1 object(s) allocated from:
; #0 0x7f7f54a09602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
; #1 0x7f7f5474b0b9 (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1d0b9)

; Uncomment this line to run ASAN:
;
; reason-native-crash-utils.asan
(modes byte exe)
(name FontQuery)
(public_name FontQuery)
(libraries
font-manager
; NOTE:
; There is a known leak on Linux that causes us to not run it generally:
; It's caused by not calling FcFini(), but FcFini() crashes if we call it -
; seems like a libconfig bug.
;
; Direct leak of 256 byte(s) in 1 object(s) allocated from:
; #0 0x7f7f54a09602 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
; #1 0x7f7f5474b0b9 (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1d0b9)
; Uncomment this line to run ASAN:
;
; reason-native-crash-utils.asan
)
(package ReveryExamples))
(package ReveryExamples))
1 change: 1 addition & 0 deletions examples/harfbuzz-cli/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(executable
(modes byte exe)
(name HarfbuzzCli)
(package ReveryExamples)
(public_name HarfbuzzCli)
Expand Down
16 changes: 6 additions & 10 deletions examples/skia-cli/dune
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
(executables
(names SkiaCli)
(package ReveryExamples)
(public_names SkiaCli)
(modes native byte)
(libraries
skia
skia.wrapped.bindings
skia.wrapped
reason-native-crash-utils.asan
))
(names SkiaCli)
(package ReveryExamples)
(public_names SkiaCli)
(modes native byte)
(libraries skia skia.wrapped.bindings skia.wrapped
reason-native-crash-utils.asan))

(install
(section bin)
Expand Down
14 changes: 8 additions & 6 deletions examples/stubs/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
(library
(name ExampleStubs)
(c_names example_stubs)
(c_flags :standard -Wall -Wextra -Werror)
(js_of_ocaml (javascript_files example_stubs.js))
)
(library
(foreign_stubs
(language c)
(names example_stubs)
(flags :standard -Wall -Wextra -Werror))
(name ExampleStubs)
(js_of_ocaml
(javascript_files example_stubs.js)))
2 changes: 1 addition & 1 deletion js.esy.lock/index.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@esy-ocaml/reason": "^3.6.0",
"@opam/bos": "0.2.0",
"@opam/ctypes": "0.15.1",
"@opam/dune": ">=1.6.0",
"@opam/dune": ">=2.0.0",
"@opam/dune-configurator": "*",
"@opam/lru": "bryphe/lru:lru.opam#2708c70",
"@opam/lwt": "^4.0.0",
Expand Down
10 changes: 6 additions & 4 deletions src/Core/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
(library
(name Revery_Core)
(public_name Revery.Core)
(preprocess (pps ppx_deriving.show))
(libraries threads console.lib str lwt sdl2 skia flex Rench re Revery_Native revery-text-wrap timber))
(name Revery_Core)
(public_name Revery.Core)
(preprocess
(pps ppx_deriving.show))
(libraries threads console.lib str lwt sdl2 skia flex Rench re Revery_Native
revery-text-wrap timber))
21 changes: 6 additions & 15 deletions src/Draw/dune
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
(library
(name Revery_Draw)
(public_name Revery.Draw)
(preprocess (pps lwt_ppx))
(libraries
skia
brisk-reconciler
lwt
lwt.unix
sdl2
flex
rebez.lib
Revery_Core
Revery_Font
Revery_Math
))
(name Revery_Draw)
(public_name Revery.Draw)
(preprocess
(pps lwt_ppx))
(libraries skia brisk-reconciler lwt lwt.unix sdl2 flex rebez.lib
Revery_Core Revery_Font Revery_Math))
21 changes: 6 additions & 15 deletions src/Font/dune
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
(library
(name Revery_Font)
(public_name Revery.Font)
(preprocess (pps lwt_ppx))
(libraries
harfbuzz
font-manager
lru
lwt
lwt.unix
sdl2
flex
rebez.lib
Revery_Core
Revery_Math
))
(name Revery_Font)
(public_name Revery.Font)
(preprocess
(pps lwt_ppx))
(libraries harfbuzz font-manager lru lwt lwt.unix sdl2 flex rebez.lib
Revery_Core Revery_Math))
9 changes: 5 additions & 4 deletions src/IO/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(library
(name Revery_IO)
(public_name Revery.IO)
(preprocess (pps lwt_ppx))
(libraries bos lwt lwt.unix Revery_Core uri fetch-native-lwt))
(name Revery_IO)
(public_name Revery.IO)
(preprocess
(pps lwt_ppx))
(libraries bos lwt lwt.unix Revery_Core uri fetch-native-lwt))
6 changes: 3 additions & 3 deletions src/Lwt/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(library
(name Revery_Lwt)
(public_name Revery.lwt)
(libraries Revery))
(name Revery_Lwt)
(public_name Revery.lwt)
(libraries Revery))
6 changes: 3 additions & 3 deletions src/Math/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(library
(name Revery_Math)
(public_name Revery.Math)
(libraries skia))
(name Revery_Math)
(public_name Revery.Math)
(libraries skia))
5 changes: 3 additions & 2 deletions src/Native/config/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(executable
(name discover)
(libraries dune.configurator))
(modes byte exe)
(name discover)
(libraries dune.configurator))
48 changes: 28 additions & 20 deletions src/Native/dune
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
(library
(name Revery_Native)
(public_name Revery.Native)
(preprocess (pps lwt_ppx))
(library_flags (:include flags.sexp))
(js_of_ocaml (javascript_files dialog.js))
(c_names
Revery_Native
dialog dialog_cocoa dialog_win32 dialog_gtk
notification notification_cocoa
icon icon_cocoa icon_win32
shell shell_cocoa shell_gtk shell_win32
utilities
ReveryAppDelegate ReveryAppDelegate_func
ReveryProgressBar)
(c_flags :standard -Wall -Wextra -Werror (:include c_flags.sexp))
(c_library_flags (:include c_library_flags.sexp))
(libraries sdl2))
(foreign_stubs
(language c)
(names Revery_Native dialog dialog_cocoa dialog_win32 dialog_gtk
notification notification_cocoa icon icon_cocoa icon_win32 shell
shell_cocoa shell_gtk shell_win32 utilities ReveryAppDelegate
ReveryAppDelegate_func ReveryProgressBar)
(flags
:standard
-Wall
-Wextra
-Werror
(:include c_flags.sexp)))
(name Revery_Native)
(public_name Revery.Native)
(preprocess
(pps lwt_ppx))
(library_flags
(:include flags.sexp))
(js_of_ocaml
(javascript_files dialog.js))
(c_library_flags
(:include c_library_flags.sexp))
(libraries sdl2))

(copy_files cocoa/*)

(rule
(targets flags.sexp c_flags.sexp c_library_flags.sexp)
(deps (:discover config/discover.exe))
(action (run %{discover})))
(targets flags.sexp c_flags.sexp c_library_flags.sexp)
(deps
(:discover config/discover.exe))
(action
(run %{discover})))
10 changes: 6 additions & 4 deletions src/UI/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
(library
(name Revery_UI)
(public_name Revery.UI)
(preprocess (pps lwt_ppx ppx_deriving.show))
(libraries brisk-reconciler lwt lwt.unix sdl2 skia flex rebez.lib Revery_Core Revery_Draw Revery_Math))
(name Revery_UI)
(public_name Revery.UI)
(preprocess
(pps lwt_ppx ppx_deriving.show))
(libraries brisk-reconciler lwt lwt.unix sdl2 skia flex rebez.lib
Revery_Core Revery_Draw Revery_Math))
9 changes: 5 additions & 4 deletions src/UI_Hooks/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(library
(name Revery_UI_Hooks)
(public_name Revery.UI_Hooks)
(preprocess (pps brisk-reconciler.ppx lwt_ppx))
(libraries lwt lwt.unix sdl2 flex Revery_Core Revery_Math Revery_UI))
(name Revery_UI_Hooks)
(public_name Revery.UI_Hooks)
(preprocess
(pps brisk-reconciler.ppx lwt_ppx))
(libraries lwt lwt.unix sdl2 flex Revery_Core Revery_Math Revery_UI))
10 changes: 6 additions & 4 deletions src/UI_Primitives/dune
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
(library
(name Revery_UI_Primitives)
(public_name Revery.UI_Primitives)
(preprocess (pps brisk-reconciler.ppx))
(libraries lwt lwt.unix sdl2 flex Revery_Core Revery_Math Revery_UI Revery_IO))
(name Revery_UI_Primitives)
(public_name Revery.UI_Primitives)
(preprocess
(pps brisk-reconciler.ppx))
(libraries lwt lwt.unix sdl2 flex Revery_Core Revery_Math Revery_UI
Revery_IO))
11 changes: 6 additions & 5 deletions src/Utility/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(library
(name Revery_Utility)
(public_name Revery.Utility)
(c_flags :standard -Wall -Wextra -Werror)
(preprocess (pps ppx_deriving.show))
(libraries threads console.lib str lwt sdl2 skia flex Rench re Revery_Core Revery_UI revery-text-wrap timber))
(name Revery_Utility)
(public_name Revery.Utility)
(preprocess
(pps ppx_deriving.show))
(libraries threads console.lib str lwt sdl2 skia flex Rench re Revery_Core
Revery_UI revery-text-wrap timber))
16 changes: 10 additions & 6 deletions src/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
(library
(name Revery)
(preprocess (pps brisk-reconciler.ppx lwt_ppx))
(public_name Revery)
(libraries console.lib lwt lwt.unix sdl2 Revery_Core Revery_Font Revery_Draw Revery_Math Revery_UI Revery_UI_Components Revery_Native Revery_UI_Primitives Revery_UI_Hooks Revery_Utility))
(name Revery)
(preprocess
(pps brisk-reconciler.ppx lwt_ppx))
(public_name Revery)
(libraries console.lib lwt lwt.unix sdl2 Revery_Core Revery_Font Revery_Draw
Revery_Math Revery_UI Revery_UI_Components Revery_Native
Revery_UI_Primitives Revery_UI_Hooks Revery_Utility))

(documentation
(package Revery)
(mld_files index))
(package Revery)
(mld_files index))
1 change: 1 addition & 0 deletions src/reason-font-manager/config/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(executable
(modes byte exe)
(name discover)
(libraries dune-configurator))
Loading