!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

209 Members
60 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
31 Jul 2023
@lily:lily.flowersLily FosterIf you really are needing deps from both in the same cache20:31:06
@lily:lily.flowersLily FosterI wonder if we should support caching from multiple lockfiles20:31:55
@robert:funklause.dedotlambda
In reply to @lily:lily.flowers
If you really are needing deps from both in the same cache
Webpack (from /packages/pyright/package.json) needs glob (from /package.json). No idea why it's not automatically included as a dependency of the former
20:50:34
@gdamjan:spodeli.orggdamjan
In reply to @hexa:lossy.network
cc gdamjan they want the package.json
this Martin guy lied me
20:52:01
@lily:lily.flowersLily Foster
In reply to @robert:funklause.de
Webpack (from /packages/pyright/package.json) needs glob (from /package.json). No idea why it's not automatically included as a dependency of the former
Because lerna is hell
20:53:56
@lily:lily.flowersLily FosterWait you need from two package-lock.json files right? Two package.json files is normal for monorepos with npm workspaces or something20:54:40
@robert:funklause.dedotlambda
In reply to @lily:lily.flowers
Wait you need from two package-lock.json files right? Two package.json files is normal for monorepos with npm workspaces or something
Yes indeed. Glob is not present in packages/pyright/package-lock.json.
20:56:04
@lily:lily.flowersLily FosterAlright. I might make a PR to support passing multiple lockfiles for the same hash though20:57:08
@lily:lily.flowersLily Foster* Alright. I might make a PR to support passing multiple lockfiles for the same hash then20:57:15
@lily:lily.flowersLily Foster* Alright. I might make a PR to support passing multiple lockfiles for the same cache then20:59:20
@robert:funklause.dedotlambda

Actually glob does exist in packages/pyright/package-lock.json so I'm not sure why I get

[webpack-cli] Failed to load '/build/source/packages/pyright/webpack.config.js' config
[webpack-cli] Error: Cannot find module 'glob'
Require stack:
- /build/source/build/lib/webpack.js
- /build/source/packages/pyright/webpack.config.js
- /build/source/packages/pyright/node_modules/webpack-cli/lib/webpack-cli.js
- /build/source/packages/pyright/node_modules/webpack-cli/lib/bootstrap.js
- /build/source/packages/pyright/node_modules/webpack-cli/bin/cli.js
- /build/source/packages/pyright/node_modules/webpack/bin/webpack.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/build/source/build/lib/webpack.js:3:14)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/build/source/build/lib/webpack.js',
    '/build/source/packages/pyright/webpack.config.js',
    '/build/source/packages/pyright/node_modules/webpack-cli/lib/webpack-cli.js',
    '/build/source/packages/pyright/node_modules/webpack-cli/lib/bootstrap.js',
    '/build/source/packages/pyright/node_modules/webpack-cli/bin/cli.js',
    '/build/source/packages/pyright/node_modules/webpack/bin/webpack.js'
  ]
}
21:04:39
@lily:lily.flowersLily Foster
In reply to @robert:funklause.de

Actually glob does exist in packages/pyright/package-lock.json so I'm not sure why I get

[webpack-cli] Failed to load '/build/source/packages/pyright/webpack.config.js' config
[webpack-cli] Error: Cannot find module 'glob'
Require stack:
- /build/source/build/lib/webpack.js
- /build/source/packages/pyright/webpack.config.js
- /build/source/packages/pyright/node_modules/webpack-cli/lib/webpack-cli.js
- /build/source/packages/pyright/node_modules/webpack-cli/lib/bootstrap.js
- /build/source/packages/pyright/node_modules/webpack-cli/bin/cli.js
- /build/source/packages/pyright/node_modules/webpack/bin/webpack.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/build/source/build/lib/webpack.js:3:14)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/build/source/build/lib/webpack.js',
    '/build/source/packages/pyright/webpack.config.js',
    '/build/source/packages/pyright/node_modules/webpack-cli/lib/webpack-cli.js',
    '/build/source/packages/pyright/node_modules/webpack-cli/lib/bootstrap.js',
    '/build/source/packages/pyright/node_modules/webpack-cli/bin/cli.js',
    '/build/source/packages/pyright/node_modules/webpack/bin/webpack.js'
  ]
}
Hmm it's trying to require it without installing it first. When is it trying to call webpack? Do you have a derivation I can play with?
21:06:12
@robert:funklause.dedotlambda
In reply to @lily:lily.flowers
Hmm it's trying to require it without installing it first. When is it trying to call webpack? Do you have a derivation I can play with?
https://github.com/dotlambda/nixpkgs/tree/pyright-buildNpmPackage
21:08:42
@robert:funklause.dedotlambda It happens after Executing npmBuildHook so it should be installed 21:09:48
@lily:lily.flowersLily FosterYeah it's correctly trying in build phase21:10:08
@lily:lily.flowersLily FosterHmmm21:10:11
@robert:funklause.dedotlambdaI think I got it21:11:15
@lily:lily.flowersLily Foster Oh I bet doing the cd in the postPatch is too late 21:13:43
@robert:funklause.dedotlambdaThe problem is this line: https://github.com/microsoft/pyright/blob/1.1.319/packages/pyright/webpack.config.js#L821:14:00
@lily:lily.flowersLily FosterOh. Or that21:14:11
@robert:funklause.dedotlambda
In reply to @lily:lily.flowers
Oh I bet doing the cd in the postPatch is too late
also tried sourceRoot
21:14:14
@robert:funklause.dedotlambda Now I get Error: Cannot find module 'jsonc-parser' and would need /package-lock.json though I can patch out the dependency on jsonc-parser.
Doing so leads to lots of missing modules required from packages/pyright-internal :(
21:21:18
@gdamjan:spodeli.orggdamjan
In reply to @hexa:lossy.network

ERROR:CLI Error: Could not find package.json up from /nix/store/qvpjwskw6j9n4g8749snwj5b6nk9xsb1-matrix-appservice-irc-1.0.1/bin/matrix-appservice-irc

why didn't I see this though?!
21:22:12
@hexa:lossy.networkhexai havent got the feintest idea21:23:13
@lily:lily.flowersLily Foster
In reply to @robert:funklause.de
Now I get Error: Cannot find module 'jsonc-parser' and would need /package-lock.json though I can patch out the dependency on jsonc-parser.
Doing so leads to lots of missing modules required from packages/pyright-internal :(
Yeah I figured if they were using lerna you'd run into issues with intra-repo dependencies. Which lerna does custom handling for :/
21:24:32
@lily:lily.flowersLily FosterAnd splits them across package-lock.json files because they hate nice things21:25:19
@robert:funklause.dedotlambdaI pushed all my changes, feel free to play around with it. I'll stop investing time in pyright for now21:26:06
@lily:lily.flowersLily Foster
In reply to @robert:funklause.de
I pushed all my changes, feel free to play around with it. I'll stop investing time in pyright for now
I may. The problem is lerna is gonna need work on our side to be actually usable instead of being able to hack around it
21:27:29

Show newer messages


Back to Room ListRoom Version: 6