haskell / haskell/cabal

`cabal v2-install`ed executables should be resilient against (partial) deletion of `.cabal/store`

Open
#7,221 9 comments 1 reaction 0 assignees View on GitHub
cabal-install: cmd/install re: v1-vs-v2 type: discussion
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

According to #6506, the default `--install-method` _on Windows_ is `copy` instead of `symlink`.
I think this is the more sensible default _in general_.
From `v1-install` I am used to get binaries in `.cabal/bin` that persist even if I clean up in `.cabal` the artifacts of old GHC versions. With the defaults of `v2-install`, cleaning up old GHCs breaks my binaries, as they are only symlinks.
E.g., I have in `.cabal/bin`
```
hTags -> ../store/ghc-8.8.3/hTgs-0.1.4-060a447d/bin/hTags
```
which is dead since I purged the `ghc-8.8.3` directory in `store`.
The new behavior is surprising to me and can be very annoying (e.g. in scenarios where I have an executable build by a old ghc version which I removed, but the compilation fails on the later ghc versions---it can take hours to recover a lost executable).

Proposal: Make `--install-method=copy` the default (instead of `=symlink`).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.