Alright, some progress.  The problem with completion for std is
really that RUST_SRC_PATH the checksums in Cargo.lock for lib.rs have
unexpected values.  If I go:

guix time-machine --branch=rust-team -- shell rust-analyzer -- which
rust-analyzer

and open that file, I can find out the location of RUST_SRC_PATH.  By
making a writeable copy of that directory and changing the Cargo.lock file at
its root from the given one to the one I've attached [1] to this email.
This solves the issue in the sense that after wrapping rust-analyzer
appropriately according to the attached rust-analyzer launch script
[2] -- this is necessary as without rust-analyzer-proc-macro-srv is not
supposed to be launched by processses other than rust-analyzer.

[1]
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4

[[package]]
name = "addr2line"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678"
dependencies = [
 "compiler_builtins",
 "gimli 0.29.0",
 "rustc-std-workspace-alloc",
 "rustc-std-workspace-core",
]

[[package]]
name = "adler"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-core",
]

[[package]]
name = "alloc"
version = "0.0.0"
dependencies = [
 "compiler_builtins",
 "core",
 "rand",
 "rand_xorshift",
]

[[package]]
name = "allocator-api2"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"

[[package]]
name = "cc"
version = "1.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0"
dependencies = [
 "shlex",
]

[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-core",
]

[[package]]
name = "compiler_builtins"
version = "0.1.138"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "53f0ea7fff95b51f84371588f06062557e96bbe363d2b36218ddb806f3ca8611"
dependencies = [
 "cc",
 "rustc-std-workspace-core",
]

[[package]]
name = "core"
version = "0.0.0"
dependencies = [
 "rand",
 "rand_xorshift",
]

[[package]]
name = "dlmalloc"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "d9b5e0d321d61de16390ed273b647ce51605b575916d3c25e6ddf27a1e140035"
dependencies = [
 "cfg-if",
 "compiler_builtins",
 "libc",
 "rustc-std-workspace-core",
 "windows-sys",
]

[[package]]
name = "fortanix-sgx-abi"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "57cafc2274c10fab234f176b25903ce17e690fca7597090d50880e047a0389c5"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-core",
]

[[package]]
name = "getopts"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5"
dependencies = [
 "rustc-std-workspace-core",
 "rustc-std-workspace-std",
 "unicode-width",
]

[[package]]
name = "gimli"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-alloc",
 "rustc-std-workspace-core",
]

[[package]]
name = "gimli"
version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-alloc",
 "rustc-std-workspace-core",
]

[[package]]
name = "hashbrown"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb"
dependencies = [
 "allocator-api2",
 "compiler_builtins",
 "rustc-std-workspace-alloc",
 "rustc-std-workspace-core",
]

[[package]]
name = "hermit-abi"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-alloc",
 "rustc-std-workspace-core",
]

[[package]]
name = "libc"
version = "0.2.162"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398"
dependencies = [
 "rustc-std-workspace-core",
]

[[package]]
name = "memchr"
version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-core",
]

[[package]]
name = "miniz_oxide"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
dependencies = [
 "adler",
 "compiler_builtins",
 "rustc-std-workspace-alloc",
 "rustc-std-workspace-core",
]

[[package]]
name = "object"
version = "0.36.5"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
dependencies = [
 "compiler_builtins",
 "memchr",
 "rustc-std-workspace-alloc",
 "rustc-std-workspace-core",
]

[[package]]
name = "panic_abort"
version = "0.0.0"
dependencies = [
 "alloc",
 "cfg-if",
 "compiler_builtins",
 "core",
 "libc",
]

[[package]]
name = "panic_unwind"
version = "0.0.0"
dependencies = [
 "alloc",
 "cfg-if",
 "compiler_builtins",
 "core",
 "libc",
 "unwind",
]

[[package]]
name = "proc_macro"
version = "0.0.0"
dependencies = [
 "core",
 "std",
]

[[package]]
name = "profiler_builtins"
version = "0.0.0"
dependencies = [
 "cc",
 "compiler_builtins",
 "core",
]

[[package]]
name = "r-efi"
version = "4.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "e9e935efc5854715dfc0a4c9ef18dc69dee0ec3bf9cc3ab740db831c0fdd86a3"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-core",
]

[[package]]
name = "r-efi-alloc"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "31d6f09fe2b6ad044bc3d2c34ce4979796581afd2f1ebc185837e02421e02fd7"
dependencies = [
 "compiler_builtins",
 "r-efi",
 "rustc-std-workspace-core",
]

[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
 "rand_core",
]

[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"

[[package]]
name = "rand_xorshift"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
dependencies = [
 "rand_core",
]

[[package]]
name = "rustc-demangle"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-core",
]

[[package]]
name = "rustc-std-workspace-alloc"
version = "1.99.0"
dependencies = [
 "alloc",
]

[[package]]
name = "rustc-std-workspace-core"
version = "1.99.0"
dependencies = [
 "core",
]

[[package]]
name = "rustc-std-workspace-std"
version = "1.99.0"
dependencies = [
 "std",
]

[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"

[[package]]
name = "std"
version = "0.0.0"
dependencies = [
 "addr2line",
 "alloc",
 "cfg-if",
 "compiler_builtins",
 "core",
 "dlmalloc",
 "fortanix-sgx-abi",
 "hashbrown",
 "hermit-abi",
 "libc",
 "miniz_oxide",
 "object",
 "panic_abort",
 "panic_unwind",
 "r-efi",
 "r-efi-alloc",
 "rand",
 "rand_xorshift",
 "rustc-demangle",
 "std_detect",
 "unwind",
 "wasi",
 "windows-targets 0.0.0",
]

[[package]]
name = "std_detect"
version = "0.1.5"
dependencies = [
 "cfg-if",
 "compiler_builtins",
 "libc",
 "rustc-std-workspace-alloc",
 "rustc-std-workspace-core",
]

[[package]]
name = "sysroot"
version = "0.0.0"
dependencies = [
 "proc_macro",
 "profiler_builtins",
 "std",
 "test",
]

[[package]]
name = "test"
version = "0.0.0"
dependencies = [
 "core",
 "getopts",
 "libc",
 "std",
]

[[package]]
name = "unicode-width"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-core",
 "rustc-std-workspace-std",
]

[[package]]
name = "unwind"
version = "0.0.0"
dependencies = [
 "cfg-if",
 "compiler_builtins",
 "core",
 "libc",
 "unwinding",
]

[[package]]
name = "unwinding"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "637d511437df708cee34bdec7ba2f1548d256b7acf3ff20e0a1c559f9bf3a987"
dependencies = [
 "compiler_builtins",
 "gimli 0.31.1",
 "rustc-std-workspace-core",
]

[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
dependencies = [
 "compiler_builtins",
 "rustc-std-workspace-alloc",
 "rustc-std-workspace-core",
]

[[package]]
name = "windows-sys"
version = "0.59.0"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
dependencies = [
 "windows-targets 0.52.6",
]

[[package]]
name = "windows-targets"
version = "0.0.0"

[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
 "windows_aarch64_gnullvm",
 "windows_aarch64_msvc",
 "windows_i686_gnu",
 "windows_i686_gnullvm",
 "windows_i686_msvc",
 "windows_x86_64_gnu",
 "windows_x86_64_gnullvm",
 "windows_x86_64_msvc",
]

[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"

[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"

[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"

[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"

[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"

[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"

[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"

[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index";
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[2]
#!/gnu/store/jlqbjxk51bdq5w7wlnbmwxm1j0pnllpx-bash-minimal-5.1.16/bin/bash
if test -z "${RUST_SRC_PATH}";then export RUST_SRC_PATH="/tmp/rust-lib-src";fi;
exec -a "$0" 
"/nix/store/rna0p2yj36bds6yqjx51zqpzi7zfdkih-rust-analyzer-unwrapped-2025-01-20/bin/rust-analyzer"
 "$@"
-- 
Good luck to you,
Kabelo M'sobomvu Moiloa

Attachment: signature.asc
Description: PGP signature

Reply via email to