Skip to content

Commit

Permalink
Merge pull request #49 from hannesm/no-bigarray-compat
Browse files Browse the repository at this point in the history
Bump to OCaml 4.08.0, remove bigarray-compat from dependency chain
  • Loading branch information
seliopou authored Apr 7, 2022
2 parents 53cb9e0 + be6935c commit 6e157fd
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: build

on:
on:
- push
- pull_request

Expand All @@ -13,11 +13,11 @@ jobs:
os:
- ubuntu-latest
ocaml-version:
- 4.03.0
- 4.05.0
- 4.07.0
- 4.09.0
- 4.11.1
- 4.08.1
- 4.09.1
- 4.11.2
- 4.13.1
- 4.14.0

runs-on: ${{ matrix.os }}

Expand All @@ -26,14 +26,12 @@ jobs:
uses: actions/checkout@v2

- name: Use OCaml ${{ matrix.ocaml-version }}
uses: avsm/setup-ocaml@v1
uses: ocaml/setup-ocaml@v2
with:
ocaml-version: ${{ matrix.ocaml-version }}
ocaml-compiler: ${{ matrix.ocaml-version }}

- name: Deps
run: |
opam pin add -n bigstringaf .
opam install -t --deps-only .
run: opam install -t --deps-only .

- name: Build
run: opam exec -- dune build
Expand Down
5 changes: 2 additions & 3 deletions bigstringaf.opam
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ homepage: "https://github.com/inhabitedtype/bigstringaf"
bug-reports: "https://github.com/inhabitedtype/bigstringaf/issues"
dev-repo: "git+https://github.com/inhabitedtype/bigstringaf.git"
build: [
["dune" "subst"] {pinned}
["dune" "subst"] {dev}
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name] {with-test}
]
depends: [
"dune" {>= "2.6.0"}
"alcotest" {with-test}
"bigarray-compat"
"ocaml" {>= "4.03.0"}
"ocaml" {>= "4.08.0"}
"conf-pkg-config" {build}
]
depopts: [
Expand Down
1 change: 1 addition & 0 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
(lang dune 2.6)
(name bigstringaf)
(formatting disabled)
6 changes: 3 additions & 3 deletions lib/bigstringaf.ml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
type bigstring =
(char, Bigarray_compat.int8_unsigned_elt, Bigarray_compat.c_layout) Bigarray_compat.Array1.t
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t

type t = bigstring

let create size = Bigarray_compat.(Array1.create char c_layout size)
let create size = Bigarray.(Array1.create char c_layout size)
let empty = create 0

module BA1 = Bigarray_compat.Array1
module BA1 = Bigarray.Array1

let length t = BA1.dim t

Expand Down
2 changes: 1 addition & 1 deletion lib/bigstringaf.mli
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
So here they are. Go crazy. *)

type t =
(char, Bigarray_compat.int8_unsigned_elt, Bigarray_compat.c_layout) Bigarray_compat.Array1.t
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t

(** {2 Constructors} *)

Expand Down
2 changes: 0 additions & 2 deletions lib/dune
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
(library
(name bigstringaf)
(public_name bigstringaf)
(libraries bigarray-compat)
(flags (:standard -safe-string))

(foreign_stubs
(language c)
Expand Down

0 comments on commit 6e157fd

Please sign in to comment.