Code Monkey home page Code Monkey logo

Comments (8)

BeeeQueue avatar BeeeQueue commented on June 17, 2024 2

https://github.com/BeeeQueue/qnm-repro

If you install using npm it shows 700~ deps, and if you remove node_modules and install using pnpm it shows 8

from qnm.

ranyitz avatar ranyitz commented on June 17, 2024 2

Thanks @BeeeQueue.

You are right. While I made qnm not crash on pnpm repositories, what it does is just list the top-level modules within the node_modules.

pnpm works differently from npm/yarn in a way that it'll create links for every package, and it will place its own dependencies as its siblings

image

Today, qnm's algorithm is to run on a workspace and analyze it from top to bottom, it doesn't try to go "up" in the directory structure like Node's resolution algorithm does.

This is the reason you see only 8 dependencies when running qnm today.


qnm was created because, for years, package managers compromised on correctness for install size by hoisting packages, which created many problems that needed to be debugged. As I'm not a pnpm user myself, it would be very interesting for me to know what kind of things pnpm users need to debug, and what information they expect to get from qnm.

Once I'll understand the need, it would be possible to implement a solution for it.

from qnm.

borekb avatar borekb commented on June 17, 2024 1

It's an internal repo, unfortunately, and I can't promise that I'll remember to create a public repro 😄. But you're awesome for adding pnpm support so quickly!

from qnm.

ranyitz avatar ranyitz commented on June 17, 2024

Hey @borekb and thanks for opening this issue!

I've looked into this use case and added support for both yarn-3 with pnpm linker, pnpm and the case of circular symlinks.

on qnm version 2.10.0

Please let me know if it works for you

from qnm.

borekb avatar borekb commented on June 17, 2024

Wow that was fast!

I tried in our repo which uses Yarn workspaces and it failed after about 1 minute with this error:

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

I guess Yarn workspaces might be the problem. I don't really have a non-workspaces project I could test right now but still appreciate your super-fast reaction!

from qnm.

ranyitz avatar ranyitz commented on June 17, 2024

Hey @borekb, thanks for testing it!

Actually, qnm supports yarn workspaces, I'm not sure what is the issue 🤷‍♂️
I'd love to debug it though, so if you can find a repo that reproduces it be happy to debug it.

from qnm.

BeeeQueue avatar BeeeQueue commented on June 17, 2024

The pnpm support seems to only recognize the top-level dependencies from my testing of running qnm in any repo using pnpm

from qnm.

ranyitz avatar ranyitz commented on June 17, 2024

@BeeeQueue can you create a repro and describe what do you expect to see in oppose to what qnm shows today? I believe it could help shape the output according to what's relevant for the use case

from qnm.

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.