Skip to content

Commit

Permalink
Merge pull request #634 from psafont/updune
Browse files Browse the repository at this point in the history
  • Loading branch information
psafont authored Mar 22, 2023
2 parents 4345996 + 8a4b1de commit 0962059
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 73 deletions.
4 changes: 4 additions & 0 deletions .github/duplicates-upstream-extra.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
xenctrl
ocaml
ocaml-base-compiler
ocaml-system
4 changes: 4 additions & 0 deletions .github/duplicates-xs-toolstack.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
xenctrl
ocaml
ocaml-base-compiler
ocaml-system
4 changes: 1 addition & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ jobs:
opam upgrade
- name: Check whether there are packages with more than a version
run: |
tools/no-duplicates-check-xs-toolstack.bash
tools/no-duplicates-check-upstream-extra-dummy.bash
run: tools/no-duplicates-check.bash

- name: Check whether there are unused packages
run: tools/find-unused-packages.sh
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
opam-version: "2.0"
name: "dune-build-info"
version: "3.4.1"
synopsis: "Embed build informations inside executable"
version: "3.7.0"
synopsis: "Embed build information inside executable"
description: """\
The build-info library allows to access information about how the
executable was built, such as the version of the project at which it
Expand All @@ -16,7 +16,7 @@ homepage: "https://github.com/ocaml/dune"
doc: "https://dune.readthedocs.io/"
bug-reports: "https://github.com/ocaml/dune/issues"
depends: [
"dune" {>= "3.3"}
"dune" {>= "3.5"}
"ocaml" {>= "4.08"}
"odoc" {with-doc}
]
Expand All @@ -28,10 +28,10 @@ build: [
]
dev-repo: "git+https://github.com/ocaml/dune.git"
url {
src: "https://github.com/ocaml/dune/releases/download/3.4.1/dune-3.4.1.tbz"
src: "https://github.com/ocaml/dune/releases/download/3.7.0/dune-3.7.0.tbz"
checksum: [
"sha256=299fa33cffc108cc26ff59d5fc9d09f6cb0ab3ac280bf23a0114cfdc0b40c6c5"
"sha512=cb425d08c989fd27e1a87a6c72f37494866b508b0fe4ec05070adad995a99710b223a9047b6649776f63943dafb61903eefe4d5efde4c439103a89e2d6ff5337"
"sha256=e2d637c9d080318fedf5e71d2a29fb367624f82ac4a26e83df2b3a03550528b8"
"sha512=586e47ee45cd53a8c13095bde0b47de99aad9462d0a52199362140b5b654ca862597fa9f27f729a8cc594684ac46858848f9fa76f8f06dc8dc8ab8b1186a3295"
]
}
x-commit-hash: "ac188544b55357c1fff277f54d1481d28a634e19"
x-commit-hash: "d3d628f2eda2278bd2df6e37452d8693f367fcfd"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
opam-version: "2.0"
name: "dune-configurator"
version: "3.4.1"
version: "3.7.0"
synopsis: "Helper library for gathering system configuration"
description: """\
dune-configurator is a small library that helps writing OCaml scripts that
Expand All @@ -18,7 +18,7 @@ homepage: "https://github.com/ocaml/dune"
doc: "https://dune.readthedocs.io/"
bug-reports: "https://github.com/ocaml/dune/issues"
depends: [
"dune" {>= "3.3"}
"dune" {>= "3.5"}
"ocaml" {>= "4.04.0"}
"base-unix"
"csexp" {>= "1.5.0"}
Expand All @@ -32,10 +32,10 @@ build: [
]
dev-repo: "git+https://github.com/ocaml/dune.git"
url {
src: "https://github.com/ocaml/dune/releases/download/3.4.1/dune-3.4.1.tbz"
src: "https://github.com/ocaml/dune/releases/download/3.7.0/dune-3.7.0.tbz"
checksum: [
"sha256=299fa33cffc108cc26ff59d5fc9d09f6cb0ab3ac280bf23a0114cfdc0b40c6c5"
"sha512=cb425d08c989fd27e1a87a6c72f37494866b508b0fe4ec05070adad995a99710b223a9047b6649776f63943dafb61903eefe4d5efde4c439103a89e2d6ff5337"
"sha256=e2d637c9d080318fedf5e71d2a29fb367624f82ac4a26e83df2b3a03550528b8"
"sha512=586e47ee45cd53a8c13095bde0b47de99aad9462d0a52199362140b5b654ca862597fa9f27f729a8cc594684ac46858848f9fa76f8f06dc8dc8ab8b1186a3295"
]
}
x-commit-hash: "ac188544b55357c1fff277f54d1481d28a634e19"
x-commit-hash: "d3d628f2eda2278bd2df6e37452d8693f367fcfd"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
opam-version: "2.0"
name: "dune"
version: "3.4.1"
version: "3.7.0"
synopsis: "Fast, portable, and opinionated build system"
description: """\
dune is a build system that was designed to simplify the release of
Expand Down Expand Up @@ -38,13 +38,11 @@ conflicts: [
"dune-release" {< "1.3.0"}
"js_of_ocaml-compiler" {< "3.6.0"}
"jbuilder" {= "transition"}
"ocaml-base-compiler" {= "5.0.0~alpha0"}
"ocaml-variants" {= "5.0.0~alpha0+options"}
]
build: [
["ocaml" "bootstrap.ml" "-j" jobs]
["ocaml" "boot/bootstrap.ml" "-j" jobs]
[
"./dune.exe"
"./_boot/dune.exe"
"build"
"dune.install"
"--release"
Expand All @@ -56,10 +54,10 @@ build: [
]
dev-repo: "git+https://github.com/ocaml/dune.git"
url {
src: "https://github.com/ocaml/dune/releases/download/3.4.1/dune-3.4.1.tbz"
src: "https://github.com/ocaml/dune/releases/download/3.7.0/dune-3.7.0.tbz"
checksum: [
"sha256=299fa33cffc108cc26ff59d5fc9d09f6cb0ab3ac280bf23a0114cfdc0b40c6c5"
"sha512=cb425d08c989fd27e1a87a6c72f37494866b508b0fe4ec05070adad995a99710b223a9047b6649776f63943dafb61903eefe4d5efde4c439103a89e2d6ff5337"
"sha256=e2d637c9d080318fedf5e71d2a29fb367624f82ac4a26e83df2b3a03550528b8"
"sha512=586e47ee45cd53a8c13095bde0b47de99aad9462d0a52199362140b5b654ca862597fa9f27f729a8cc594684ac46858848f9fa76f8f06dc8dc8ab8b1186a3295"
]
}
x-commit-hash: "ac188544b55357c1fff277f54d1481d28a634e19"
x-commit-hash: "d3d628f2eda2278bd2df6e37452d8693f367fcfd"
21 changes: 0 additions & 21 deletions tools/no-duplicates-check-upstream-extra-dummy.bash

This file was deleted.

27 changes: 0 additions & 27 deletions tools/no-duplicates-check-xs-toolstack.bash

This file was deleted.

43 changes: 43 additions & 0 deletions tools/no-duplicates-check.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash

set -euo pipefail

function check_no_duplicates {
packages="$1"
allowed_dupes_file="$2"
for pkg in $packages; do
the_versions=$(opam info -f all-versions "$pkg")
versions=$(echo "$the_versions" | wc -w)
if [ "$versions" -gt 1 ] && echo "$pkg" | grep -vqf "$allowed_dupes_file" ; then
>&2 echo "ERROR $pkg has multiple versions: $the_versions"
exit 1
fi
done
}

# makes sure no ordinary opam packages have more than a single version
# the only exception is xenctrl.
# This is required because of how the rpm distributions are built: they
# try to install all versions of all ordinary packages, which fails because
# the versions of a single package are never compatible.
# xenctrl has 2 versions: dummy and master
# several versions of the compiler might be wanted for testing:
# ocaml, ocaml-system, ocaml-base-compiler
toolstack_packages=$(opam list --required-by "xs-toolstack" --recursive --short)
toolstack_dupes=".github/duplicates-xs-toolstack.txt"
echo checking xs-toolstack...
check_no_duplicates "$toolstack_packages" "$toolstack_dupes"

# When preparing to switch ocaml compiler versions, several versions of
# developer tools need multiple versions as each version only allows a single
# version of the compiler.
# several versions of the compiler might be wanted for testing:
# ocaml, ocaml-system, ocaml-base-compiler, ocaml-config
# several versions of the dev tools might be needed:
# merlin, ocaml-lsp-server
extra_packages=$(opam list --required-by "upstream-extra-dummy" --recursive --short)
extra_dupes=".github/duplicates-upstream-extra.txt"
echo checking upstream-extra-dummy...
check_no_duplicates "$extra_packages" "$extra_dupes"

echo OK

0 comments on commit 0962059

Please sign in to comment.