| 28 Jul 2023 |
Lily Foster | Oh, is it a yarn2nix problem or fetchYarnDeps problem? (If there is an open nixpkgs issue can you link it so I can add it to our project board too?) | 15:26:25 |
gdamjan | there probably isn't. not by me anyway | 15:27:00 |
Lily Foster | In reply to @gdamjan:spodeli.org there probably isn't. not by me anyway If you have the relevant info, would you mind opening one so I can add it then? Thank you! ❤️ | 15:27:50 |
gdamjan | yeah sure. can you send me a similar bug report so I know not to miss anything? | 15:28:32 |
gdamjan | it's a yarn2nix issue (it's what mkYarnPackage is using right) | 15:29:56 |
Lily Foster | In reply to @gdamjan:spodeli.org it's a yarn2nix issue (it's what mkYarnPackage is using right) You can use fetchYarnDeps with mkYarnPackage (in fact I'm pretty sure it was added originally for that reason, to avoid needing to vendor yarn.lock/yarn.nix when using mkYarnPackage). But if you aren't using fetchYarnDeps anywhere then yeah it's strictly a yarn2nix problem | 15:32:12 |
Lily Foster | In reply to @gdamjan:spodeli.org yeah sure. can you send me a similar bug report so I know not to miss anything? I mean here was a recent nodejs-related issue, if that's what you're asking for: https://github.com/NixOS/nixpkgs/issues/244285
I mostly just want a derivation to reproduce | 15:36:06 |
gdamjan | damn, I've deleted my failed try when I was trying other approaches | 15:36:32 |
gdamjan | I'll re-create it later | 16:00:34 |
Lily Foster | Okay, thank you!! | 16:01:11 |
| 29 Jul 2023 |
gdamjan | I couldn't reproduce. (since I don't remember what I did). | 23:41:39 |
gdamjan | https://gist.github.com/gdamjan/08901abe49baadf083034e93ed32ccbe
this builds matrix-appservice-irc, dependencies look mostly fine, but typescript is not built into javascript | 23:42:27 |
gdamjan | let's see what happens with a custom build phase
buildPhase = ''
export HOME=$(mktemp -d)
yarn --offline build
'';
| 23:46:23 |
gdamjan | ok seems to work | 23:49:00 |
gdamjan | 227M ./result/ | 23:49:16 |
Lily Foster | In reply to @gdamjan:spodeli.org ok seems to work --production probably | 23:49:58 |
Lily Foster | I meant that in reply to the 227M | 23:50:07 |
Lily Foster | Add that to yarn build arga | 23:50:13 |
Lily Foster | * Add that to yarn build args | 23:50:18 |
Lily Foster | (Sorry, I am on mobile) | 23:50:28 |
Lily Foster | Oh wait that goes on yarn install | 23:50:55 |
Lily Foster | Never mind | 23:51:01 |
gdamjan | btw, is fetchYarnDeps downloading all of these:
downloading https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz
downloading https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.18.tgz
downloading https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.18.tgz
downloading https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz
downloading https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz
downloading https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz
downloading https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz
downloading https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz
downloading https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz
| 23:56:29 |
Lily Foster | Yeah, if it's in the yarn.lock file it downloads it 🤷♀️ | 23:57:13 |
Lily Foster | And that's how esbuild decided to do their prebuilts (as deps that get written to the lockfile...) | 23:57:36 |
Lily Foster | It shouldn't exist in the final build at least | 23:57:49 |
gdamjan | what phase is the pruning of non-prod dependencies? | 23:58:20 |
Lily Foster | Whenever yarn install runs | 23:59:05 |
Lily Foster | * Whenever yarn install --production runs | 23:59:09 |
Lily Foster | Idk I'd have to pull up the yarn2nix code, but I remember it does phases rather, uh, wrong | 23:59:27 |