Hey all, I'm looking to contribute to this bug wit...
# contribute
Hey all, I'm looking to contribute to this bug with function serialization with pnpm packages. https://github.com/pulumi/pulumi/issues/10009 Wondering if anyone could give some suggestions on getting an environment setup like
pnpm link <path-to-@pulumi/pulumi>
in my pnpm package somehow to start playing around with the pulumi code
Hi Ryan! You wouldn't happen to be the person who opened the issue, are you? I'm not very familiar with PNPM. I'm more familiar with the confluence of issues that's reported in the linked issue. I'll provide a little context:
I'd suggest trying to identify why this upgrade fails. I'd use
git bisect
to determine which commit introduced the issue for PNPM. However, Pulumi doesn't officially support PNPM (more details below), so it's possible this results in a dead end. ------------------- Historical context which you might not care about: 1. Pulumi has a bug where it only accepts
files in the current directory, and can't scan upwards along the directory tree to find the
files. This is a Top 20 bug by upvote. (#7360) 2. We currently have a fix, but testing has been a nightmare. Given the importance of this issue, I really want to make sure this feature is tested so we don't create a regression in the future. I'll probably pick up this issue around the first week of April. 3. NX uses a monorepo setup, so the
file sits at the root of the repo, and Pulumi can't find it because of (1). (#11876, #11946) 4. This user is reporting that their Pulumi project is serializing all of the dependencies in their monorepo. It sounds to me like this is because they symlinked in the top-level package.json file -- essentially what I would expect. 5. The confounding factor to me is that Pulumi doesn't officially support PNPM at this time (#11751). Related issue: #3586. Having recently discussed this, I maintain the long-term solution is to add support for PNPM, Yarn Berry, and Deno by encapsulating dependency installation behind an interface (as described here). But all this info might be outside of the scope of your needs.
Hey sorry for the delay, I'm only working on side stuff a few days a week. I didn't open the issue but I encountered the issue. Using pulumi and pnpm pretty much worked flawlessly the entire time. This only area it failed is when I was using the pulumi "magical lambda function". It seems to auto bundle your code and somehow grabs your dependencies and this is where it was failing. Same error as the one in the issue I attached. Me personally I started to use PNPM because of how "realistic" the monorepo setup works. It hoists the modules to the roote node_modules/.pnpm/** folder and then all workspaces node_modules are symlinked to those, therefore there's no accidental usage of non defined packages in your package.json of a particular workspace. I think this would help pulumi in this case because it has no need to move upward to root package.json (in terms of pnpm workspaces) because everything it needs is in the current folder anyways and the magic happens with symlinking. The issue I was encountering though seems nothing to do with workspaces in pnpm but rather pnpm itself, I isolated the code into a separate package outside of a workspace and the same issue was happening, the issue linked I commented a repro. Also this info is great to hear thank you for providing it to me. I'll take a look and all the links you provided.
Is there a recommended development setup you point me to for attempting to work on this? There seems to be a lot of overhead if I just want to work on the nodejs side. I tried simply doing a yarn install on the pulumi repo for nodejs sdk, then linked it in my pnpm repo but my pulumi command (brew installed) says it can't find the package