Git Product home page Git Product logo

Comments (5)

cpojer avatar cpojer commented on May 26, 2024

I was asked whether I would be happy to contribute this change, but instead I'd be happy to pay $100 to whoever fixes this in a satisfying way and shaving off about 20 seconds from my backend build time.

from pnpm.

weyert avatar weyert commented on May 26, 2024

wouldn’t the reverse make more sense as a flag to override/allow neverBuildDependencies so that it get ignored?

from pnpm.

cpojer avatar cpojer commented on May 26, 2024

I thought about it, but that means that it would have to be always specified when doing anything with pnpm (locally), which is a bit of a hassle and worse for DX, given that my default is I don't want it built except in some situations.

from pnpm.

zkochan avatar zkochan commented on May 26, 2024

If you have a dependency that doesn't work on all platforms, then this dependency should be an optional dependency. Optional dependencies are skipped on platforms that they don't support. And even they fail, the installation doesn't fail.

from pnpm.

cpojer avatar cpojer commented on May 26, 2024

I don't think optionalDependencies works for either use case that I outlined.

Omitting node-canvas

That works for direct dependencies, but in my case node-canvas is actually a transitive dependency so I cannot use optionalDependencies. The direct dependency (and my app) rely on the JS part of node-canvas for frontend code. It only requires the binaries for the backend pieces and server rendering.

Omitting @playwright/browser-chromium

Similarly, making @playwright/browser-chromium optional would not remove it from my docker install process since the install doesn't fail, it just downloads code that couldn't even run on that platform (and it logs as much).

from pnpm.

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.