Giter VIP home page Giter VIP logo

haskell-example's Introduction

haskell-example's People

Contributors

jonathanknowles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ink-splatters

haskell-example's Issues

cabal freeze file is not so suitable as cache key

Thanks for publishing this action! Here a comment on cache keys:

- name: Freeze
run: >
cabal freeze
--builddir=${{ env.cabal-build-dir }}
- name: Cache
uses: actions/cache@v3
env:
hash: ${{ hashFiles('cabal.project.freeze') }}
with:
key: ${{ matrix.os }}-ghc-${{ matrix.ghc }}-${{ env.hash }}
restore-keys: |
${{ matrix.os }}-ghc-${{ matrix.ghc }}-

Since cabal.project.freeze will contain the Hackage repository timestamp, it will be different in almost every single CI run. Thus, it might not be a suitable cache key, being similar to ${{ github.sha }}.

I settled for dist-newstyle/cache/plan.json instead which only contains the package versions, no time stamps. It is generated by cabal build --dry-run.

See e.g. https://github.com/agda/agda/blob/e018e58453a06e4c4a15c9b81396cbcd1e2c640f/src/github/workflows/cabal.yml#L148-L171

There might be reasons why you want the primary key being different in each run, but then it is easier to just use ${{ github.sha }}.

Remove purge step from build workflow.

Task

Remove the following "purge" step from the build workflow:

- name: Environment (Purge)
# The version of `ghc` that comes pre-installed on runner images does
# not have documentation for core libraries. This makes it impossible
# to build documentation with working hyperlinks to those libraries. To
# solve this problem, we purge the existing installation, which enables
# the next build step to install ghc from scratch, with documentation.
run: ghcup nuke || true

Dependencies

This task can only be performed after actions/runner-images#6972 has been merged.

Context

The "purge" step was introduced to work around issues caused by incomplete installations of GHC on certain GitHub runner images, where documentation for GHC core libraries (such as base) is completely missing:

haskell/actions#176

The root cause is a section of code that deletes documentation for all GHC core libraries:

https://github.com/actions/runner-images/blob/c6393f1f231a4bce8aaeb2665d1312b14271169b/images/linux/scripts/installers/haskell.sh#L34-L39

The lack of documentation for GHC core libraries makes it impossible to build haddock documentation with working hyperlinks to those core libraries.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.