Skip to content

Commit

Permalink
Merge pull request #5779 from kit-ty-kate/rel-2.2.0-beta1
Browse files Browse the repository at this point in the history
Release 2.2.0~beta1
  • Loading branch information
kit-ty-kate committed Jan 17, 2024
2 parents a358d94 + f0ce9cc commit cb228ac
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 46 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.ml
Expand Up @@ -293,7 +293,7 @@ let analyse_job ~oc ~workflow ~platforms ~keys f =
++ only_with Windows (git_lf_checkouts ~cond:(Predicate(true, Runner Windows)) ~shell:"cmd" ~title:"Configure Git for Windows" ())
++ checkout ()
++ run "Determine cache keys" ~id:"keys" keys
++ cache ?cond:linux_guard ~key_prefix:"steps.keys" ~check_only:true Archives
++ cache ?cond:linux_guard ~key_prefix:"steps.keys" ~check_only:true Archives
++ build_cache ?cond:not_windows_guard Archives
++ end_job f

Expand Down Expand Up @@ -340,13 +340,19 @@ let main_build_job ~analyse_job ~cygwin_job ?section runner start_version ~oc ~w
++ run "Build" ["bash -exu .github/scripts/main/main.sh " ^ host]
++ not_on Windows (run "Test (basic)" ["bash -exu .github/scripts/main/test.sh"])
++ only_on Windows (run ~cond:(Predicate(false, EndsWith("matrix.host", "-pc-cygwin"))) "Test \"static\" binaries on Windows" ["ldd ./opam.exe | test \"$(grep -v -F /cygdrive/c/Windows/)\" = ''"])
++ only_on Windows
(uses "Upload opam binaries for Windows"
~cond:(Predicate(true, EndsWith("matrix.host", "-pc-windows")))
~withs:[ ("name", Literal ["opam-exe-${{ matrix.host }}-${{ matrix.ocamlv }}-${{ matrix.build }}"]);
("path", Literal ["D:\\Local\\bin\\opam.exe"; "D:\\Local\\bin\\opam-installer.exe"; "D:\\Local\\bin\\opam-putenv.exe"]) ]
"actions/upload-artifact@v3")
++ only_on Windows (run "Test (basic - Cygwin)" ~cond:(Predicate(true, EndsWith("matrix.host", "-pc-cygwin"))) ["bash -exu .github/scripts/main/test.sh"])
++ only_on Windows (run "Test (basic - native Windows)" ~env:[("OPAMROOT", {|D:\a\opam\opam\.opam|})] ~shell:"cmd" ~cond:(Predicate(false, EndsWith("matrix.host", "-pc-cygwin")))
({|set Path=D:\Cache\ocaml-local\bin;%Path%|} ::
{|if "${{ matrix.host }}" equ "x86_64-pc-windows" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"|} ::
{|if "${{ matrix.host }}" equ "i686-pc-windows" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat"|} ::
run_or_fail [
{|opam init --yes --bare default git+file://D:/opam-repository#${{ env.OPAM_TEST_REPO_SHA }}|};
{|opam init --yes --bare default git+file://D:/opam-repository#${{ env.OPAM_TEST_REPO_SHA }} --no-git-location|};
{|opam switch --yes create default ocaml-system|};
{|opam env|};
{|opam install --yes lwt|};
Expand Down Expand Up @@ -446,7 +452,7 @@ let hygiene_job (type a) ~analyse_job (platform : a platform) ~oc ~workflow f =
++ install_sys_dune [os_of_platform platform]
++ checkout ()
++ cache Archives
++ uses "Get changed files" ~id:"files" (* ~continue_on_error:true see https://github.com/jitterbit/get-changed-files/issues/19 *) "Ana06/get-changed-files@v2.2.0" (* see https://github.com/jitterbit/get-changed-files/issues/55 ; Ana06'fork contains #19 and #55 fixes *)
++ uses "Get changed files" ~id:"files" (* ~continue_on_error:true see https://github.com/jitterbit/get-changed-files/issues/19 *) "Ana06/get-changed-files@v2.2.0" (* see https://github.com/jitterbit/get-changed-files/issues/55 ; Ana06'fork contains #19 and #55 fixes *)
++ run "Changed files list" [
"for changed_file in ${{ steps.files.outputs.modified }}; do";
" echo \"M ${changed_file}.\"";
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Expand Up @@ -207,7 +207,7 @@ jobs:
- name: Test "static" binaries on Windows
if: endsWith(matrix.host, '-pc-cygwin') == false
run: ldd ./opam.exe | test "$(grep -v -F /cygdrive/c/Windows/)" = ''
- name: 'Upload opam binaries for Windows'
- name: Upload opam binaries for Windows
if: endsWith(matrix.host, '-pc-windows')
uses: actions/upload-artifact@v3
with:
Expand Down
43 changes: 43 additions & 0 deletions CHANGES
Expand Up @@ -3,6 +3,49 @@ repositories (changes that are automatically handled by the format upgrade tools
are not marked). Those prefixed with "(+)" are new command/option (since
2.1.0~alpha2).

2.2.0~beta1:
* Check and advertise to use Git for Windows [#5718 @rjbou - fix #5617]
* (+) Add the `--git-location` and `--no-git-location` cli arguments
* (+) Add a new `git-location` modifiable opam option on Windows
* When compiling opam on Windows with MinGW, the resulting opam binary now
contains libstdc++ instead of requiring the DLL to be distributed alongside
it or present in the environment [#5680 @kit-ty-kate - fixes #5647]
* Add `./configure --enable-static` to compile the opam binary statically
on Linux
* Fix `opam env` containing carriage return on Cygwin
[#5715 @dra27 @rjbou @kit-ty-kate - fix #5684]
* Remove stray comments from pwsh and cmd env
* Fix debug logs showing up regardless of verbosity on
macOS 12.7.1 / 13.6.3 / 14.2 and FreeBSD [#5769 @kit-ty-kate]
* Upgrade to, and require mccs >= 1.1+17
* Fix `opam tree --dev` [#5687 @rjbou - fix #5675]
* Fix `opam tree --no-switch`. Instead of emptying the current switch from its
installed packages, it load a fresh virtual switch [#5687 @rjbou - fix #5675]
* Display a more precise message when Ctrl-C'ing during an opam switch creation
("Switch left partially installed") [#5713 @rjbou - fix #5710]
* Improve and fix the release scripts (already used for 2.2.0~alpha3)
* Workaround incorrect `NGROUPS_MAX` in `<limits.h>` in musl for release
builds [#5383 @dra27]
* Fix check for adding `-lsha_stubs` only on `master` on OpenBSD
[#5733 @punchagan]
* Improve the documentation [#5775 lukstafi]
* Improve and extend the tests [#5687 #5742 @rjbou]
* Improve the test infrastructure [#5723 @dra27]
* API changes:
* `OpamCoreConfig`: add `git_location` field [#5718 @rjbou ]
* `OpamStd.Env.cyg_env`: add git location argument and labels
`cygbin` and `git_location` [#5718 @rjbou]
* `OpamSystem.apply_cygpath`: runs `cygpath` over the argument
[#5723 @dra27 - function itself added in #3348]
* `OpamFile.Config`: add git-location field and its functions
[#5718 @rjbou]
* `OpamClient`: on `init` and `reinit` add git lookup in windows
checks [#5718 @rjbou]
* `OpamClient.init`: add option `git-location` argument for git
binary location configuration [#5718 @rjbou]
* `OpamTreeCommand.run`: remove optional argument `no_switch`
[@rjbou #5687]

2.2.0~alpha3:
* Add `x-env-path-rewrite` extensions field to specify the rewriting rules for
environment variables defined in `setenv` and `build-env`, useful for
Expand Down
18 changes: 9 additions & 9 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion configure.ac
@@ -1,5 +1,5 @@
dnl The line below must be formatted AC_INIT([opam],[VERSION]) with no extra spaces
AC_INIT([opam],[2.2.0~alpha4~dev])
AC_INIT([opam],[2.2.0~beta1])
AC_COPYRIGHT(Copyright 2012-2019 OcamlPro SAS)

AC_CONFIG_MACRO_DIR([m4])
Expand Down
15 changes: 0 additions & 15 deletions master_changes.md
Expand Up @@ -11,15 +11,12 @@ moved, etc.), please update the _API updates_ part (it helps opam library
users)

## Version
* Bump version to 2.2.0~alpha4~dev [#5732 @kit-ty-kate]

## Global CLI

## Plugins

## Init
* Check and advertise to use Git for Windows [#5718 @rjbou - fix #5617]
* Add the `--git-location` and `--no-git-location` arguments [#5718 @rjbou]

## Config report

Expand All @@ -30,7 +27,6 @@ users)
## Remove

## Switch
* Precise message for Ctrl-c-ed opam switch creation "Switch left partially installed" [#5713 @rjbou - fix #5710]

## Config

Expand All @@ -41,13 +37,10 @@ users)
## Show

## Var/Option
* Add a new git-location option on Windows [#5718 @rjbou]

## Update / Upgrade

## Tree
* Fix `--dev` option, force dev dependencies when option is given [#5687 @rjbou - fix #5675]
* Fix `--no-switch` option, instead of emptying switch from it installed packages, load a virtual switch at the beginning when `--no-switch` is given [#5687 @rjbou - fix #5675]

## Exec

Expand All @@ -62,8 +55,6 @@ users)
## Clean

## Env
* Fix `opam env` containing carriage return on Cygwin [#5715 @dra27 @rjbou @kit-ty-kate - fix #5684]
* Remove stray comments from pwsh and cmd env [#5715 @dra27]

## Opamfile

Expand All @@ -76,15 +67,10 @@ users)
## VCS

## Build
* Vendor mccs.1.1+17 [#5769 @kit-ty-kate]
* Require mccs >= 1.1+17 [#5769 @kit-ty-kate]
* Add ./configure --enable-static to compile the opam binary statically [#5680 @kit-ty-kate - fixes #5647]

## Infrastructure

## Release scripts
* Workaround incorrect `NGROUPS_MAX` in `<limits.h>` in musl for release builds [#5383 @dra27]
* Fix check for adding `-lsha_stubs` only on `master` on OpenBSD [#5733 @punchagan]

## Admin

Expand All @@ -95,7 +81,6 @@ users)
## Opam file format

## Solver
* Fix debug logs showing up regardless of verbosity on macOS 12.7.1 / 13.6.3 / 14.2 and FreeBSD [#5769 @kit-ty-kate]

## Client

Expand Down
2 changes: 1 addition & 1 deletion opam-client.opam
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.2.0~alpha4~dev"
version: "2.2.0~beta1"
synopsis: "Client library for opam 2.2"
description: """
Actions on the opam root, switches, installations, and front-end.
Expand Down
2 changes: 1 addition & 1 deletion opam-core.opam
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.2.0~alpha4~dev"
version: "2.2.0~beta1"
synopsis: "Core library for opam 2.2"
description: """
Small standard library extensions, and generic system interaction modules used by opam.
Expand Down
2 changes: 1 addition & 1 deletion opam-devel.opam
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.2.0~alpha4~dev"
version: "2.2.0~beta1"
synopsis: "Bootstrapped development binary for opam 2.2"
description: """
This package compiles (bootstraps) opam. For consistency and safety of the installation, the binaries are not installed into the PATH, but into lib/opam-devel, from where the user can manually install them system-wide.
Expand Down
2 changes: 1 addition & 1 deletion opam-format.opam
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.2.0~alpha4~dev"
version: "2.2.0~beta1"
synopsis: "Format library for opam 2.2"
description: """
Definition of opam datastructures and its file interface.
Expand Down
2 changes: 1 addition & 1 deletion opam-installer.opam
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.2.0~alpha4~dev"
version: "2.2.0~beta1"
synopsis: "Installation of files to a prefix, following opam conventions"
description: """
opam-installer is a small tool that can read *.install files, as defined by opam [1], and execute them to install or remove package files without going through opam.
Expand Down
2 changes: 1 addition & 1 deletion opam-repository.opam
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.2.0~alpha4~dev"
version: "2.2.0~beta1"
synopsis: "Repository library for opam 2.2"
description: """
This library includes repository and remote sources handling, including curl/wget, rsync, git, mercurial, darcs backends.
Expand Down
2 changes: 1 addition & 1 deletion opam-solver.opam
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.2.0~alpha4~dev"
version: "2.2.0~beta1"
synopsis: "Solver library for opam 2.2"
description: """
Solver and Cudf interaction. This library is based on the Cudf and Dose libraries, and handles calls to the external solver from opam.
Expand Down
2 changes: 1 addition & 1 deletion opam-state.opam
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.2.0~alpha4~dev"
version: "2.2.0~beta1"
synopsis: "State library for opam 2.2"
description: """
Handling of the ~/.opam hierarchy, repository and switch states.
Expand Down
2 changes: 1 addition & 1 deletion opam.opam
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "2.2.0~alpha4~dev"
version: "2.2.0~beta1"
synopsis: "Meta-package for Dune"
maintainer: "opam-devel@lists.ocaml.org"
authors: [
Expand Down
16 changes: 8 additions & 8 deletions tests/reftests/swhid.unix.test
Expand Up @@ -26,7 +26,7 @@ Clearing cache of downloaded files
### <pkg:snappy-ko.2>
opam-version: "2.0"
url {
src: "https://fa.ke/url.tar.gz"
src: "https://fake.exe/url.tar.gz"
checksum: "md5=039a77d9ffb9b22ab845df30436390c1"
}
### opam option download-command=curl
Expand All @@ -39,7 +39,7 @@ The following actions will be performed:
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] Failed to get sources of snappy-ko.2: Download command failed

OpamSolution.Fetch_fail("https://fa.ke/url.tar.gz (Download command failed: \"curl --write-out %{http_code}\\n --retry 3 --retry-delay 2 --user-agent opam/current -L -o ${BASEDIR}/OPAM/fallback/.opam-switch/sources/snappy-ko.2/url.tar.gz.part -- https://fa.ke/url.tar.gz\" exited with code 6)")
OpamSolution.Fetch_fail("https://fake.exe/url.tar.gz (Download command failed: \"curl --write-out %{http_code}\\n --retry 3 --retry-delay 2 --user-agent opam/current -L -o ${BASEDIR}/OPAM/fallback/.opam-switch/sources/snappy-ko.2/url.tar.gz.part -- https://fake.exe/url.tar.gz\" exited with code 6)")


<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Expand All @@ -53,7 +53,7 @@ Clearing cache of downloaded files
### <pkg:snappy-swhid-dir.2>
opam-version: "2.0"
url {
src: "https://fa.ke/url.tar.gz"
src: "https://fake.exe/url.tar.gz"
checksum: "md5=039a77d9ffb9b22ab845df30436390c1"
mirrors: "https://swhid.opam.ocaml.org/swh:1:dir:9f2be900491e1dabfc027848204ae01aa88fc71d"
}
Expand All @@ -68,7 +68,7 @@ The following actions will be performed:
Processing 1/3: [snappy-swhid-dir.2: http]
[ERROR] Failed to get sources of snappy-swhid-dir.2: Download command failed

OpamSolution.Fetch_fail("https://fa.ke/url.tar.gz (Download command failed: \"curl --write-out %{http_code}\\n --retry 3 --retry-delay 2 --user-agent opam/current -L -o ${BASEDIR}/OPAM/fallback/.opam-switch/sources/snappy-swhid-dir.2/url.tar.gz.part -- https://fa.ke/url.tar.gz\" exited with code 6)")
OpamSolution.Fetch_fail("https://fake.exe/url.tar.gz (Download command failed: \"curl --write-out %{http_code}\\n --retry 3 --retry-delay 2 --user-agent opam/current -L -o ${BASEDIR}/OPAM/fallback/.opam-switch/sources/snappy-swhid-dir.2/url.tar.gz.part -- https://fake.exe/url.tar.gz\" exited with code 6)")


<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Expand All @@ -86,7 +86,7 @@ The following actions will be performed:
- install snappy-swhid-dir 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Source https://fa.ke/url.tar.gz is not available. Do you want to try to retrieve it from Software Heritage cache (https://www.softwareheritage.org)? It may take few minutes. [y/n] y
Source https://fake.exe/url.tar.gz is not available. Do you want to try to retrieve it from Software Heritage cache (https://www.softwareheritage.org)? It may take few minutes. [y/n] y
-> retrieved snappy-swhid-dir.2 (SWH fallback)
-> installed snappy-swhid-dir.2
Done.
Expand All @@ -108,7 +108,7 @@ The following actions will be performed:
- install snappy-swhid-dir 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Source https://fa.ke/url.tar.gz is not available. Do you want to try to retrieve it from Software Heritage cache (https://www.softwareheritage.org)? It may take few minutes. [y/n] y
Source https://fake.exe/url.tar.gz is not available. Do you want to try to retrieve it from Software Heritage cache (https://www.softwareheritage.org)? It may take few minutes. [y/n] y
-> retrieved snappy-swhid-dir.2 (SWH fallback)
-> installed snappy-swhid-dir.2
Done.
Expand All @@ -119,7 +119,7 @@ Set to 'curl' the field download-command in global configuration
### <pkg:snappy-swhid-ko.2>
opam-version: "2.0"
url {
src: "https://fa.ke/url.tar.gz"
src: "https://fake.exe/url.tar.gz"
checksum: "md5=039a77d9ffb9b22ab845df30436390c1"
mirrors: "https://swhid.opam.ocaml.org/swh:1:dir:0000000000000000000000000000000000000000"
}
Expand All @@ -129,7 +129,7 @@ The following actions will be performed:
- install snappy-swhid-ko 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Source https://fa.ke/url.tar.gz is not available. Do you want to try to retrieve it from Software Heritage cache (https://www.softwareheritage.org)? It may take few minutes. [y/n] y
Source https://fake.exe/url.tar.gz is not available. Do you want to try to retrieve it from Software Heritage cache (https://www.softwareheritage.org)? It may take few minutes. [y/n] y
[ERROR] Failed to get sources of snappy-swhid-ko.2: SWH fallback: Unknown swhid

OpamSolution.Fetch_fail("SWH fallback: Unknown swhid")
Expand Down

0 comments on commit cb228ac

Please sign in to comment.