!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

203 Members
58 Servers

Load older messages


SenderMessageTime
18 Nov 2023
@raitobezarius:matrix.orgraitobezariusBut he uncovered a quadratic issue with Nix strings11:48:54
@raitobezarius:matrix.orgraitobezariusBecause substr is linear all the time as strings in Nix doesn't really know their own length11:49:14
@adis:blad.is@adis:blad.isHuh11:49:28
@adis:blad.is@adis:blad.is
In reply to @raitobezarius:matrix.org
You know that I nerdsnipped @tomberek on adding the parsing built-in based on a EBNF grammar (a packrat parser)
That would be cool to have.
11:50:50
@adis:blad.is@adis:blad.isBut for this case you really don't need fancy parsing, you just need json11:51:00
@raitobezarius:matrix.orgraitobezariusBut gigabyte/s JSON parsing:>12:00:28
@raitobezarius:matrix.orgraitobezariusIdk how fast is our JSON library12:00:43
@adis:blad.is@adis:blad.isFatet than our nix parser :p12:06:05
@adis:blad.is@adis:blad.is* Faster than our nix parser :p12:08:01
@adis:blad.is@adis:blad.is

After some further refactoring:

{
  "cpuTime": 0.34559598565101624,
  "envs": {
    "bytes": 6537216,
    "elements": 330112,
    "number": 243520
  },
  "gc": {
    "heapSize": 402915328,
    "totalBytes": 63767152
  },
  "list": {
    "bytes": 985672,
    "concats": 9249,
    "elements": 123209
  },
  "nrAvoided": 358263,
  "nrFunctionCalls": 218872,
  "nrLookups": 82272,
  "nrOpUpdateValuesCopied": 1712032,
  "nrOpUpdates": 18283,
  "nrPrimOpCalls": 171800,
  "nrThunks": 461439,
  "sets": {
    "bytes": 33342256,
    "elements": 2027794,
    "number": 56097
  },
  "sizes": {
    "Attr": 16,
    "Bindings": 16,
    "Env": 16,
    "Value": 24
  },
  "symbols": {
    "bytes": 246484,
    "number": 24916
  },
  "values": {
    "bytes": 13269240,
    "number": 552885
  }
}
13:24:25
@adis:blad.is@adis:blad.isI mainly did it for improved UX, but that was a sweet bonus.13:24:56
@adis:blad.is@adis:blad.is It looks much more similar to fetchNpmDeps in usage now 13:29:54
19 Nov 2023
@zxgu:matrix.orgZXGU joined the room.11:02:39
20 Nov 2023
@whentze:matrix.orgWanja Hentze
In reply to @adis:blad.is
Cool :)
Hah, it doesn't work (at least not out of the box) but not for the reasons I was thinking of
16:08:31
@whentze:matrix.orgWanja Hentzewe have a .npmrc to do bearer auth against a private gitlab registry and we hacked support for that into our npmlock2nix fork16:09:10
@whentze:matrix.orgWanja Hentze after porting that over (in an even hackier manner), the next issue seems to be that we have packageRoot != src. That makes the npm-config-hook.sh unhappy. Looks like it's being run in src, not in packageRoot for some reason. 17:04:37
@whentze:matrix.orgWanja Hentze debugging a little bit, I found that $npmRoot is not set at this point: https://github.com/adisbladis/buildNodeModules/blob/master/hooks/npm-config-hook.sh#L6 17:09:42
@whentze:matrix.orgWanja Hentze am I still expected to pass sourceRoot to mkDerivation for this to work? 17:17:07
@whentze:matrix.orgWanja Hentze

so atm I have 2 questions adisbladis

  • if I cleaned up the code to parse .npmrc and pass auth headers based on it into fetchurl, would you be willing to take it?
  • is src != packageRoot supposed to work, or is it an unsupported configuration?
17:30:49
@whentze:matrix.orgWanja Hentze the src/sourceRoot/npmRoot/packageRoot situation is quite confusing to me. no combination I've tried seems to work. 17:46:59
21 Nov 2023
@r_i_s:matrix.orgris_ fetchYarnDeps is failing for me with unable to get local issuer certificate for basically everything 21:57:51
@lily:lily.flowersLily Foster
In reply to @r_i_s:matrix.org
fetchYarnDeps is failing for me with unable to get local issuer certificate for basically everything
https://github.com/NixOS/nixpkgs/pull/269061
22:12:57
22 Nov 2023
@thiloho:matrix.orgthiloho set a profile picture.14:58:10
@hexa:lossy.networkhexa
offline> building '/nix/store/646wyw911xp06k2lpjz6fdiwfwbq00il-offline.drv'
offline> patching sources
offline> updateAutotoolsGnuConfigScriptsPhase
offline> configuring
offline> no configure script, doing nothing
offline> building
offline> SyntaxError: Unknown token: { line: 3, col: 2, type: 'INVALID', value: undefined } 3:2 in lockfile
offline>     at Parser.unexpected (/nix/store/z58x3lknjdhqkph4s95bk6y24xz9a0a8-prefetch-yarn-deps/libexec/yarnpkg-lockfile.js:5064:11)
offline>     at Parser.parse (/nix/store/z58x3lknjdhqkph4s95bk6y24xz9a0a8-prefetch-yarn-deps/libexec/yarnpkg-lockfile.js:5193:14)
offline>     at parse (/nix/store/z58x3lknjdhqkph4s95bk6y24xz9a0a8-prefetch-yarn-deps/libexec/yarnpkg-lockfile.js:5262:17)
offline>     at module.exports.exports.default (/nix/store/z58x3lknjdhqkph4s95bk6y24xz9a0a8-prefetch-yarn-deps/libexec/yarnpkg-lockfile.js:4835:96)
offline>     at prefetchYarnDeps (/nix/store/z58x3lknjdhqkph4s95bk6y24xz9a0a8-prefetch-yarn-deps/libexec/index.js:135:28)
offline>     at main (/nix/store/z58x3lknjdhqkph4s95bk6y24xz9a0a8-prefetch-yarn-deps/libexec/index.js:189:9)
15:11:18
@hexa:lossy.networkhexafor https://github.com/pyinsteon/insteon-panel/blob/0.4.0/yarn.lock15:11:23
@hexa:lossy.networkhexaI'm looking for advice on this error15:11:47
@hexa:lossy.networkhexa
  src = fetchFromGitHub {
    owner = "pyinsteon";
    repo = "insteon-panel";
    rev = "refs/tags/${version}";
    hash = "sha256-jpfRgME6MJdItrOldeN12W+bCeIi9ACH7oQ0GFyFqzo=";
  };

  nativeBuildInputs = [
    nodejs
    setuptools
    yarn
  ];

  yarnDeps = fetchYarnDeps {
    yarnLock = src + "/yarn.lock";
    hash = "";
  };
15:12:13
@hexa:lossy.networkhexathis is roughly what I have15:12:17
@lily:lily.flowersLily Fosterthat fetcher only does v1 lockfiles rn15:12:41
@lily:lily.flowersLily Foster(if i could scam someone to join the nixpkgs node.js team, we could probably make more progress on getting it working with yarn-berry 👉🏻👈🏻 )15:14:14

Show newer messages


Back to Room ListRoom Version: 6