Coder Social home page Coder Social logo

rnix-lsp's Introduction

rnix-lsp Crates.io Chat on Matrix Build status

A syntax-checking language server using rnix.

  • Syntax-checking diagnostics
  • Basic completion
  • Basic renaming
  • Basic goto definition
  • Expand selection proposal
  • Formatting using nixpkgs-fmt

This is beta-level quality at best - I didn't expect maintaining a language server when writing rnix, the goal was that others would flock around the parser and write a bunch of editor tooling :)

Breakages are expected. No semver compatibility before 1.x.y.

Turn on logging with RUST_LOG=trace, and redirect stderr to a file.

bash -c "env RUST_LOG=trace rnix-lsp 2> /tmp/rnix-lsp.log"

Support for Mac OS is not guaranteed (see PR #61).

Install

nix-env -i -f https://github.com/nix-community/rnix-lsp/archive/master.tar.gz

Integrate with your editor

These instructions are not fully tested - see issue #3. Please raise an issue and/or send a PR if a config below didn't work out of the box.

Vim/Neovim

{
  "languageserver": {
    "nix": {
      "command": "rnix-lsp",
      "filetypes": [
        "nix"
      ]
    }
  }
}
let g:LanguageClient_serverCommands = {
    \ 'nix': ['rnix-lsp']
\ }
if executable('rnix-lsp')
    au User lsp_setup call lsp#register_server({
        \ 'name': 'rnix-lsp',
        \ 'cmd': {server_info->[&shell, &shellcmdflag, 'rnix-lsp']},
        \ 'whitelist': ['nix'],
        \ })
endif

Emacs

For eglot use (lsp +eglot)

;; init.el
(doom! :tools
       lsp
       
       :lang
       (nix +lsp))
(add-to-list 'lsp-language-id-configuration '(nix-mode . "nix"))
(lsp-register-client
 (make-lsp-client :new-connection (lsp-stdio-connection '("rnix-lsp"))
                  :major-modes '(nix-mode)
                  :server-id 'nix))
(add-to-list 'eglot-server-programs '(nix-mode . ("rnix-lsp")))

Kakoune

kak-lsp has builtin configuration since version v9.0.0:

[language.nix]
filetypes = ["nix"]
roots = ["flake.nix", "shell.nix", ".git"]
command = "rnix-lsp"

If you run into an issue regarding "missing roots" see this issue.

VSCode

{
    "nix.enableLanguageServer": true
}

RIP jd91mzm2

Sadly, the original author of this project, @jD91mZM2 has passed away. His online presence was anonymous and what we have left is his code. This is but one of his many repos that he contributed to.

rnix-lsp's People

Contributors

aaronjanse avatar antifuchs avatar arjuns500 avatar artturin avatar dependabot[bot] avatar gvolpe avatar ivanbakel avatar jd91mzm2 avatar jgarte avatar jnoortheen avatar lf- avatar lord-valen avatar ma27 avatar matklad avatar mic92 avatar milahu avatar mtoohey31 avatar peterbecich avatar selaux avatar symphorien avatar wikku avatar xanderificnl avatar zimbatm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rnix-lsp's Issues

aarch64-darwin support

rnix-lsp does not build for aarch64-darwin. This is being caused for two reasons:

  • nixUnstable in 21.05 right now is broken on nixpkgs for aarch64-darwin.
  • The pinned naersk does not have an aarch64-darwin output.

nixUnstable can be fixed to build for aarch64-darwin by disabling a test on aarch64-darwin. This is already merged into nixpkgs master but it hasn't been backported. We could potentially just add in an override? Or switch nixpkgs to depend on some "known to build" nixpkgs master commit.

If we bump naersk then it will include aarch64-darwin support.

For what it's worth, I have rnixlsp building for aarch64-darwin here. But I'm following master nixpkgs and naersk.

go to definition for attributes `inherit`-ed in `let ... in`

Description

I'd like to have go to definition for bar in

let
  inherit (foo) bar;
in
  bar;

Considered alternatives

the only alternative is to explicitly write as follows which is slightly verbose:

let
  bar = foo.bar;
in
  bar;

Additional context

[feature request] nixpkgs goto definition

It would be cool to be able to "goto definition" for packages and maybe even goto for nixos options. This might require that the edited expression is a Nix Flake.

I have a break from university this week, so I'm willing to put a lot of effort into implementing this. I thought it would be good to document the feature request here in case there's a huge roadblock I'm missing etc, if the implementation is already in progress, or if there's another reason to not do this.

Cheers :-)

Possible error in `test_provide_builtins`? Mac OS

Describe the bug

There may be a failing test:

test lookup::tests::test_provide_builtins ... FAILED

Steps to reproduce

Steps to reproduce the behavior:

  1. On Mac OS Big Sur nix-env -i -f https://github.com/nix-community/rnix-lsp/archive/master.tar.gz

I don't know if this occurs on Linux, but can test tomorrow.

  • Version of rnix-lsp: attempting to install 0.2.1
  • Name and version of the editor you've used: Emacs
  • Operating system: Mac OS Big Sur

Thank you

Error messages still not working in v0.2.4

Have to reopen as I still get the OPs messages when using v0.2.4 (which is in nixos-unstable) as opposed to the better explained ones when using bump-rnix branch.

Example with bump-rnix:

■ unexpected TOKEN_PAREN_CLOSE at 1941..1942, wanted any of [TOKEN_PAREN_OPEN, TOKEN_REC, TOKEN_CURLY_B_OPEN, TO■ unexpected TOKEN_PAREN_CLOSE at 1941..1942, wanted any of [TOKEN_PAREN_OPEN, TOKEN_REC, TOKEN_CURLY_B_OPEN, TO

Originally posted by @573 in #25 (comment)

Flake currently broken?

Describe the bug

When trying to run the LSP from flake, it produces some attribute missing error.

Steps to reproduce

$ nix run github:nix-community/rnix-lsp/master                                            error: attribute 'package' missing                                                        
       at /nix/store/dnzj42036l08pn9xwzgax8nbn2kk504s-source/lib/attrsets.nix:256:23:

          255|   mapAttrsToList = f: attrs:
          256|     map (name: f name attrs.${name}) (attrNames attrs);
             |                       ^
          257|
(use '--show-trace' to show detailed location information)

Expected behavior

The LSP starts.

Screenshots

Additional context

  • Version of rnix-lsp: master branch, tried for 2 days, though not close to a computer powerful enough to bisect.
  • Name and version of the editor you've used: none
  • Operating system: nixos

on very large files emacs becomes unresponsive

Describe the bug

Emacs becomes unresponsive when large files are opened.

Steps to reproduce

Steps to reproduce the behavior:

  1. Open pkgs/top-level/all-packages.nix with the rnix lsp enabled

Expected behavior

Emacs remains responsive

Additional context

  • Version of rnix-lsp: built from master, commit a2d06d2
  • Name and version of the editor you've used: GNU Emacs 29.0.50
  • Operating system: NixOS

Editor configuration is generated by HM, and spread across several modules which generate several emacs packages which are then loaded on start.

The most relevant configuration for rnix-lsp is probably to be found in:

https://github.com/NobbZ/nixos-config/blob/afd01c05fd8cc81b62d55635cd5aa5fbebae0ae0/home/modules/languages/nix/default.nix

is this how it should work?

Hey! glad i stumbled on this repo :) configured it with neovim nightly and builtin lsp.
this is how it looks:
image

at least i get an error message but it is always formatted like this. "error node at ....".
Is there a way to turn on more specific error messages ? or is this currently the only error message possible with rnix lsp ?

cheers

Install on Mac OS fails with linker errors

Describe the bug

When I try to install rnix-lsp from either the command line or my editor (I am using Neovim with nvim-lsp-installer) it fails to install with linker errors.

This failure could easily be a setup issue of mine which I need to correct, but I figured this install would have hopefully "just worked" out of the box.

Let me know if I need to provide more information!

Steps to reproduce

Steps to reproduce the behavior:

  1. Run cargo install rnix-lsp from the command line.
  2. It fails to install with linker errors.

Expected behavior

rnix-lsp is installed after doing number 1.

Screenshots

Install Output
    Updating crates.io index
  Installing rnix-lsp v0.2.4
  Downloaded thread_local v1.1.4
  Downloaded proc-macro2 v1.0.36
  Downloaded crossbeam-utils v0.8.7
  Downloaded serde_derive v1.0.136
  Downloaded tinyvec v1.5.1
  Downloaded serde v1.0.136
  Downloaded unicode-bidi v0.3.7
  Downloaded syn v1.0.86
  Downloaded smol_str v0.1.21
  Downloaded autocfg v1.1.0
  Downloaded serde_json v1.0.79
  Downloaded ryu v1.0.9
  Downloaded libc v0.2.119
  Downloaded crossbeam-channel v0.5.2
  Downloaded quote v1.0.15
  Downloaded memoffset v0.6.5
  Downloaded itoa v1.0.1
  Downloaded 17 crates (1.5 MB) in 1.79s
   Compiling proc-macro2 v1.0.36
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.86
   Compiling serde_derive v1.0.136
   Compiling serde v1.0.136
   Compiling autocfg v1.1.0
   Compiling memchr v2.4.1
   Compiling libc v0.2.119
   Compiling cfg-if v1.0.0
   Compiling lazy_static v1.4.0
   Compiling log v0.4.14
   Compiling crossbeam-utils v0.8.7
   Compiling serde_json v1.0.79
   Compiling regex-syntax v0.6.25
   Compiling tinyvec_macros v0.1.0
   Compiling itoa v1.0.1
   Compiling matches v0.1.9
   Compiling ryu v1.0.9
   Compiling cfg-if v0.1.10
   Compiling hashbrown v0.9.1
   Compiling fnv v1.0.7
   Compiling unicode-width v0.1.9
   Compiling bitflags v1.3.2
   Compiling unicode-bidi v0.3.7
   Compiling countme v2.0.4
   Compiling same-file v1.0.6
   Compiling percent-encoding v2.1.0
   Compiling once_cell v1.9.0
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.0.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.1.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.10.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.11.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.12.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.13.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.14.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.15.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.2.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.3.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.4.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.5.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.6.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.7.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.8.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.build_script_build.4b1cc933-cgu.9.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e.549cgbip58v053ia.rcgu.o" "-L" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/deps" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-c6362a5f9528007e.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-196e36231af083e9.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-f420fd3f10aa8205.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-22bb8a12823e5d13.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-2ca562738f920b27.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-044b3498ce18eb97.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-16174d1d9a37923a.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-ef53b0f9a8e337d5.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-1a08fa1ddf410423.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-77f44cf6bc4a11f0.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-5602d336b20745db.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-1902a2b406a30b1f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-9b59e472750d04d2.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-30cc684d96e2be8f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-a855ec16c5b04861.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-5c36e9d724b8bf33.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8fcd115ffa1f34e1.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/crossbeam-utils-f4cfad470f45c75e/build_script_build-f4cfad470f45c75e" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: library not found for -liconv
          collect2: error: ld returned 1 exit status


error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.0.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.1.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.10.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.11.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.12.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.13.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.14.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.15.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.2.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.3.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.4.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.5.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.6.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.7.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.8.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.build_script_build.94868cb0-cgu.9.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74.5e8znbr1kjz4wos5.rcgu.o" "-L" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/deps" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-c6362a5f9528007e.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-196e36231af083e9.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-f420fd3f10aa8205.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-22bb8a12823e5d13.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-2ca562738f920b27.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-044b3498ce18eb97.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-16174d1d9a37923a.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-ef53b0f9a8e337d5.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-1a08fa1ddf410423.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-77f44cf6bc4a11f0.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-5602d336b20745db.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-1902a2b406a30b1f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-9b59e472750d04d2.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-30cc684d96e2be8f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-a855ec16c5b04861.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-5c36e9d724b8bf33.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8fcd115ffa1f34e1.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/log-741a644f8d326f74/build_script_build-741a644f8d326f74" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: library not found for -liconv
          collect2: error: ld returned 1 exit status


error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.0.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.1.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.10.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.11.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.12.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.13.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.14.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.15.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.2.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.3.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.4.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.5.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.6.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.7.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.8.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.build_script_build.71ad6f1d-cgu.9.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e.47xbnsv9y0hbmjjf.rcgu.o" "-L" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/deps" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-c6362a5f9528007e.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-196e36231af083e9.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-f420fd3f10aa8205.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-22bb8a12823e5d13.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-2ca562738f920b27.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-044b3498ce18eb97.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-16174d1d9a37923a.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-ef53b0f9a8e337d5.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-1a08fa1ddf410423.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-77f44cf6bc4a11f0.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-5602d336b20745db.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-1902a2b406a30b1f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-9b59e472750d04d2.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-30cc684d96e2be8f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-a855ec16c5b04861.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-5c36e9d724b8bf33.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8fcd115ffa1f34e1.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/memchr-81fb89ef2503863e/build_script_build-81fb89ef2503863e" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: library not found for -liconv
          collect2: error: ld returned 1 exit status


error: could not compile `log` due to previous error
warning: build failed, waiting for other jobs to finish...
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.0.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.1.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.10.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.11.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.12.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.13.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.14.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.15.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.2.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.3.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.4.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.5.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.6.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.7.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.8.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.build_script_build.fc1740e9-cgu.9.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a.3tfjr5q5v2946vdc.rcgu.o" "-L" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/deps" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-c6362a5f9528007e.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-196e36231af083e9.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-f420fd3f10aa8205.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-22bb8a12823e5d13.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-2ca562738f920b27.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-044b3498ce18eb97.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-16174d1d9a37923a.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-ef53b0f9a8e337d5.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-1a08fa1ddf410423.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-77f44cf6bc4a11f0.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-5602d336b20745db.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-1902a2b406a30b1f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-9b59e472750d04d2.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-30cc684d96e2be8f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-a855ec16c5b04861.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-5c36e9d724b8bf33.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8fcd115ffa1f34e1.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_derive-f5da7e4230ca0a4a/build_script_build-f5da7e4230ca0a4a" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: library not found for -liconv
          collect2: error: ld returned 1 exit status


error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.0.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.1.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.10.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.11.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.12.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.13.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.14.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.15.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.2.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.3.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.4.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.5.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.6.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.7.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.8.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.build_script_build.e60f3e11-cgu.9.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79.3g72nzaiv4qhw7ki.rcgu.o" "-L" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/deps" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-c6362a5f9528007e.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-196e36231af083e9.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-f420fd3f10aa8205.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-22bb8a12823e5d13.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-2ca562738f920b27.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-044b3498ce18eb97.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-16174d1d9a37923a.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-ef53b0f9a8e337d5.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-1a08fa1ddf410423.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-77f44cf6bc4a11f0.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-5602d336b20745db.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-1902a2b406a30b1f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-9b59e472750d04d2.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-30cc684d96e2be8f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-a855ec16c5b04861.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-5c36e9d724b8bf33.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8fcd115ffa1f34e1.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde-5d8512888ec35d79/build_script_build-5d8512888ec35d79" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: library not found for -liconv
          collect2: error: ld returned 1 exit status


error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.0.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.1.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.10.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.11.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.12.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.13.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.14.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.15.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.2.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.3.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.4.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.5.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.6.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.7.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.8.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.build_script_build.d07ee986-cgu.9.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953.2vtli1v1lnmdy968.rcgu.o" "-L" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/deps" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-c6362a5f9528007e.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-196e36231af083e9.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-f420fd3f10aa8205.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-22bb8a12823e5d13.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-2ca562738f920b27.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-044b3498ce18eb97.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-16174d1d9a37923a.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-ef53b0f9a8e337d5.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-1a08fa1ddf410423.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-77f44cf6bc4a11f0.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-5602d336b20745db.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-1902a2b406a30b1f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-9b59e472750d04d2.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-30cc684d96e2be8f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-a855ec16c5b04861.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-5c36e9d724b8bf33.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8fcd115ffa1f34e1.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/serde_json-08b26b476c899953/build_script_build-08b26b476c899953" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: library not found for -liconv
          collect2: error: ld returned 1 exit status


error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.0.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.1.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.10.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.11.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.12.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.13.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.14.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.15.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.2.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.3.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.4.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.5.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.6.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.7.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.8.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.build_script_build.7f210ce4-cgu.9.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089.1ur6x02met8gqchc.rcgu.o" "-L" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/deps" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-c6362a5f9528007e.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-196e36231af083e9.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-f420fd3f10aa8205.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-22bb8a12823e5d13.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-2ca562738f920b27.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-044b3498ce18eb97.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-16174d1d9a37923a.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-ef53b0f9a8e337d5.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-1a08fa1ddf410423.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-77f44cf6bc4a11f0.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-5602d336b20745db.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-1902a2b406a30b1f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-9b59e472750d04d2.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-30cc684d96e2be8f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-a855ec16c5b04861.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-5c36e9d724b8bf33.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8fcd115ffa1f34e1.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/syn-454dcb1ee69db089/build_script_build-454dcb1ee69db089" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: library not found for -liconv
          collect2: error: ld returned 1 exit status


error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.0.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.1.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.10.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.11.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.12.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.13.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.14.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.15.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.2.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.3.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.4.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.5.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.6.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.7.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.8.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.build_script_build.bcec79b2-cgu.9.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2.38lvc6cseaonwade.rcgu.o" "-L" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/deps" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-c6362a5f9528007e.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-196e36231af083e9.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-f420fd3f10aa8205.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-22bb8a12823e5d13.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-2ca562738f920b27.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-044b3498ce18eb97.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-16174d1d9a37923a.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-ef53b0f9a8e337d5.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-1a08fa1ddf410423.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-77f44cf6bc4a11f0.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-5602d336b20745db.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-1902a2b406a30b1f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-9b59e472750d04d2.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-30cc684d96e2be8f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-a855ec16c5b04861.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-5c36e9d724b8bf33.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8fcd115ffa1f34e1.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/proc-macro2-efb62a42bf5924b2/build_script_build-efb62a42bf5924b2" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: library not found for -liconv
          collect2: error: ld returned 1 exit status


error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.0.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.1.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.10.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.11.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.12.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.13.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.14.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.15.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.2.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.3.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.4.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.5.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.6.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.7.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.8.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.build_script_build.58d892c3-cgu.9.rcgu.o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9.19xf6g1kfjijest5.rcgu.o" "-L" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/deps" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-c6362a5f9528007e.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-196e36231af083e9.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-f420fd3f10aa8205.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-22bb8a12823e5d13.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-2ca562738f920b27.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-044b3498ce18eb97.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-16174d1d9a37923a.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-ef53b0f9a8e337d5.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-1a08fa1ddf410423.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-77f44cf6bc4a11f0.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-5602d336b20745db.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-1902a2b406a30b1f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-9b59e472750d04d2.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-30cc684d96e2be8f.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-a855ec16c5b04861.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-5c36e9d724b8bf33.rlib" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8fcd115ffa1f34e1.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/nix/store/48kk76b0jh8gywrnp14r4nlnil52zvcl-rustc-1.57.0/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD/release/build/libc-9b81abbfa6c19df9/build_script_build-9b81abbfa6c19df9" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: ld: library not found for -liconv
          collect2: error: ld returned 1 exit status


error: failed to compile `rnix-lsp v0.2.4`, intermediate artifacts can be found at `/var/folders/d6/6y78833n39x72gqftcfm2sw40000gn/T/cargo-installww2iDD`

Caused by:
  build failed

Additional context

  • Version of rnix-lsp: v0.2.4
  • Name and version of the editor you've used: Neovim v0.6.1
  • Operating system: Mac OS BigSur 11.6 with Nix

Excessive hover info?

Right now, hovering over any whitespace or comments in an attribute set shows the value of the entire set. This is great for small sets, but it might be unwanted for large ones (e.g. nixos modules).

I guess my question is: when is it appropriate to show the value of an expression when hovering?

Possible features and ideas

Here's are some informal ideas for things that we might want in rnix-lsp, some of which would be possible via evaluation. Feel free to add to this list:

  • hover over an expression to view its value
  • hover over a variable name to see documentation, extracted from comments nearby the variable's definition
  • auto-complete for variable names, even within with statements
  • goto-definiton across files
  • caching function parameters (for UI purposes only), so that pkgs.withPackages ({rustPackages}: ...) would let us know the value of rustPackages based on pkgs
  • auto-complete of attribute names for common patterns like functionName { /* attributes here */ }, maybe also use the comments next to paremeter definitions in the function source code
  • nixos option hover docs
  • nixos option autocomplete
  • diagnostics for when a user-provided value (e.g. a nixos option value) fails assertions elsewhere
  • understanding NixOS channels and flake inputs
  • test suite

Some of these might not be possible, and we might not want others. But I thought I'd at least write them down somewhere.

No autocompletion with nested attribute declaration

Describe the bug

Example code:

let ab = { cd.ef = 2; }; in ab.cd.

It does not autocomplete ef.

Steps to reproduce

Steps to reproduce the behavior:

Add the following test to src/lookup.rs:

    fn test_ident_traverse_multi_attr_path() {
        let root = rnix::parse("let ab = { cd.ef = 2; }; in ab.cd. ").node();
        let mut app = App {
            files: HashMap::new(),
            conn: Connection::memory().0,
        };

        let suggestions = app.scope_for_ident(
            Url::parse("file:///default.nix").unwrap(),
            &root,
            34
        );

        assert!(suggestions.is_some());
        let val = suggestions.unwrap();
        assert!(val.1.contains_key("ef"));
    }

It fails.

Expected behavior

It should handle attrs like { cd.ef = 2; }.

Screenshots

The problem was found when trying to jump to declaration of passthru.optional-dependencies.socks:

image

It fails to jump to the attribute.

Additional context

  • Version of rnix-lsp: 0.2.5
  • Name and version of the editor you've used: VSCode 1.68.1
  • Operating system: macOS
Editor configuration "nix.enableLanguageServer": true

Consuming 30G when used via noevim coc

Hello,

I had two incidents already when with rnix-lsp consumed almost all RAM.
It is interesting that in both cases I had in parallel other terminal running nix repl while editing home.nix (home-manager) with error syntax error.

# home.nix
let
  # first evaluated yesterday
  rnix-lsp = import "${builtins.fetchTarball https://github.com/nix-community/rnix-lsp/archive/master.tar.gz}";
in {
  # ...
  # Effectively generating ~/.config/nvim/coc-settings.json
    nix = {
      command = "${rnix-lsp}/bin/rnix-lsp";
      filetypes = ["nix"];
    };
}
...
Mar 29 15:49:04 ony kernel: Mem-Info:
Mar 29 15:49:04 ony kernel: active_anon:7466684 inactive_anon:441570 isolated_anon:0
                             active_file:949 inactive_file:1626 isolated_file:158
                             unevictable:0 dirty:0 writeback:0 unstable:0
                             slab_reclaimable:54731 slab_unreclaimable:58579
                             mapped:9174 shmem:12085 pagetables:38810 bounce:0
                             free:50700 free_pcp:1207 free_cma:0
..
Mar 29 15:49:04 ony kernel: Tasks state (memory values in pages):
Mar 29 15:49:04 ony kernel: [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
...
Mar 29 15:49:04 ony kernel: [  24361]  1000 24361    76923     1754   114688     1148             0 nvim
Mar 29 15:49:04 ony kernel: [  24363]  1000 24363   160515      596  1519616     6984             0 node
...
Mar 29 15:49:04 ony kernel: [  24381]  1000 24381 16812507  7618497 117530624  7033451             0 rnix-lsp
Mar 29 15:49:04 ony kernel: [  14255]  1000 14255   145768        0   368640    30960             0 nix
Mar 29 15:49:04 ony kernel: [  14868]     0 14868   114793        1   122880     1369             0 nix-daemon
...
Mar 29 15:49:04 ony kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/session-5.scope,task=rnix-lsp,pid=24381,uid=1000
Mar 29 15:49:04 ony kernel: Out of memory: Killed process 24381 (rnix-lsp) total-vm:67250028kB, anon-rss:30473988kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:114776kB oom_score_adj:0
Mar 29 15:49:04 ony kernel: oom_reaper: reaped process 24381 (rnix-lsp), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB

rnix-lsp not keeping in sync with nixpkgs-fmt

Describe the bug

nixpkgs-fmt 1.3.0 was released 2 months ago, and nixpkgs-unstable updated almost immediately. However rnix-lsp appears to still be using nixpkgs-fmt 1.2.0.

nixpkgs-fmt 1.3.0 produces formatting differences from 1.2.0, and this means if I have rnix-lsp and nixpkgs-fmt both installed from recent nixpkgs-unstable, formatting from within my IDE disagrees with formatting from the command-line. This is very frustrating.

Steps to reproduce

With this code snippet:

{
  x = let x = {
    y = 1;
  }; in x;
}

Ask rnix-lsp to format it (e.g. with VSCode), and then ask nixpkgs-fmt 1.3.0 to format it. In this case, nixpkgs-fmt converts it to

{
  x =
    let
      x = {
        y = 1;
      };
    in
    x;
}

(I actually disagree with 1.3.0's formatting here but that's beside the point)

Expected behavior

rnix-lsp's formatting should match that of nixpkgs-fmt.

I realize that when nixpkgs-fmt updates, rnix-lsp might lag a little bit, but it should try to update as soon as is reasonable, so that way pulling rnix-lsp and nixpkgs-fmt from the same nixpkgs revision should result in identical formatting most of the time.

Additional context

  • Version of rnix-lsp: 0.2.5
  • Name and version of the editor you've used: VSCode
  • Operating system: macOS

Difference in formatting compared to `nixpkgs-fmt`

As far as I understand, rnix-lsp uses nixpkgs-fmt for formatting (on write). However, I get different outputs when I save a nix file in my editor vs when I manually run nixpkgs-fmt over a dir/file.

The most notable example is:

nixpkgs-fmt rnix-lsp
[ ] { } [] {}

Is there a way to configure rnix-lsp's formatting options or is there some other issue at hand?

Usage instructions?

What is the best way to test this project out?

vim

I found https://github.com/prabirshrestha/vim-lsp , maybe there are other LSP plugins out there.

Need to test this config:

if executable('rnix-lsp')
    au User lsp_setup call lsp#register_server({
        \ 'name': 'rnix-lsp',
        \ 'cmd': {server_info->[&shell, &shellcmdflag, 'rnix-lsp']},
        \ 'whitelist': ['nix'],
        \ })
endif

Detection of duplicate attrset names doesn't work for strings

Describe the bug

When using strings as attrset values, the duplicate detection doesn't work

Steps to reproduce

Steps to reproduce the behavior:

  1. Use this file:
    {
      a = "test";
      a = "test";
    }
    
  2. See there are no errors
  3. Use this file:
    {
      a = true;
      a = true;
    }
    
  4. See the attribute a defined more than once error

Expected behavior

Detection should work no matter the type of the value.

Additional context

  • Version of rnix-lsp: unstable-2022-11-27
  • Name and version of the editor you've used: nvim 0.9.4
  • Operating system: NixOS

Please pin flake compat

Please pin the flake compat that is being fetched. This against everything we are doing with Nix. We want explicit build graphs and not random binaries from the internet.

(import (builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz") {

New maintainer?

It seems that @aaronjanse is a short of time or motivation to review the open pull requests. Should we allow other persons to join the project as a maintainer?

Unable to build with current nixos-unstable (nixpkgs-unstable probably the same problem) due to nix_2_4 being removed.

Describe the bug

When trying to build the LSP server against a recent version of nixpkgs an error occurs due to nix_2_4 being removed.

Steps to reproduce

Steps to reproduce the behavior:

  1. Run nix build github:nix-community/rnix-lsp --override-input nixpkgs github:nixos/nixpkgs/nixos-unstable
  2. see error from above "Screenshots" section

Expected behavior

The LSP server builds successfully

Screenshots

$ nix build github:nix-community/rnix-lsp --override-input nixpkgs github:nixos/nixpkgs/nixos-unstable
warning: not writing modified lock file of flake 'github:nix-community/rnix-lsp':
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/0ea7a8f1b939d74e5df8af9a8f7342097cdf69eb' (2022-07-02)
  → 'github:nixos/nixpkgs/8f485713f5e6b6883a9b6959afa98688360a3ecb' (2022-07-16)
error: nixVersions.nix_2_4 has been removed
(use '--show-trace' to show detailed location information)

Additional context

  • Version of rnix-lsp: master
  • Name and version of the editor you've used: Don't even get thus far, though usually emacs and VScode in their respective most recent versions
  • Operating system: NixOS
Editor configuration

QUESTION: How to override the version of rnix-lsp being used via overlay ?

I'm trying to override the version of rnix-lsp being used via overlay. I want the bump-rnix branch.

I tried with several variations of this overlay:

self: super:
{
  rnix-lsp = super.rnix-lsp.overrideAttrs (old: {
    src =
      let 
       source = super.fetchFromGitHub { 
         owner = "nix-community";
         repo = "rnix-lsp";
         rev = "46b769da4a01232def21809734bfe9db88ded771"; # bump-rnix branch
         sha256 = "1nfglpil23ingl67j7jd64vd56klb5jlyj0pal0ndn4ipqrhnc6c"; 
       }; 
     in 
     super.runCommand "source" {} ''
       cp -R ${source} $out
       chmod +w $out/Cargo.lock
       cp ''${super.fetchurl {
        url = "https://raw.githubusercontent.com/nix-community/rnix-lsp/46b769da4a01232def21809734bfe9db88ded771/Cargo.lock";
        sha256 = "1qg5bdg5nawm7z1klfgigmpmg3qnkcws2mfh3iliam11xc10akkk";
       }} ''$out/Cargo.lock
     '';
  });
}

as well as:

self: super:
{
  rnix-lsp = super.rnix-lsp.overrideAttrs (old: {
    src =
      super.fetchFromGitHub { 
         owner = "nix-community";
         repo = "rnix-lsp";
         rev = "46b769da4a01232def21809734bfe9db88ded771"; # bump-rnix branch
         sha256 = "1nfglpil23ingl67j7jd64vd56klb5jlyj0pal0ndn4ipqrhnc6c"; 
       }; 
  });
}

but just can't get it to work.

ERROR: cargoSha256 is out of date

Cargo.lock is not the same in rnix-lsp-0.1.0-vendor.tar.gz

To fix the issue:

  1. Use "0000000000000000000000000000000000000000000000000000" as the cargoSha256 value
  2. Build the derivation and wait for it to fail with a hash mismatch
  3. Copy the 'got: sha256:' value back into the cargoSha256 field

What should I do ?

Probably related NixOS/nixpkgs#107070

What happened with maintainer?

From time to time I watch for updates in the development of nix lsp, but since March the maintainer has been inactive. Has something happened with him?

Incremental edit handler not detecting edits at end of file

Steps to reproduce:

  1. Add error! logging to print the content calculated by the incremental edit handler
  2. Create a file with just 1 + 2
  3. Delete all the text in the file (ctrl-a, backspace)
  4. Write 3 + 4
  5. Observe that no matter what we type, the incremental edit handler returns an empty string

This can also be reproduced by appending any file with a newline followed by new text. The text appended to the file is not detected.

I suspect this is due to a loop that iterates over the length of the original file, which I assume misses edits that happen after the end of a file:

for i in 0..len {

Don't change file if formatting doesn't change

Description

I'm using the helix editor and when formatting a file with :format while using rnix-lsp, it will replace the entire content of the file even when the formatting doesn't change.
Doing the same for a .c/.cpp file while using clangd doesn't replace the contents.

I wonder whether this is because rnix-lsp doesn't check whether the formatting has actually changed. Perhaps it would take too much to check it? I'm not sure how this works as I'm not familiar with the code behind LSP servers.

Considered alternatives

I noticed the code responsible for formatting is here and whether checking if the formatting changed is an option.

flake.nix refers to a non-existent source

I'm using rnix-lsp inside my home manager configuration:

let
  rnix-lsp = (import (pkgs.fetchFromGitHub {
    owner = "nix-community";
    repo = "rnix-lsp";
    rev = "274902aa662379fd30f12f0e310a2e738142da0e";
    sha256 = "1df74cnzzc6h21msld07615d74vxadrakr4xdn6f8q6lx3m8gbgd";
  })) {};
in {
  xdg.configFile."nvim/coc-settings.json".text = builtins.toJSON {
    languageserver.nix = {
        command = "${rnix-lsp}/bin/rnix-lsp";
        filetypes = ["nix"];
        "trace.server" = "verbose";
    };
  };
  # …
}

This seems to have become broken, because the commit in the NUR repository flake.nix is referring to doesn't exist (anymore?):

building the system configuration...
building '/nix/store/sn1d4gv876symdf9zb3sn141af304mzv-source.drv'...

trying https://gitlab.com/api/v4/projects/jD91mZM2%2Fnur-packages/repository/archive.tar.gz?sha=01b411a5de96cc484a00b861ad16dae901eed77d
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 
error: cannot download source from any mirror
builder for '/nix/store/sn1d4gv876symdf9zb3sn141af304mzv-source.drv' failed with exit code 1

I'm not sure how why this started happening now. nix/sources.json also seems to exist, but points to another NUR, which apparently is unused.

[question] autocompletion

Is rnix-lsp actually supposed to autocomplete from <nixpkgs> ($NIX_PATH) imports?

If so I have it mis-configured. If not, why?

autocompletion is not working in vscode: no suggestions

Describe the bug

vscode says "no suggestions"

autocomplete works for javascript files, so i blame rnix-lsp

Steps to reproduce

edit this nix file

# autocomplete
let pkgs = {
  hello = "echo hello";
  a.b.c = "hello nested";
}; in pkgs.
#12345678901
#          ^ 4:11 = cursor
#         ^ write a dot, press Ctrl+Space

response from rnix-lsp looks ok

jsonrpc: request + response
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "textDocument/completion",
  "params": {
    "textDocument": {
      "uri": "file:///tmp/test-lsp.nix"
    },
    "position": {
      "line": 4,
      "character": 11
    },
    "context": {
      "triggerKind": 1
    }
  }
}
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": [
    {
      "deprecated": false,
      "detail": "Attribute",
      "label": "hello",
      "textEdit": {
        "newText": "hello",
        "range": {
          "end": {
            "character": 10,
            "line": 4
          },
          "start": {
            "character": 6,
            "line": 4
          }
        }
      }
    },
    {
      "deprecated": false,
      "detail": "Attribute",
      "label": "a",
      "textEdit": {
        "newText": "a",
        "range": {
          "end": {
            "character": 10,
            "line": 4
          },
          "start": {
            "character": 6,
            "line": 4
          }
        }
      }
    }
  ]
}

jsonrpc traffic was captured with

rnix-lsp-wrapper.sh
#! /bin/sh

# rnix-lsp-wrapper.sh

cd "$(dirname "$0")"

tee -a rnix-lsp.in.txt |
./rnix-lsp |
tee -a rnix-lsp.out.txt

Expected behavior

show suggestions

Additional context

  • Version of rnix-lsp: 6925256
  • Name and version of the editor you've used:
  • Operating system:

vscodium

Version: 1.70.0
Commit: da76f93349a72022ca4670c1b84860304616aaa2
Date: 2022-08-05T11:26:33.437Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Linux x64 5.15.67

Editor configuration

{
  "nix.enableLanguageServer": true,
  "nix.serverPath": "/tmp/rnix-lsp/target/debug/rnix-lsp-wrapper.sh"
}

`test_provide_builtins` failing on macOS when matching against `nix --version` output

Describe the bug

Building rnix-lsp v0.2.3 against recent nixpkgs (NixOS/nixpkgs@77fda7f) on macOS fails with

thread 'lookup::tests::test_provide_builtins' panicked at 'called `Option::unwrap()` on a `None` value', src/lookup.rs:185:48

It looks like it's failing to run a regex on the nix --version output:

rnix-lsp/src/lookup.rs

Lines 174 to 185 in 1665bc6

let nixver = process::Command::new("nix").args(&["--version"]).output();
// `nix __dump-builtins` is only supported on `nixUnstable` a.k.a. Nix 2.4.
// Thus, we have to check if this is actually available. If not, `rnix-lsp` will fall
// back to a hard-coded list of builtins which is missing additional info such as documentation
// or parameter names though.
match nixver {
Ok(out) => {
match str::from_utf8(&out.stdout) {
Ok(v) => {
let re = regex::Regex::new(r"^nix \(Nix\) (?P<major>\d)\.(?P<minor>\d).*").unwrap();
let m = re.captures(v).unwrap();

Interestingly, cache.nixos.org has binary artifacts for it, though this seems intermittent (on a slightly older revision of nixpkgs, cache.nixos.org had binary artifacts for aarch64-apple-darwin but not for x86_64-apple-darwin; for the referenced version it has artifacts for both. The failure occurs on both architectures though).

Build log
> nix log /nix/store/ngwa65ypzm6gzpgq671fk50iv77bi2a5-rnix-lsp-0.2.3.drv
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/dav99d7fcksybhpfpyy9qmxz1c8r5b07-source
source root is source
Executing cargoSetupPostUnpackHook
unpacking source archive /nix/store/6hgjnhc7qdswn9khscmqmkzkpz2bjsic-rnix-lsp-0.2.3-vendor.tar.gz
Finished cargoSetupPostUnpackHook
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
Executing cargoSetupPostPatchHook
Validating consistency between /private/tmp/nix-build-rnix-lsp-0.2.3.drv-0/source//Cargo.lock and /private/tmp/nix-build-rnix-lsp-0.2.3.drv-0/rnix-lsp-0.2.3-vendor.tar.gz/Cargo.lock
Finished cargoSetupPostPatchHook
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing cargoBuildHook
++ env CC_x86_64-apple-darwin=/nix/store/a2sz5pfcilnp7hw9hhqipvs3rvq3s59v-clang-wrapper-11.1.0/bin/cc CXX_x86_64-apple-darwin=/nix/store/a2sz5pfcilnp7hw9hhqipvs3rvq3s59v-clang-wrapper-11.1.0/bin/c++ CC_x86_64-apple-darwin=/nix/store/a2sz5pfcilnp7hw9hhqipvs3rvq3s59v-clang-wrapper-11.1.0/bin/cc CXX_x86_64-apple-darwin=/nix/store/a2sz5pfcilnp7hw9hhqipvs3rvq3s59v-clang-wrapper-11.1.0/bin/c++ cargo build -j 16 --target x86_64-apple-darwin --frozen --release
   Compiling proc-macro2 v1.0.29
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.75
   Compiling serde_derive v1.0.130
   Compiling autocfg v1.0.1
   Compiling serde v1.0.130
   Compiling memchr v2.4.1
   Compiling cfg-if v1.0.0
   Compiling libc v0.2.101
   Compiling log v0.4.14
   Compiling lazy_static v1.4.0
   Compiling crossbeam-utils v0.8.5
   Compiling ryu v1.0.5
   Compiling serde_json v1.0.67
   Compiling regex-syntax v0.6.25
   Compiling tinyvec_macros v0.1.0
   Compiling itoa v0.4.8
   Compiling matches v0.1.9
   Compiling percent-encoding v2.1.0
   Compiling same-file v1.0.6
   Compiling rustc-hash v1.1.0
   Compiling hashbrown v0.9.1
   Compiling unicode-bidi v0.3.6
   Compiling once_cell v1.9.0
   Compiling cfg-if v0.1.10
   Compiling fnv v1.0.7
   Compiling bitflags v1.3.2
   Compiling countme v2.0.4
   Compiling unicode-width v0.1.9
   Compiling smol_str v0.1.18
   Compiling strsim v0.8.0
   Compiling vec_map v0.8.2
   Compiling ansi_term v0.12.1
   Compiling humantime v2.1.0
   Compiling termcolor v1.1.2
   Compiling tinyvec v1.3.1
   Compiling form_urlencoded v1.0.1
   Compiling walkdir v2.3.2
   Compiling crossbeam-utils v0.6.6
   Compiling thread_local v1.1.3
   Compiling textwrap v0.11.0
   Compiling num-traits v0.2.14
   Compiling memoffset v0.6.4
   Compiling crossbeam-channel v0.3.9
   Compiling crossbeam-channel v0.5.1
   Compiling unicode-normalization v0.1.19
   Compiling aho-corasick v0.7.18
   Compiling bstr v0.2.17
   Compiling atty v0.2.14
   Compiling dirs-sys v0.3.6
   Compiling quote v1.0.9
   Compiling clap v2.34.0
   Compiling dirs v3.0.2
   Compiling idna v0.2.3
   Compiling regex v1.5.4
   Compiling cbitset v0.2.0
   Compiling globset v0.4.8
   Compiling env_logger v0.9.0
   Compiling ignore v0.4.18
   Compiling serde_repr v0.1.7
   Compiling text-size v1.1.0
   Compiling url v2.2.2
   Compiling rowan v0.12.6
   Compiling rnix v0.10.1
   Compiling lsp-types v0.89.2
   Compiling lsp-server v0.5.2
   Compiling nixpkgs-fmt-rnix v1.2.0
   Compiling rnix-lsp v0.2.3 (/private/tmp/nix-build-rnix-lsp-0.2.3.drv-0/source)
    Finished release [optimized] target(s) in 48.20s
Executing cargoInstallPostBuildHook
Finished cargoInstallPostBuildHook
Finished cargoBuildHook
@nix { "action": "setPhase", "phase": "checkPhase" }
running tests
Executing cargoCheckHook
++ cargo test -j 16 --release --target x86_64-apple-darwin --frozen -- --test-threads=16
   Compiling rnix-lsp v0.2.3 (/private/tmp/nix-build-rnix-lsp-0.2.3.drv-0/source)
    Finished release [optimized] target(s) in 2.72s
     Running unittests (target/x86_64-apple-darwin/release/deps/rnix_lsp-fa2f5f71aacc1669)

running 17 tests
test lookup::tests::test_provide_builtins_non_mac ... ignored
test lookup::tests::test_builtin_fallback ... ok
test lookup::tests::test_builtin_from_dump_builtins ... ok
test utils::tests::test_get_offset_from_nix_expr ... ok
test utils::tests::test_lookup_pos_in_expr ... ok
test utils::tests::test_ident_attr_path ... ok
test utils::tests::test_offset_across_multiple_lines ... ok
test utils::tests::test_lookup_pos_out_of_range ... ok
test utils::tests::test_find_ident ... ok
test utils::tests::test_inherit_ident ... ok
test utils::tests::test_offset_too_large - should panic ... ok
test lookup::tests::test_ident_traverse_attr_path ... ok
test lookup::tests::test_suggest_let_in_variable ... ok
test lookup::tests::test_find_inherit_scope ... ok
test utils::tests::test_populate_scope ... ok
test utils::tests::test_populate_scope_legacy_let ... ok
test lookup::tests::test_provide_builtins ... FAILED

failures:

---- lookup::tests::test_provide_builtins stdout ----
thread 'lookup::tests::test_provide_builtins' panicked at 'called `Option::unwrap()` on a `None` value', src/lookup.rs:185:48


failures:
    lookup::tests::test_provide_builtins

test result: FAILED. 15 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.09s

error: test failed, to rerun pass '--bin rnix-lsp'

Steps to reproduce

Steps to reproduce the behavior:

  1. nix build --rebuild github:NixOS/nixpkgs/77fda7f672726e1a95c8cd200f27bccfc86c870b#rnix-lsp

Expected behavior

It should compile.

Additional context

  • Operating system: macOS 12 (both x86_64-apple-darwin and aarch64-apple-darwin)

flake.nix should provide an overlay

Description

The rnix-lsp flake should provide a nixpkgs overlay that defines rnix-lsp, this way I can compose it into my nixpkgs without having to change any configuration that already uses pkgs.rnix-lsp. This would be done with an overlay output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.