Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

setup emits invalid outputs.cabal-store #281

Open
hololeap opened this issue Jul 22, 2023 · 3 comments
Open

setup emits invalid outputs.cabal-store #281

hololeap opened this issue Jul 22, 2023 · 3 comments
Labels
info needed More information needed from the reporter

Comments

@hololeap
Copy link

I'm getting warnings about caching failing to save, due to an invalid path. The path is being set by steps.setup.outputs.cabal-store.


With this step in my workflow file:

      # Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail.
      - name: Save cached dependencies
        uses: actions/cache/save@v3
        # Caches are immutable, trying to save with the same key would error.
        if: ${{ steps.cache.outputs.cache-primary-key != steps.cache.outputs.cache-matched-key }}
        with:
          path: ${{ steps.setup.outputs.cabal-store }}
          key: ${{ steps.cache.outputs.cache-primary-key }}

I get this warning in my action logs:

2023-07-22T19:44:45.8306847Z ##[group]Run actions/cache/save@v3
2023-07-22T19:44:45.8307113Z with:
2023-07-22T19:44:45.8307332Z   path: /home/runner/.cabal/store
2023-07-22T19:44:45.8307798Z   key: Linux-ghc-9.4.5-cabal-3.10.1.0-plan-dea241877e48b4db5e8324c458234b2a1304c699d91083652cdbbc17e6216f6d
2023-07-22T19:44:45.8308241Z   enableCrossOsArchive: false
2023-07-22T19:44:45.8308475Z ##[endgroup]
2023-07-22T19:44:45.9858342Z [warning]Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.
2023-07-22T19:44:45.9892067Z ##[warning]Cache save failed.

The location of the cabal store may have changed recently? Not sure.

2023-07-22T19:44:11.1962449Z ##[group]Preparing cabal environment
2023-07-22T19:44:11.3545187Z [command]/opt/hostedtoolcache/ghcup/0.1.19.4/x64/ghcup unset cabal
2023-07-22T19:44:11.3595420Z �[1m�[92m[ Info  ]�[0m�[0m Cabal successfully unset
2023-07-22T19:44:11.3703406Z ##[endgroup]
2023-07-22T19:44:11.3704190Z ##[group]Installing cabal version 3.10.1.0
2023-07-22T19:44:11.5434421Z [command]/opt/hostedtoolcache/ghcup/0.1.19.4/x64/ghcup whereis cabal 3.10.1.0
2023-07-22T19:44:11.5620065Z /usr/local/.ghcup/bin/cabal-3.10.1.0
2023-07-22T19:44:11.5620618Z 
2023-07-22T19:44:11.5621978Z Attempting to access tool cabal at location /opt/cabal/3.10/bin
2023-07-22T19:44:11.5623529Z Failed to access tool cabal at location /opt/cabal/3.10/bin
2023-07-22T19:44:11.5624073Z Attempting to access tool cabal at location /home/runner/.ghcup/bin
2023-07-22T19:44:11.5626511Z Succeeded accessing tool cabal at location /home/runner/.ghcup/bin
2023-07-22T19:44:11.7258640Z [command]/opt/hostedtoolcache/ghcup/0.1.19.4/x64/ghcup set cabal 3.10.1.0
2023-07-22T19:44:11.7936953Z �[1m�[93m[ Warn  ]�[0m�[0m [�]8;;https://errors.haskell.org/messages/GHCup-00330�\GHCup-00330�]8;;�\] cabal is shadowed by /home/runner/.ghcup/bin/cabal.
2023-07-22T19:44:11.7944490Z �[1m�[93m[ ...   ] �[0m�[0mThe upgrade will not be in effect, unless you remove /home/runner/.ghcup/bin/cabal
2023-07-22T19:44:11.7951071Z �[1m�[93m[ ...   ] �[0m�[0mor make sure /usr/local/.ghcup/bin comes before /home/runner/.ghcup/bin in PATH.
2023-07-22T19:44:11.7957394Z �[1m�[92m[ Info  ]�[0m�[0m Cabal 3.10.1.0 successfully set as default version
2023-07-22T19:44:11.8019022Z Found cabal 3.10.1.0 in cache at path /home/runner/.ghcup/bin. Setup successful.
2023-07-22T19:44:11.8020048Z ##[endgroup]
2023-07-22T19:44:11.8021059Z ##[group]Setting up cabal
2023-07-22T19:44:14.0232785Z Adding /home/runner/.cabal/bin to PATH
2023-07-22T19:44:14.0264430Z [command]/home/runner/.ghcup/bin/cabal update
2023-07-22T19:44:15.3200245Z Downloading the latest package list from hackage.haskell.org
2023-07-22T19:44:34.2468371Z Package list of hackage.haskell.org has been updated.
2023-07-22T19:44:34.2469461Z The index-state is set to 2023-07-22T17:00:39Z.
2023-07-22T19:44:34.2670618Z ##[endgroup]
@andreasabel
Copy link
Member

I get this warning in my action logs:

This link is expired. Do you have a valid link to the failing log?
Of interest is e.g. the version of the VM this workflow ran on.

The issue could be caused by a new location of .cabal/store thanks to the XDG adoption in cabal 3.10: https://github.com/haskell/cabal/issues?q=is%3Aissue+label%3A%22re%3A+xdg%22

@andreasabel andreasabel added the info needed More information needed from the reporter label Jul 24, 2023
@hololeap
Copy link
Author

@andreasabel

I put it in a gist.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info needed More information needed from the reporter
Projects
None yet
Development

No branches or pull requests

2 participants