commercialhaskell / commercialhaskell/stack

Store build logs for snapshot packages somewhere in the stack root directory

Open
#1,747 0 comments 0 reactions 0 assignees View on GitHub
awaiting pull request type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

Currently, build logs for snapshot packages get stored in the user's project .stack-work directory. This means they get cleared out when .stack-work gets blown away. I think we should store logs within a `.stack/snapshots////logs` directory.

The main purpose of this is to make it more tractable to debug circumstances where some installed package is broken / corrupted. For example, https://github.com/commercialhaskell/stack/issues/1718 and https://github.com/commercialhaskell/stack/issues/1686

In order to store as much information as possible, it makes sense to default to have cabal give it's verbose output. This way, we have better chances of determining what the issue is. One issue with this is that if there is an error while building, the user will be presented with the messy verbose log, rather than the clean normal log. I'm not sure if there's any way around this, so I suppose we will not be able to have a default of verbose cabal output. It might be good to be able to have it as a global setting, though.

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.