Jbuilder: Move alpha/genesis/demo
in their own two OPAM packages
One package for the embedded version. One for the functorized one.
This commit is contained in:
parent
78d838059f
commit
9cb498eee6
4
jbuild
4
jbuild
@ -3,3 +3,7 @@
|
|||||||
(alias
|
(alias
|
||||||
((name runtest)
|
((name runtest)
|
||||||
(deps ((alias_rec runtest_indent)))))
|
(deps ((alias_rec runtest_indent)))))
|
||||||
|
|
||||||
|
(alias
|
||||||
|
((name runtest)
|
||||||
|
(deps ((alias_rec runtest_sandbox)))))
|
||||||
|
40
lib_embedded_protocol_alpha/jbuild
Normal file
40
lib_embedded_protocol_alpha/jbuild
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
(jbuild_version 1)
|
||||||
|
|
||||||
|
;; Build a functorized version of the protocol with the `tezos-protocol-compiler`
|
||||||
|
;; This is bit hackish...
|
||||||
|
;;
|
||||||
|
;; AFAIK the current version of jbuilder (1.0+beta16) does not allow to compile
|
||||||
|
;; with a custom `rule` the `(modules)` of a library.
|
||||||
|
;;
|
||||||
|
;; A trick is to provide the `.cmx` through the `(library_flags)` and to generate
|
||||||
|
;; a empty `.ml` to correctly handle the dependencies...
|
||||||
|
|
||||||
|
(rule
|
||||||
|
((targets (tezos_protocol_alpha.o
|
||||||
|
tezos_protocol_alpha.cmx
|
||||||
|
tezos_protocol_alpha.cmi
|
||||||
|
tezos_protocol_alpha_dummy.ml))
|
||||||
|
(deps ((glob_files src/*.ml)
|
||||||
|
(glob_files src/*.mli)
|
||||||
|
src/TEZOS_PROTOCOL))
|
||||||
|
(action (with-stdout-to ${path-no-dep:tezos_protocol_alpha_dummy.ml}
|
||||||
|
(chdir ${ROOT}
|
||||||
|
(run ${bin:tezos-protocol-compiler} -static ${path-no-dep:tezos_protocol_alpha} ${path-no-dep:src}))))))
|
||||||
|
|
||||||
|
(library
|
||||||
|
((name tezos_protocol_alpha)
|
||||||
|
(public_name tezos-protocol-alpha)
|
||||||
|
(library_flags (:standard -linkall
|
||||||
|
lib_embedded_protocol_alpha/tezos_protocol_alpha.cmx))
|
||||||
|
(wrapped false)
|
||||||
|
(modes (native))
|
||||||
|
(modules (Tezos_protocol_alpha_dummy))))
|
||||||
|
|
||||||
|
(alias
|
||||||
|
((name runtest_sandbox)
|
||||||
|
(deps (tezos_protocol_alpha.cmx))))
|
||||||
|
|
||||||
|
(alias
|
||||||
|
((name runtest_indent)
|
||||||
|
(deps ((glob_files src/*.ml) (glob_files src/*.mli)))
|
||||||
|
(action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<}))))
|
@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
open Tezos_context
|
open Tezos_context
|
||||||
|
|
||||||
|
let () = ()
|
||||||
|
|
||||||
let select_winning_proposal proposals =
|
let select_winning_proposal proposals =
|
||||||
let merge proposal vote winners =
|
let merge proposal vote winners =
|
||||||
match winners with
|
match winners with
|
@ -13,7 +13,7 @@
|
|||||||
"
|
"
|
||||||
let () =
|
let () =
|
||||||
let module Ignored = State.Register_embedded_protocol
|
let module Ignored = State.Register_embedded_protocol
|
||||||
(Tezos_protocol_environment_alpha.Environment)
|
(Tezos_embedded_protocol_environment_alpha.Environment)
|
||||||
(Tezos_embedded_raw_protocol_alpha.Main)
|
(Tezos_embedded_raw_protocol_alpha.Main)
|
||||||
(struct
|
(struct
|
||||||
let hash =
|
let hash =
|
||||||
@ -25,21 +25,21 @@ let () =
|
|||||||
} end) in ()"))))
|
} end) in ()"))))
|
||||||
|
|
||||||
(library
|
(library
|
||||||
((name tezos_protocol_environment_alpha)
|
((name tezos_embedded_protocol_environment_alpha)
|
||||||
(public_name tezos.protocol_environment.alpha)
|
(public_name tezos-embedded-protocol-alpha.environment)
|
||||||
(library_flags (:standard -linkall -w -9 -safe-string))
|
(library_flags (:standard -linkall))
|
||||||
(libraries (node_updater))
|
(libraries (tezos.node.updater))
|
||||||
(modules (Environment))))
|
(modules (Environment))))
|
||||||
|
|
||||||
(library
|
(library
|
||||||
((name tezos_embedded_raw_protocol_alpha)
|
((name tezos_embedded_raw_protocol_alpha)
|
||||||
(public_name tezos.embedded_raw_protocol.alpha)
|
(public_name tezos-embedded-protocol-alpha.raw)
|
||||||
(libraries (tezos_protocol_environment_alpha))
|
(libraries (tezos_embedded_protocol_environment_alpha))
|
||||||
(library_flags (:standard -linkall))
|
(library_flags (:standard -linkall))
|
||||||
(flags (:standard -nopervasives -nostdlib -safe-string
|
(flags (:standard -nopervasives -nostdlib -safe-string
|
||||||
-w +a-4-6-7-9-29-32-40..42-44-45-48
|
-w +a-4-6-7-9-29-32-40..42-44-45-48
|
||||||
-warn-error -a+8
|
-warn-error -a+8
|
||||||
-open Tezos_protocol_environment_alpha__Environment
|
-open Tezos_embedded_protocol_environment_alpha__Environment
|
||||||
-open Error_monad
|
-open Error_monad
|
||||||
-open Hash
|
-open Hash
|
||||||
-open Tezos_data))
|
-open Tezos_data))
|
||||||
@ -47,20 +47,7 @@ let () =
|
|||||||
|
|
||||||
(library
|
(library
|
||||||
((name tezos_embedded_protocol_alpha)
|
((name tezos_embedded_protocol_alpha)
|
||||||
(public_name tezos.embedded_protocol.alpha)
|
(public_name tezos-embedded-protocol-alpha)
|
||||||
(library_flags (:standard -linkall -w -9-32 -safe-string))
|
(library_flags (:standard -linkall))
|
||||||
(libraries (tezos_embedded_raw_protocol_alpha node_shell))
|
(libraries (tezos_embedded_raw_protocol_alpha tezos.node.shell))
|
||||||
(modules (Registerer))))
|
(modules (Registerer))))
|
||||||
|
|
||||||
(alias
|
|
||||||
((name runtest_sandboxing)
|
|
||||||
(deps ((glob_files *.ml)
|
|
||||||
(glob_files *.mli)
|
|
||||||
TEZOS_PROTOCOL))
|
|
||||||
(action (chdir ${ROOT}
|
|
||||||
(run ${exe:../../compiler_main.exe} dummy_alpha ${path-no-dep:.})))))
|
|
||||||
|
|
||||||
(alias
|
|
||||||
((name runtest_indent)
|
|
||||||
(deps ((glob_files *.ml) (glob_files *.mli)))
|
|
||||||
(action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<}))))
|
|
@ -0,0 +1,21 @@
|
|||||||
|
opam-version: "1.2"
|
||||||
|
version: "dev"
|
||||||
|
maintainer: "contact@tezos.com"
|
||||||
|
authors: [ "Tezos devteam" ]
|
||||||
|
homepage: "https://www.tezos.com/"
|
||||||
|
bug-reports: "https://gitlab.com/tezos/tezos/issues"
|
||||||
|
dev-repo: "https://gitlab.com/tezos/tezos.git"
|
||||||
|
license: "unreleased"
|
||||||
|
depends: [
|
||||||
|
"ocamlfind" { build }
|
||||||
|
"jbuilder" { build & >= "1.0+beta15" }
|
||||||
|
"base-bigarray"
|
||||||
|
"tezos-base"
|
||||||
|
"uutf"
|
||||||
|
]
|
||||||
|
build: [
|
||||||
|
[ "jbuilder" "build" "-p" name "-j" jobs ]
|
||||||
|
]
|
||||||
|
build-test: [
|
||||||
|
[ "jbuilder" "runtest" "-p" name "-j" jobs ]
|
||||||
|
]
|
21
lib_embedded_protocol_alpha/tezos-protocol-alpha.opam
Normal file
21
lib_embedded_protocol_alpha/tezos-protocol-alpha.opam
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
opam-version: "1.2"
|
||||||
|
version: "dev"
|
||||||
|
maintainer: "contact@tezos.com"
|
||||||
|
authors: [ "Tezos devteam" ]
|
||||||
|
homepage: "https://www.tezos.com/"
|
||||||
|
bug-reports: "https://gitlab.com/tezos/tezos/issues"
|
||||||
|
dev-repo: "https://gitlab.com/tezos/tezos.git"
|
||||||
|
license: "unreleased"
|
||||||
|
depends: [
|
||||||
|
"ocamlfind" { build }
|
||||||
|
"jbuilder" { build & >= "1.0+beta15" }
|
||||||
|
"base-bigarray"
|
||||||
|
"tezos-base"
|
||||||
|
"uutf"
|
||||||
|
]
|
||||||
|
build: [
|
||||||
|
[ "jbuilder" "build" "-p" name "-j" jobs ]
|
||||||
|
]
|
||||||
|
build-test: [
|
||||||
|
[ "jbuilder" "runtest" "-p" name "-j" jobs ]
|
||||||
|
]
|
40
lib_embedded_protocol_demo/jbuild
Normal file
40
lib_embedded_protocol_demo/jbuild
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
(jbuild_version 1)
|
||||||
|
|
||||||
|
;; Build a functorized version of the protocol with the `tezos-protocol-compiler`
|
||||||
|
;; This is bit hackish...
|
||||||
|
;;
|
||||||
|
;; AFAIK the current version of jbuilder (1.0+beta16) does not allow to compile
|
||||||
|
;; with a custom `rule` the `(modules)` of a library.
|
||||||
|
;;
|
||||||
|
;; A trick is to provide the `.cmx` through the `(library_flags)` and to generate
|
||||||
|
;; a empty `.ml` to correctly handle the dependencies...
|
||||||
|
|
||||||
|
(rule
|
||||||
|
((targets (tezos_protocol_demo.o
|
||||||
|
tezos_protocol_demo.cmx
|
||||||
|
tezos_protocol_demo.cmi
|
||||||
|
tezos_protocol_demo_dummy.ml))
|
||||||
|
(deps ((glob_files src/*.ml)
|
||||||
|
(glob_files src/*.mli)
|
||||||
|
src/TEZOS_PROTOCOL))
|
||||||
|
(action (with-stdout-to ${path-no-dep:tezos_protocol_demo_dummy.ml}
|
||||||
|
(chdir ${ROOT}
|
||||||
|
(run ${bin:tezos-protocol-compiler} -static ${path-no-dep:tezos_protocol_demo} ${path-no-dep:src}))))))
|
||||||
|
|
||||||
|
(library
|
||||||
|
((name tezos_protocol_demo)
|
||||||
|
(public_name tezos-protocol-demo)
|
||||||
|
(library_flags (:standard -linkall
|
||||||
|
lib_embedded_protocol_demo/tezos_protocol_demo.cmx))
|
||||||
|
(wrapped false)
|
||||||
|
(modes (native))
|
||||||
|
(modules (Tezos_protocol_demo_dummy))))
|
||||||
|
|
||||||
|
(alias
|
||||||
|
((name runtest_sandbox)
|
||||||
|
(deps (tezos_protocol_demo.cmx))))
|
||||||
|
|
||||||
|
(alias
|
||||||
|
((name runtest_indent)
|
||||||
|
(deps ((glob_files src/*.ml) (glob_files src/*.mli)))
|
||||||
|
(action (run bash ${libexec:tezos-stdlib:test-ocp-indent.sh} ${<}))))
|
53
lib_embedded_protocol_demo/src/jbuild
Normal file
53
lib_embedded_protocol_demo/src/jbuild
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
(jbuild_version 1)
|
||||||
|
|
||||||
|
(rule
|
||||||
|
((targets (environment.ml))
|
||||||
|
(action
|
||||||
|
(write-file ${@}
|
||||||
|
"include Tezos_protocol_environment.Make(struct let name = \"demo\" end)()"))))
|
||||||
|
|
||||||
|
(rule
|
||||||
|
((targets (registerer.ml))
|
||||||
|
(action
|
||||||
|
(write-file ${@}
|
||||||
|
"
|
||||||
|
let () =
|
||||||
|
let module Ignored = State.Register_embedded_protocol
|
||||||
|
(Tezos_embedded_protocol_environment_demo.Environment)
|
||||||
|
(Tezos_embedded_raw_protocol_demo.Main)
|
||||||
|
(struct
|
||||||
|
let hash =
|
||||||
|
Some (Tezos_crypto.Protocol_hash.of_b58check_exn
|
||||||
|
\"ProtoDemoDemoDemoDemoDemoDemoDemoDemoDemoDemoD3c8k9\")
|
||||||
|
let sources = Tezos_base.Protocol.{
|
||||||
|
expected_env = V1 ;
|
||||||
|
components = [(* FIXME ?? *)] ;
|
||||||
|
} end) in ()"))))
|
||||||
|
|
||||||
|
(library
|
||||||
|
((name tezos_embedded_protocol_environment_demo)
|
||||||
|
(public_name tezos-embedded-protocol-demo.environment)
|
||||||
|
(library_flags (:standard -linkall))
|
||||||
|
(libraries (tezos.node.updater))
|
||||||
|
(modules (Environment))))
|
||||||
|
|
||||||
|
(library
|
||||||
|
((name tezos_embedded_raw_protocol_demo)
|
||||||
|
(public_name tezos-embedded-protocol-demo.raw)
|
||||||
|
(libraries (tezos_embedded_protocol_environment_demo))
|
||||||
|
(library_flags (:standard -linkall))
|
||||||
|
(flags (:standard -nopervasives -nostdlib -safe-string
|
||||||
|
-w +a-4-6-7-9-29-32-40..42-44-45-48
|
||||||
|
-warn-error -a+8
|
||||||
|
-open Tezos_embedded_protocol_environment_demo__Environment
|
||||||
|
-open Error_monad
|
||||||
|
-open Hash
|
||||||
|
-open Tezos_data))
|
||||||
|
(modules (:standard \ Environment Registerer))))
|
||||||
|
|
||||||
|
(library
|
||||||
|
((name tezos_embedded_protocol_demo)
|
||||||
|
(public_name tezos-embedded-protocol-demo)
|
||||||
|
(library_flags (:standard -linkall))
|
||||||
|
(libraries (tezos_embedded_raw_protocol_demo tezos.node.shell))
|
||||||
|
(modules (Registerer))))
|
21
lib_embedded_protocol_demo/tezos-embedded-protocol-demo.opam
Normal file
21
lib_embedded_protocol_demo/tezos-embedded-protocol-demo.opam
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
opam-version: "1.2"
|
||||||
|
version: "dev"
|
||||||
|
maintainer: "contact@tezos.com"
|
||||||
|
authors: [ "Tezos devteam" ]
|
||||||
|
homepage: "https://www.tezos.com/"
|
||||||
|
bug-reports: "https://gitlab.com/tezos/tezos/issues"
|
||||||
|
dev-repo: "https://gitlab.com/tezos/tezos.git"
|
||||||
|
license: "unreleased"
|
||||||
|
depends: [
|
||||||
|
"ocamlfind" { build }
|
||||||
|
"jbuilder" { build & >= "1.0+beta15" }
|
||||||
|
"base-bigarray"
|
||||||
|
"tezos-base"
|
||||||
|
"uutf"
|
||||||
|
]
|
||||||
|
build: [
|
||||||
|
[ "jbuilder" "build" "-p" name "-j" jobs ]
|
||||||
|
]
|
||||||
|
build-test: [
|
||||||
|
[ "jbuilder" "runtest" "-p" name "-j" jobs ]
|
||||||
|
]
|
21
lib_embedded_protocol_demo/tezos-protocol-demo.opam
Normal file
21
lib_embedded_protocol_demo/tezos-protocol-demo.opam
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
opam-version: "1.2"
|
||||||
|
version: "dev"
|
||||||
|
maintainer: "contact@tezos.com"
|
||||||
|
authors: [ "Tezos devteam" ]
|
||||||
|
homepage: "https://www.tezos.com/"
|
||||||
|
bug-reports: "https://gitlab.com/tezos/tezos/issues"
|
||||||
|
dev-repo: "https://gitlab.com/tezos/tezos.git"
|
||||||
|
license: "unreleased"
|
||||||
|
depends: [
|
||||||
|
"ocamlfind" { build }
|
||||||
|
"jbuilder" { build & >= "1.0+beta15" }
|
||||||
|
"base-bigarray"
|
||||||
|
"tezos-base"
|
||||||
|
"uutf"
|
||||||
|
]
|
||||||
|
build: [
|
||||||
|
[ "jbuilder" "build" "-p" name "-j" jobs ]
|
||||||
|
]
|
||||||
|
build-test: [
|
||||||
|
[ "jbuilder" "runtest" "-p" name "-j" jobs ]
|
||||||
|
]
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user