Description
Describe the bug
The removal of the v1-sandbox
command (#6445) lacks a clear path for replacement and this issue is part of that cabal-install adventure! The first obvious step for obtaining something similar to sandbox functionality is to provide the --store-dir
argument to the v2-configure
command. However, usage of v2-install
with --lib
fails to utilize a local directory in a way that works. The v2-install --lib
functionality is incomplete or non-functional based on #6481 . This issue was filed to search for the best path forward, based on the v1-sandbox
warning issued in the past: Please file a bug if you cannot replicate a working v1- use case with the new-style commands.
.
To Reproduce
Steps to reproduce the behavior:
$ git clone https://github.com/CloudI/CloudI.git
$ cd CloudI/src
$ ./autogen.sh && ./configure --enable-haskell-support --with-integration-tests-ran && make
Usage with cabal-install >= 3.4 will break in:
https://github.com/CloudI/CloudI/blob/3256f29cf0b749e45b618a0216601ac1f9a9bd78/src/api/haskell/Makefile.am#L24
(past sandbox usage is shown in the same Makefile.am file). The install of the library there is meant to be used for creating integration tests executables in:
https://github.com/CloudI/CloudI/blob/3256f29cf0b749e45b618a0216601ac1f9a9bd78/src/tests/count/haskell/Makefile.am#L10-L13
https://github.com/CloudI/CloudI/blob/3256f29cf0b749e45b618a0216601ac1f9a9bd78/src/tests/http_req/haskell/Makefile.am#L10-L13
https://github.com/CloudI/CloudI/blob/3256f29cf0b749e45b618a0216601ac1f9a9bd78/src/tests/messaging/haskell/Makefile.am#L10-L13
https://github.com/CloudI/CloudI/blob/3256f29cf0b749e45b618a0216601ac1f9a9bd78/src/tests/msg_size/haskell/Makefile.am#L10-L13
https://github.com/CloudI/CloudI/blob/3256f29cf0b749e45b618a0216601ac1f9a9bd78/src/tests/null/haskell/Makefile.am#L10-L13
Expected behavior
I expected cabal v2-install --lib --package-env directory/
to work as a way to install a library for local use (similar to past sandbox use). I am not sure if this use-case is meant to be covered in the env
command in the future, as described at #6481 .
System information
- Ubuntu 22.04
- cabal-install 3.4.1.0 and 3.6.2.0
- GHC 9.0.2 and 9.2.4
Additional context
The goal is to ensure the build occurs with local dependencies, without an internet connection. This is basic repeatable build functionality.