haskell-actions / haskell-actions/setup

conflict between /home/runner/.cabal and /home/runner/.config/cabal/config

Open
#108 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
91
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Hi, I am seeing failures like:

2025-01-02T20:34:19.0988675Z flock xcffib.cabal cabal --config-file=./cabal.config new-run --minimize-conflict-set -j4 exe:xcffibgen -- --input ./proto/src --output ./xcffib
2025-01-02T20:34:19.1249266Z Warning: Both /home/runner/.cabal and /home/runner/.config/cabal/config exist
2025-01-02T20:34:19.1249706Z - ignoring the former.
2025-01-02T20:34:19.1250062Z It is advisable to remove one of them. In that case, we will use the remaining
2025-01-02T20:34:19.1250489Z one by default (unless '$CABAL_DIR' is explicitly set).
2025-01-02T20:34:19.6802799Z Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
2025-01-02T20:34:19.6803760Z update' to download it.
2025-01-02T20:34:19.6951914Z Resolving dependencies...
2025-01-02T20:34:19.6958135Z Error: [Cabal-7107]
2025-01-02T20:34:19.6958565Z Could not resolve dependencies:
2025-01-02T20:34:19.6959032Z [__0] trying: xcffib-1.6.0 (user goal)
2025-01-02T20:34:19.6959619Z [__1] unknown package: optparse-applicative (dependency of xcffib)
2025-01-02T20:34:19.6960341Z [__1] fail (backjumping, conflict set: optparse-applicative, xcffib)
2025-01-02T20:34:19.6961443Z After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: xcffib, optparse-applicative

but only sometimes, and only when the warning about /home/runner/.cabal and /home/runner/.config/cabal/config is printed.

Seems like the action sets up one of these directories and updates the hackage cache there, butthat only causes problems in some cases? Unclear exactly what's going on to me.

Full actions run here:

https://github.com/tych0/xcffib/actions/runs/12613197315/job/35150752203

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the workflow command using cabal.config and compare the /home/runner/.cabal and /home/runner/.config/cabal/config paths reported in the issue. Reproduce the intermittent setup in the linked GitHub Actions run, then trace which directory receives the Hackage cache. Done means the action consistently uses the intended Cabal configuration and dependency resolution succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, haskell, typescript
Domain
ci-cd, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.