v2-exec does not work properly without using v2-build first #6141
Labels
cabal-install: cmd/exec
can-workaround
There is a (maybe partial) workaround for the issue or missing feature
type: bug
Describe the bug
The
v2-exec
subcommand does not work properly if one has not usedv2-build
first, because it makes assumptions about the layout of thedist-newstyle
directory. In particular,dist-newstyle/tmp
exists; anddist-newstyle/packagedb/$compiler
.To Reproduce
Steps to reproduce the behavior:
Please use version-prefixed commands (e.g.
v2-build
orv1-build
) to avoid ambiguity.Expected behavior
I expect the first
cabal v2-exec ghci
to work, ideally even without runningv2-install
first.System informataion
Additional context
This came up while trying to replicate my
lambdabot
development process (which is currently based on a sandbox) withv2-*
tools. Notes:v2-repl
will not help in my actual use case because instead ofghci
I'd be runninglambdabot
and need an environment setup formueval
to find the installed libraries.v2-install
rather thanv2-build
because I'll be installing to a project-local store anyway, simulating a sandbox. I believe usingv2-install
makes it easier (compared tov2-build
) to get all the executables into one place.The text was updated successfully, but these errors were encountered: