Skip to content
Draft
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
4 changes: 2 additions & 2 deletions .github/scripts/cygwin.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ md %CYGWIN_ROOT%
:: Download the required setup program: the mingw-w64 compilers are only
:: installed with Cygwin64.
if "%1" equ "x86_64-pc-cygwin" (
curl -sLo %CYGWIN_ROOT%\setup.exe https://cygwin.com/setup-x86_64.exe
curl -fsSLo %CYGWIN_ROOT%\setup.exe https://cygwin.com/setup-x86_64.exe
set CYGWIN_PACKAGES=,mingw64-i686-gcc-core=14.3.0-0.1,mingw64-x86_64-gcc-core=14.3.0-0.1,mingw64-i686-gcc-g++=14.3.0-0.1,mingw64-x86_64-gcc-g++=14.3.0-0.1
) else (
curl -sLo %CYGWIN_ROOT%\setup.exe https://cygwin.com/setup-x86.exe
curl -fsSLo %CYGWIN_ROOT%\setup.exe https://cygwin.com/setup-x86.exe
set CYGWIN_PACKAGES=
)

Expand Down
13 changes: 7 additions & 6 deletions .github/scripts/main/ocaml-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ esac
FLEXDLL_VERSION=0.43
MINGW_W64_VERSION=12.0.0

curl -sLO "https://github.com/ocaml/ocaml/archive/refs/tags/${OCAML_VERSION}.tar.gz"
curl -fsSLO "https://github.com/ocaml/ocaml/archive/refs/tags/${OCAML_VERSION}.tar.gz" || \
curl -fsSLO "https://github.com/ocaml/ocaml/archive/refs/heads/${OCAML_VERSION}.tar.gz"
if [[ $PLATFORM = 'Windows' ]] ; then
curl -sLO "https://github.com/ocaml/flexdll/archive/refs/tags/$FLEXDLL_VERSION.tar.gz"
curl -sLO "https://github.com/mingw-w64/mingw-w64/archive/refs/tags/v${MINGW_W64_VERSION}.tar.gz"
curl -fsSLO "https://github.com/ocaml/flexdll/archive/refs/tags/$FLEXDLL_VERSION.tar.gz"
curl -fsSLO "https://github.com/mingw-w64/mingw-w64/archive/refs/tags/v${MINGW_W64_VERSION}.tar.gz"
fi

tar -xzf "$OCAML_VERSION.tar.gz"
Expand All @@ -61,7 +62,7 @@ esac

cd "ocaml-$OCAML_VERSION"
for sha in $PATCHES; do
curl -sL "https://github.com/ocaml/ocaml/commit/$sha.patch" -o "../$sha.patch"
curl -fsSL "https://github.com/ocaml/ocaml/commit/$sha.patch" -o "../$sha.patch"
patch -p1 -i "../$sha.patch"
done

Expand Down Expand Up @@ -96,8 +97,8 @@ OCAML_BRANCH="${OCAML_BRANCH/./}"
if [[ $OPAM_TEST -ne 1 ]] ; then
if [[ -e configure.ac ]]; then
CONFIGURE_SWITCHES="--disable-debugger --disable-debug-runtime --disable-ocamldoc --disable-installing-bytecode-programs --disable-installing-source-artifacts"
if [[ $OCAML_BRANCH -eq 408 ]]; then
curl -L https://github.com/ocaml/ocaml/commit/c8ee39b320207717135d88cad67fb65d0901d6b6.patch -o pr8858.patch
if [[ $OCAML_BRANCH = 408 ]]; then
curl -fsSL https://github.com/ocaml/ocaml/commit/c8ee39b320207717135d88cad67fb65d0901d6b6.patch -o pr8858.patch
patch -p1 -i pr8858.patch
CONFIGURE_SWITCHES="$CONFIGURE_SWITCHES --disable-graph-lib"
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/main/opam-bs-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ "$os" = "darwin" ] ; then
os=macos
fi

curl -sL -o $OPAM_LOCAL/bin/opam-bootstrap \
curl -fsSL -o $OPAM_LOCAL/bin/opam-bootstrap \
"https://github.com/ocaml/opam/releases/download/$OPAMBSVERSION/opam-$OPAMBSVERSION-$(uname -m)-$os"
cp -f $OPAM_LOCAL/bin/opam-bootstrap $OPAM_LOCAL/bin/opam
chmod a+x $OPAM_LOCAL/bin/opam
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/main/preamble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ OPAM_DOC=${OPAM_DOC:-0}
OPAM_DEPENDS=${OPAM_DEPENDS:-0}
OPAM_UPGRADE=${OPAM_UPGRADE:-0}

OPAM_REPO_MAIN=https://github.com/ocaml/opam-repository.git
OPAM_REPO_MAIN=https://github.com/kit-ty-kate/opam-repository.git

OPAM12CACHE=`eval echo $OPAM12CACHE`
OPAMBSROOT=`eval echo $OPAMBSROOT`
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/main/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [[ ! -f $OPAM12 ]]; then
if [ "$RUNNER_OS" = "macOS" ]; then
os="Darwin"
fi
curl -sL "https://github.com/ocaml/opam/releases/download/1.2.2/opam-1.2.2-x86_64-$os" -o $OPAM12
curl -fsSL "https://github.com/ocaml/opam/releases/download/1.2.2/opam-1.2.2-x86_64-$os" -o $OPAM12
chmod +x $OPAM12
fi
export OPAMROOT=/tmp/opamroot
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/scripts/hygiene.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if [[ $GITHUB_EVENT_NAME = 'pull_request' ]]; then
fi
URL="$OPAM_BIN_URL_BASE$tag/opam-$tag-$platform"
echo "Downloading $URL"
check=$(curl -Ls "$URL" | sha512sum | cut -d' ' -f1)
check=$(curl -fsSL "$URL" | sha512sum | cut -d' ' -f1)
if [[ $check = $sha ]] ; then
echo " as expected ($sha)"
else
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/ci.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@
open Lib

let latest_ocaml4 = "4.14.2"
let latest_ocaml5 = "5.3.0" (* Add this number to ocamls below when the next version comes out *)
let latest_ocaml5 = "5.4.0-beta2" (* Add this number to ocamls below when the next version comes out *)
let ocamls = [
(* Fully supported versions *)
"4.08.1"; "4.09.1"; "4.10.2"; "4.11.2"; "4.12.1"; "4.13.1";
"5.0.0"; "5.1.1"; "5.2.1";
"5.0.0"; "5.1.1"; "5.2.1"; "5.3.0"; "trunk";

(* The last elements of the list after 4.14 will be used as default versions *)
latest_ocaml4; latest_ocaml5;
]
let start_latests_ocaml = (4, 14)
let start_latests_ocaml = latest_ocaml4
let oldest_ocamlv = List.hd ocamls

(* Entry point for the workflow. Workflows are specified as continuations where
each job is passed as a continuation to the [workflow], terminated with
Expand Down Expand Up @@ -69,12 +70,9 @@ jobs:

let end_workflow ~oc:_ ~workflow:_ = ()

let ocamls =
List.map (fun v -> Scanf.sscanf v "%u.%u.%u" (fun major minor _ -> ((major, minor), v))) ocamls

let platform_ocaml_matrix ?(dir=List.drop_while) ~fail_fast start_version =
(fail_fast,
[("ocamlv", List.map snd (dir (fun ocaml -> fst ocaml <> start_version) ocamls))],
[("ocamlv", dir (fun ocaml -> not (String.equal ocaml start_version)) ocamls)],
[])

let git_lf_checkouts ?(title="Configure Git") ?cond ?shell () =
Expand Down Expand Up @@ -315,7 +313,7 @@ let main_build_job ~analyse_job ~cygwin_job ?section runner start_version ~oc ~w
"x86_64-pc-windows"
] in
let ocaml5 = [
(* "x86_64-pc-cygwin"; *) (* TODO: Restore Cygwin + OCaml 5.3 when C++ support is fixed and released *)
"x86_64-pc-cygwin";
"x86_64-w64-mingw32";
"x86_64-pc-windows";
] in
Expand Down Expand Up @@ -543,9 +541,9 @@ let main oc : unit =
("OPAMBSROOT", "~/.cache/.opam.cached");
("OPAM12CACHE", "~/.cache/opam1.2/cache");
(* These should be identical to the values in appveyor.yml *)
("OPAM_REPO", "https://github.com/ocaml/opam-repository.git");
("OPAM_TEST_REPO_SHA", "3dab8c734b15bf2b5c1d8b99bb134f51361a6bee");
("OPAM_REPO_SHA", "3dab8c734b15bf2b5c1d8b99bb134f51361a6bee");
("OPAM_REPO", "https://github.com/kit-ty-kate/opam-repository.git");
("OPAM_TEST_REPO_SHA", "2e86b4d508e56b2affe6458ef776e20b9b4ec253");
("OPAM_REPO_SHA", "2e86b4d508e56b2affe6458ef776e20b9b4ec253");
("SOLVER", "");
(* Cygwin configuration *)
("CYGWIN_MIRROR", "http://mirrors.kernel.org/sourceware/cygwin/");
Expand All @@ -562,7 +560,7 @@ let main oc : unit =
workflow ~oc ~env "Builds, tests & co"
++ analyse_job ~keys ~platforms:[Linux]
@@ fun analyse_job -> cygwin_job ~analyse_job
@@ fun cygwin_job -> main_build_job ~analyse_job ~cygwin_job ~section:"Build" Linux (4, 08)
@@ fun cygwin_job -> main_build_job ~analyse_job ~cygwin_job ~section:"Build" Linux oldest_ocamlv
@@ fun build_linux_job -> main_build_job ~analyse_job ~cygwin_job Windows start_latests_ocaml
@@ fun build_windows_job -> main_build_job ~analyse_job ~cygwin_job MacOS start_latests_ocaml
@@ fun build_macOS_job -> main_test_job ~analyse_job ~build_linux_job ~build_windows_job ~build_macOS_job ~section:"Opam tests" Linux
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/depexts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ defaults:

env:
OPAMVERSION: 2.4.1
OPAM_REPO: https://github.com/ocaml/opam-repository.git
OPAM_REPO_SHA: 3dab8c734b15bf2b5c1d8b99bb134f51361a6bee
OPAM_REPO: https://github.com/kit-ty-kate/opam-repository.git
OPAM_REPO_SHA: 2e86b4d508e56b2affe6458ef776e20b9b4ec253

jobs:
opam-cache:
Expand Down
33 changes: 18 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ env:
OPAMBSVERSION: 2.1.0
OPAMBSROOT: ~/.cache/.opam.cached
OPAM12CACHE: ~/.cache/opam1.2/cache
OPAM_REPO: https://github.com/ocaml/opam-repository.git
OPAM_TEST_REPO_SHA: 3dab8c734b15bf2b5c1d8b99bb134f51361a6bee
OPAM_REPO_SHA: 3dab8c734b15bf2b5c1d8b99bb134f51361a6bee
OPAM_REPO: https://github.com/kit-ty-kate/opam-repository.git
OPAM_TEST_REPO_SHA: 2e86b4d508e56b2affe6458ef776e20b9b4ec253
OPAM_REPO_SHA: 2e86b4d508e56b2affe6458ef776e20b9b4ec253
SOLVER:
CYGWIN_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
CYGWIN_ROOT: D:\cygwin
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
needs: Analyse
strategy:
matrix:
ocamlv: [ 4.08.1, 4.09.1, 4.10.2, 4.11.2, 4.12.1, 4.13.1, 5.0.0, 5.1.1, 5.2.1, 4.14.2, 5.3.0 ]
ocamlv: [ 4.08.1, 4.09.1, 4.10.2, 4.11.2, 4.12.1, 4.13.1, 5.0.0, 5.1.1, 5.2.1, 5.3.0, trunk, 4.14.2, 5.4.0-beta2 ]
fail-fast: true
steps:
- name: Install bubblewrap
Expand Down Expand Up @@ -159,12 +159,15 @@ jobs:
- host: x86_64-pc-windows
build: x86_64-pc-cygwin
ocamlv: 4.14.2
- host: x86_64-pc-cygwin
build: x86_64-pc-cygwin
ocamlv: 5.4.0-beta2
- host: x86_64-w64-mingw32
build: x86_64-pc-cygwin
ocamlv: 5.3.0
ocamlv: 5.4.0-beta2
- host: x86_64-pc-windows
build: x86_64-pc-cygwin
ocamlv: 5.3.0
ocamlv: 5.4.0-beta2
fail-fast: false
defaults:
run:
Expand Down Expand Up @@ -250,7 +253,7 @@ jobs:
needs: Analyse
strategy:
matrix:
ocamlv: [ 4.14.2, 5.3.0 ]
ocamlv: [ 4.14.2, 5.4.0-beta2 ]
fail-fast: true
steps:
- name: Install GNU patch
Expand Down Expand Up @@ -288,7 +291,7 @@ jobs:
needs: [ Analyse, Build-Linux ]
strategy:
matrix:
ocamlv: [ 4.14.2, 5.3.0 ]
ocamlv: [ 4.14.2, 5.4.0-beta2 ]
fail-fast: false
env:
OPAM_TEST: 1
Expand Down Expand Up @@ -345,7 +348,7 @@ jobs:
needs: Analyse
strategy:
matrix:
ocamlv: [ 4.14.2, 5.3.0 ]
ocamlv: [ 4.14.2, 5.4.0-beta2 ]
fail-fast: false
env:
OPAM_TEST: 1
Expand Down Expand Up @@ -434,7 +437,7 @@ jobs:
needs: [ Analyse, Build-Linux ]
strategy:
matrix:
ocamlv: [ 4.14.2, 5.3.0 ]
ocamlv: [ 4.14.2, 5.4.0-beta2 ]
fail-fast: false
env:
OPAM_DOC: 1
Expand Down Expand Up @@ -491,7 +494,7 @@ jobs:
strategy:
matrix:
solver: [ z3, 0install ]
ocamlv: [ 4.14.2, 5.3.0 ]
ocamlv: [ 4.14.2, 5.4.0-beta2 ]
fail-fast: false
env:
SOLVER: ${{ matrix.solver }}
Expand Down Expand Up @@ -541,7 +544,7 @@ jobs:
strategy:
matrix:
solver: [ z3, 0install ]
ocamlv: [ 4.14.2, 5.3.0 ]
ocamlv: [ 4.14.2, 5.4.0-beta2 ]
fail-fast: false
env:
SOLVER: ${{ matrix.solver }}
Expand Down Expand Up @@ -589,7 +592,7 @@ jobs:
needs: [ Analyse, Build-Linux ]
strategy:
matrix:
ocamlv: [ 4.14.2, 5.3.0 ]
ocamlv: [ 4.14.2, 5.4.0-beta2 ]
fail-fast: false
steps:
- name: Install bubblewrap
Expand Down Expand Up @@ -624,7 +627,7 @@ jobs:
needs: [ Analyse, Build-macOS ]
strategy:
matrix:
ocamlv: [ 4.14.2, 5.3.0 ]
ocamlv: [ 4.14.2, 5.4.0-beta2 ]
fail-fast: false
steps:
- name: Checkout tree
Expand Down Expand Up @@ -694,7 +697,7 @@ jobs:
needs: [ Analyse, Build-Linux ]
strategy:
matrix:
ocamlv: [ 4.14.2, 5.3.0 ]
ocamlv: [ 4.14.2, 5.4.0-beta2 ]
fail-fast: false
env:
OPAM_DEPENDS: 1
Expand Down
4 changes: 2 additions & 2 deletions src/client/opamTreeCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
open OpamTypes
open OpamStateTypes

type deps
type revdeps
type deps = private [`deps]
type revdeps = private [`revdeps]
type 'a node =
| Root of package
| Dependency : {
Expand Down
Loading