!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

673 Members
Rust153 Servers

Load older messages


SenderMessageTime
1 Sep 2025
@yusufraji49:matrix.orgYusuf Raji joined the room.11:00:20
@hexa:lossy.networkhexathe servo build for mozjs_sys fails because it tries to inspect the cargo metadata for the workspace23:05:03
@hexa:lossy.networkhexa

called Result::unwrap() on an Err value: CargoMetadata { stderr: "error: failed to get encoding_c as a dependency of package mozjs_sys v0.140.0-1 (/build/servo-0-unstable-2025-09-01-vendor/mozjs_sys-0.140.0-1)\n\nCaused by:\n failed to load source for dependency encoding_c\n\nCaused by:\n Unable to update registry crates-io\n\nCaused by:\n failed to update replaced source registry crates-io\n\nCaused by:\n failed to read root of directory source: /build/servo-0-unstable-2025-09-01-vendor/@vendor@\n\nCaused by:\n No such file or directory (os error 2)\n" }

23:05:21
@hexa:lossy.networkhexahttps://github.com/servo/mozjs/blob/main/mozjs-sys/build.rs#L13023:05:36
@hexa:lossy.networkhexathe reason is this snippet we ship in .cargo/config.toml of the vendor data23:06:10
@hexa:lossy.networkhexa
❯ cat ./b/servo-0-unstable-2025-09-01-vendor/.cargo/config.toml
[source.vendored-sources]
directory = "@vendor@"
[source.crates-io]
replace-with = "vendored-sources"
23:06:13
@hexa:lossy.networkhexa *
❯ cat ./b/servo-0-unstable-2025-09-01-vendor/.cargo/config.toml
[source.vendored-sources]
directory = "@vendor@"
[source.crates-io]
replace-with = "vendored-sources"
[...]
23:06:21
@hexa:lossy.networkhexai currently only pass cargoHash, so I'm wondering how to patch that23:14:13
@hexa:lossy.networkhexaanyway, this seems to origin in23:14:43
@hexa:lossy.networkhexa
❯ cat pkgs/build-support/rust/fetchcargo-default-config.toml
[source."crates-io"]
"replace-with" = "vendored-sources"

[source."vendored-sources"]
"directory" = "@vendor@"
23:14:47
@hexa:lossy.networkhexa* anyway, this seems to originate in23:20:48
2 Sep 2025
@hexa:lossy.networkhexaor rather in fetch-cargo-vendor-util.py01:16:14
@hexa:lossy.networkhexa* or rather in fetch-cargo-vendor-util.py:26701:16:17
@hexa:lossy.networkhexa cc Toma 01:16:34
@hexa:lossy.networkhexaso when is that supposed to be replaced?01:19:05
@hexa:lossy.networkhexa
    # cargo config
    mkdir -p .cargo
    cat $cargoDeps/.cargo/config.toml >> .cargo/config.toml
    ln -s $cargoDeps @vendor@
01:24:39
@hexa:lossy.networkhexawow, that symlink to ./@vendor@ is something01:25:13
@tomasajt:matrix.orgToma
In reply to @hexa:lossy.network
    # cargo config
    mkdir -p .cargo
    cat $cargoDeps/.cargo/config.toml >> .cargo/config.toml
    ln -s $cargoDeps @vendor@

Where is this logic? (can't use github search rn)
Seems pretty insane

@vendor@ that is inside pkg.cargoDeps is replaced with an actual name in cargoSetupHook's postUnpack part

04:55:57
@tomasajt:matrix.orgTomaBut it is only replaced in the real /build/.cargo/config.toml, but not the original /build/.cargo/foo-vendor/.cargo/config.toml05:04:43
@tomasajt:matrix.orgToma* But it is only replaced in the real /build/.cargo/config.toml, but not the original /build/.cargo/foo-vendor/.cargo/config.toml (aka. $cargoDepsCopy/.cargo/config.toml)05:17:07
@hexa:lossy.networkhexa that is in pkgs/by-name/af/affine/package.nix 11:06:18
@hexa:lossy.networkhexaok, but for some reason the cargo metadata call that mozjs_sys is doing chokes on the leftover @vendor@11:07:31
@quadradical:federated.nexusQuadRadical (Ping) left the room.13:01:40
@hexa:lossy.networkhexa? failed to read root of directory source: /build/servo-0-unstable-2025-09-01-vendor/@vendor@19:17:32
@hexa:lossy.networkhexa *

failed to read root of directory source: /build/servo-0-unstable-2025-09-01-vendor/@vendor@

19:17:33
@hexa:lossy.networkhexa Toma: I mean … it clearly states that is looking in what I assume to be $cargoDeps 19:18:06
@hexa:lossy.networkhexado you have an idea how we can get that resolved?19:18:29
@aidalgol:tchncs.de@aidalgol:tchncs.de joined the room.21:54:17
@hexa:lossy.networkhexa * ok, but for some reason the cargo metadata call that mozjs_sys is running chokes on the leftover @vendor@ 22:29:36
3 Sep 2025
@ghpzin:envs.netghpzin joined the room.07:54:42

Show newer messages


Back to Room ListRoom Version: 6