Skip to content

XDG: Broken cabal installation in macos 20240105 GHA runners #62

Closed as not planned
@jasagredo

Description

@jasagredo

These macos runners come with existing XDG directories for cabal. Since the start of the runner, the following files are present:

  • .config/cabal/config
  • .cache/cabal/packages/...

In this haskell-actions/setup there is a deliberate choice (decided in haskell/actions#210) to create ~/.cabal/bin (here) in order to disable XDG, however, cabal will still think it is using XDG because of the existence of ~/.config/cabal. See this logic.

I do not know which one should be the path forward:

  1. This action relocates/deletes those files in the MacOS runners if they exist.
  2. This action deletes those files in all runners if they exist to disable XDG always.
  3. Users of this action should take care of this when using MacOS runners.
  4. The MacOS runners should not create those files in the first place.
  5. The logic in Cabal should be made more accurate to even deal with cases where ~/.cabal and ~/.config/cabal/config exist but not ~/.cabal/config (as is happening here).

The 20240105 image is still very new, only 9.79% of rollout progress as I'm writing this, but this still has resulted in CI pipelines failing for example in Cabal itself. 1 2 and more if you look at the Validate workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions