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

Switch to jbuilder, prepare to release 1.1.0 #7

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 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
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.1.0 (2017-05-19)

- Update to jbuilder

### 1.0.0 (2016-12-26)

- Add Stats module from mirage-net-xen for common use
Expand Down
20 changes: 15 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
all:
ocaml pkg/pkg.ml build -n mirage-net
ocaml pkg/pkg.ml build -n mirage-net-lwt

.PHONY: build clean test

build:
jbuilder build @install

test:
jbuilder runtest

install:
jbuilder install

uninstall:
jbuilder uninstall

clean:
ocaml pkg/pkg.ml clean -n mirage-net
ocaml pkg/pkg.ml clean -n mirage-net-lwt
rm -rf _build
6 changes: 0 additions & 6 deletions _tags

This file was deleted.

8 changes: 4 additions & 4 deletions mirage-net-lwt.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ authors: ["Thomas Gazagnaire" "Anil Madhavapeddy" "Gabriel Radanne"
tags: [ "org:mirage"]
license: "ISC"

build: ["ocaml" "pkg/pkg.ml" "build"
"--pkg-name" "%{name}%" "--pinned" "%{pinned}%"]
build: [
[ "jbuilder" "build" "-j" jobs ]
]

depends: [
"ocamlfind" {build}
"ocamlbuild" {build}
"topkg" {build & >= "0.8.0"}
"jbuilder" {build & >="1.0+beta7"}
"mirage-net" {>= "1.0.0"}
"lwt" "ipaddr" "cstruct" "io-page"
]
1 change: 1 addition & 0 deletions mirage-net-lwt.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.0
8 changes: 5 additions & 3 deletions opam → mirage-net.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ authors: ["Thomas Gazagnaire" "Anil Madhavapeddy" "Gabriel Radanne"
tags: [ "org:mirage"]
license: "ISC"

build: ["ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%"]
build: [
[ "jbuilder" "build" "-p" name "-j" jobs ]
]

depends: [
"ocamlfind" {build}
"ocamlbuild" {build}
"topkg" {build & >= "0.8.0"}
"jbuilder" {build & >="1.0+beta7"}
"result"
"mirage-device" {>= "1.0.0"}
]
1 change: 1 addition & 0 deletions mirage-net.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not needed with beta9 which adds a new jbuilder subst CLI option to do exactly the same watermarking as topkg does.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(so you can continue to use %%VERSION%% in various places)

7 changes: 0 additions & 7 deletions pkg/META

This file was deleted.

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

This file was deleted.

30 changes: 0 additions & 30 deletions pkg/pkg.ml

This file was deleted.

17 changes: 17 additions & 0 deletions src/jbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(library
((name mirage_net)
(public_name mirage-net)
(libraries (bytes result mirage-device))
(modules (Mirage_net))
(flags (:standard -w "A-4-41-44" -warn-error "+1..49" -safe-string))
Copy link
Member

@samoht samoht May 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about adding warning errors to the build runes run which will be run after the release. I thing it's better to use topkg build --dev while doing development (which has a sane set of warning/error options).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case I coped the contents of the _tags file: true: warn_error(+1..49), warn(A-4-41-44). I'm not very familiar with the semantics of this though. Is it not safe to use a specified list "1,2,3,...,49" since they're already defined and won't be redefined in future versions of the compiler? I thought the main problem was with the equivalent of -Wall which includes future yet-to-be-defined errors.

Wrt to topkg could you explain a bit more? I see this:

$ topkg build --dev
topkg: unknown option `--dev', did you mean `-d' ?
Usage: topkg build [OPTION]... [BUILD_CONF]...
Try `topkg build --help' or `topkg --help' for more information.

(I was never a topkg expert). Is your suggestion to use topkg and jbuilder together? Could you outline what the build and release workflow would look like? Thanks!

(wrapped false)
))

(library
((name mirage_net_lwt)
(public_name mirage-net-lwt)
(libraries (result mirage-net lwt io-page cstruct ipaddr))
(modules (Mirage_net_lwt))
(flags (:standard -w "A-4-41-44" -warn-error "+1..49" -safe-string))
(wrapped false)
))
1 change: 0 additions & 1 deletion src/mirage-net.mllib

This file was deleted.

File renamed without changes.