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

update deprecated use of functions, use digestif for sha hashes (removed in mirage-crypto) #570

Open
wants to merge 1 commit 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
6 changes: 4 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM node:lts AS node
FROM hadolint/hadolint:latest-alpine AS hadolint
FROM ocaml/opam:debian-10-ocaml-4.14

USER root
Expand All @@ -15,7 +14,7 @@ RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
&& ln -s /opt/yarn-v*/bin/yarnpkg /usr/local/bin/yarnpkg

# copy hadolint
COPY --from=hadolint /bin/hadolint /bin/hadolint
COPY --from=hadolint/hadolint:latest-alpine /bin/hadolint /bin/hadolint

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND noninteractive
Expand Down Expand Up @@ -51,6 +50,9 @@ RUN ln -fs /usr/share/zoneinfo/Europe/Zurich /etc/localtime
RUN bash -c 'echo "http 80/tcp www # WorldWideWeb HTTP" >> /etc/services' \
&& bash -c 'echo "https 443/tcp www # WorldWideWeb HTTPS" >> /etc/services'

# link opam version
RUN ln -fs /usr/bin/opam-2.2 /usr/bin/opam

USER opam

# install oh-my-zsh
Expand Down
8 changes: 6 additions & 2 deletions .devcontainer/postCreate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ opam init -a --shell=zsh
opam remote remove --all default
opam remote add default https://opam.ocaml.org

opam pin add . --yes --no-action
opam depext sihl sihl-user sihl-storage sihl-email sihl-queue sihl-cache sihl-token --yes --with-doc --with-test
# TODO: remove pins when the packages are released
opam pin add -yn opium https://github.com/mabiede/opium.git#upgrade-packages
opam pin add -yn rock https://github.com/mabiede/opium.git#upgrade-packages

# install dev dependencies
opam install --yes --with-doc --with-test --deps-only --working-dir .

eval $(opam env)

Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,36 @@ jobs:
os:
- ubuntu-latest
ocaml-compiler:
- 4.12.x
- 4.14
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Retrieve opam cache
uses: actions/cache@v4
if: runner.os != 'Windows'
id: cache-opam
with:
path: ~/.opam
key: v1-${{ runner.os }}-opam-${{ matrix.ocaml-compiler }}-${{ hashFiles('*.opam.locked') }}

- name: Use OCaml ${{ matrix.ocaml-version }}
uses: ocaml/setup-ocaml@v2
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true

- name: Install system dependencies
run: sudo apt-get update -y && sudo apt-get install -y libmariadb-dev

- name: Install dependencies
run: make deps

- name: Recover from an Opam broken state
if: steps.cache-opam.outputs.cache-hit == 'true'
run: |
opam install -y dune
opam upgrade --fixup

- name: Build
run: make build

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.merlin
.devcontainer/data
*.install
opium
.DS_Store
10 changes: 5 additions & 5 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
(ppx_deriving_yojson
(>= 3.5.2))
(tls
(>= 0.11.1))
(>= 1.0.4))
(ssl
(>= 0.5.9))
(lwt_ssl
Expand All @@ -67,15 +67,15 @@
(jwto
(>= 0.3.0))
(uuidm
(>= 0.9.7))
(>= 0.9.9))
(ppx_fields_conv
(>= v0.13.0))
(ppx_sexp_conv
(>= v0.13.0))
(mirage-crypto
(>= 0.11.2))
(>= 1.1.0))
(mirage-crypto-rng
(>= 0.11.2))
(>= 1.2.0))
(cstruct
(>= 6.0.1))
(opium
Expand Down Expand Up @@ -215,7 +215,7 @@
(ocaml
(>= 4.08.0))
(letters
(>= 0.2.1))
(>= 0.4.0))
(sihl
(= :version))
(cohttp-lwt-unix
Expand Down
126 changes: 124 additions & 2 deletions sihl-cache.opam.locked
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,128 @@ homepage: "https://github.com/oxidizing/sihl"
doc: "https://oxidizing.github.io/sihl/"
bug-reports: "https://github.com/oxidizing/sihl/issues"
depends: [
"alcotest" {= "1.8.0" & with-test}
"alcotest-lwt" {= "1.8.0" & with-test}
"angstrom" {= "0.16.1"}
"asn1-combinators" {= "0.3.2"}
"astring" {= "0.8.5"}
"base" {= "v0.16.3"}
"base-bigarray" {= "base"}
"base-bytes" {= "base"}
"base-threads" {= "base"}
"base-unix" {= "base"}
"dune" {= "3.11.1"}
"ocaml" {= "4.14.1"}
"base64" {= "3.5.1"}
"bigarray-compat" {= "1.1.0"}
"bigstringaf" {= "0.10.0"}
"bos" {= "0.2.1"}
"camlp-streams" {= "5.0.1" & with-doc}
"caqti" {= "2.1.2"}
"caqti-driver-mariadb" {= "2.1.1" & with-test}
"caqti-driver-postgresql" {= "2.1.2" & with-test}
"caqti-lwt" {= "2.1.1"}
"cmdliner" {= "1.3.0"}
"conf-bash" {= "1"}
"conf-gcc" {= "1.0"}
"conf-gmp" {= "4"}
"conf-gmp-powm-sec" {= "3"}
"conf-libssl" {= "4"}
"conf-mariadb" {= "2"}
"conf-pkg-config" {= "4"}
"conf-postgresql" {= "2" & with-test}
"conformist" {= "0.8.1"}
"containers" {= "3.15"}
"cppo" {= "1.8.0"}
"crunch" {= "3.3.1" & with-doc}
"csexp" {= "1.5.2"}
"cstruct" {= "6.2.0"}
"ctypes" {= "0.23.0"}
"digestif" {= "1.2.0"}
"domain-name" {= "0.4.0"}
"dune" {= "3.17.2"}
"dune-build-info" {= "3.17.2"}
"dune-configurator" {= "3.17.2"}
"dune-private-libs" {= "3.17.2"}
"dune-site" {= "3.17.2"}
"duration" {= "0.2.1"}
"dyn" {= "3.17.2"}
"either" {= "1.0.0"}
"eqaf" {= "0.10"}
"faraday" {= "0.8.2"}
"faraday-lwt" {= "0.8.2"}
"faraday-lwt-unix" {= "0.8.2"}
"fieldslib" {= "v0.16.0"}
"fmt" {= "0.9.0"}
"fpath" {= "0.7.3"}
"gmap" {= "0.3.0"}
"hmap" {= "0.8.1"}
"httpaf" {= "0.7.1"}
"httpaf-lwt-unix" {= "0.7.1"}
"integers" {= "0.7.0"}
"ipaddr" {= "5.6.0"}
"jwto" {= "0.4.0"}
"kdf" {= "1.0.0"}
"logs" {= "0.7.0"}
"lwt" {= "5.9.0"}
"lwt-dllist" {= "1.0.1"}
"lwt_ppx" {= "5.8.0"}
"lwt_ssl" {= "1.2.0"}
"macaddr" {= "5.6.0"}
"magic-mime" {= "1.3.1"}
"mariadb" {= "1.2.0"}
"mirage-crypto" {= "1.2.0"}
"mirage-crypto-ec" {= "1.2.0"}
"mirage-crypto-pk" {= "1.2.0"}
"mirage-crypto-rng" {= "1.2.0"}
"mtime" {= "2.1.0"}
"multipart-form-data" {= "0.3.0"}
"num" {= "1.5-1"}
"ocaml" {= "4.14.2"}
"ocaml-base-compiler" {= "4.14.2"}
"ocaml-compiler-libs" {= "v0.12.4"}
"ocaml-config" {= "2"}
"ocaml-options-vanilla" {= "1"}
"ocaml-syntax-shims" {= "1.0.0"}
"ocamlbuild" {= "0.15.0"}
"ocamlfind" {= "1.9.6"}
"ocplib-endian" {= "1.2"}
"odoc" {= "2.4.4" & with-doc}
"odoc-parser" {= "2.4.4" & with-doc}
"ohex" {= "0.2.0"}
"opium" {= "0.20.0"}
"ordering" {= "3.17.2"}
"parsexp" {= "v0.16.0"}
"postgresql" {= "5.1.3" & with-test}
"pp" {= "2.0.0"}
"ppx_derivers" {= "1.2.1"}
"ppx_deriving" {= "6.0.3"}
"ppx_deriving_yojson" {= "3.9.1"}
"ppx_fields_conv" {= "v0.16.0"}
"ppx_sexp_conv" {= "v0.16.0"}
"ppxlib" {= "0.34.0"}
"ptime" {= "1.2.0"}
"re" {= "1.12.0"}
"result" {= "1.5"}
"rock" {= "0.20.0"}
"rresult" {= "0.7.0"}
"safepass" {= "3.1"}
"seq" {= "base"}
"sexplib" {= "v0.16.0"}
"sexplib0" {= "v0.16.0"}
"sihl" {= "4.0.0"}
"ssl" {= "0.7.0"}
"stdlib-shims" {= "0.3.0"}
"stdune" {= "3.17.2"}
"stringext" {= "1.6.0"}
"tls" {= "1.0.4"}
"topkg" {= "1.0.7"}
"tsort" {= "2.1.0"}
"tyxml" {= "4.6.0"}
"uri" {= "4.4.0"}
"uuidm" {= "0.9.9"}
"uutf" {= "1.0.3"}
"x509" {= "1.0.5"}
"yojson" {= "2.2.2"}
"zarith" {= "1.14"}
]
build: [
["dune" "subst"] {dev}
Expand All @@ -30,3 +148,7 @@ build: [
]
dev-repo: "git+https://github.com/oxidizing/sihl.git"
name: "sihl-cache"
pin-depends: [
["opium.0.20.0" "git+https://github.com/mabiede/opium.git#upgrade-packages"]
["rock.0.20.0" "git+https://github.com/mabiede/opium.git#upgrade-packages"]
]
2 changes: 1 addition & 1 deletion sihl-email.opam
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ bug-reports: "https://github.com/oxidizing/sihl/issues"
depends: [
"dune" {>= "2.7"}
"ocaml" {>= "4.08.0"}
"letters" {>= "0.2.1"}
"letters" {>= "0.4.0"}
"sihl" {= version}
"cohttp-lwt-unix" {>= "2.5.4"}
"alcotest-lwt" {>= "1.4.0" & with-test}
Expand Down
Loading