Git Product home page Git Product logo

Comments (3)

axelboc avatar axelboc commented on May 26, 2024 4

The solution documented by actions/setup-node worked for me, but I ran into a limitation: I use Cypress, which downloads binaries in a post-install script and stores them in a ~/.cache/Cypress folder that is meant to be cached along with the pnpm store directory.

The maintainers of actions/setup-node are not willing to complexify the caching feature to solve this, and I understand their reasoning. The feature is really just for convenience and that's a good thing.

if pnpm/action-setup has cache built-in, things would've been a lot simpler.

I don't think pnpm/action-setup should attempt to deal with caching dependencies, whichever the approach:

  • I don't see the point of providing a convenience caching option since actions/setup-node already provides one (if it doesn't work for you @transitive-bullshit, then that's something to look into for sure).
  • Attempting to support more advanced caching scenarios like mine would basically require replicating actions/cache's configuration API, which seems pointless.

I do think, however, that the README should document the convenience caching method provided by actions/setup-node ... or at least link to it.

For advanced caching use cases, in my opinion, pnpm/action-setup should just do its best to make caching the pnpm store directory in a separate action as easy as possible. Right now, I think the main complexity comes from having an extra step to get the pnpm store's path (i.e. echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT). Any chance pnpm/action-setup could save the pnpm store path as an output so it can be used directly in actions/cache with path: ${{ steps.pnpm-install.outputs.storePath }}?

from action-setup.

KSXGitHub avatar KSXGitHub commented on May 26, 2024

The official actions/setup-node guide also recommends a completely different, simpler approach which doesn't seem to work.

Sounds like a bug on actions/setup-node behalf? I am not a maintainer of actions/setup-node so I can do nothing about it. I cannot just copy the guide on actions/setup-node to pnpm/action-setup because, if your words are to be believed, it doesn't work.

from action-setup.

KSXGitHub avatar KSXGitHub commented on May 26, 2024

But I do agree that currently, the only way to do cache is a bit to complex, if pnpm/action-setup has cache built-in, things would've been a lot simpler. I'm not going to implement it though, if someone else wants to tackle this, feel free.

from action-setup.

Related Issues (20)

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.