Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Possible error in test_provide_builtins? Mac OS #60

Open
peterbecich opened this issue Oct 18, 2021 · 9 comments
Open

Possible error in test_provide_builtins? Mac OS #60

peterbecich opened this issue Oct 18, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@peterbecich
Copy link
Contributor

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

@peterbecich peterbecich added the bug Something isn't working label Oct 18, 2021
@Ma27
Copy link
Member

Ma27 commented Oct 18, 2021

This is most likely because this testcase explicitly requires nixUnstable, however this is part of the checkInputs. I'm not a Mac user, but IIRC this doesn't have a sandbox which could cause issues, correct?

Would you mind checking which Nix is in use by cloning this repo and adding preCheck = "${pkgs.which}/bin/which nix"; to the derivation in flake.nix and share the result? :)

@peterbecich
Copy link
Contributor Author

peterbecich commented Oct 30, 2021

Thanks

I'm unable to run the preCheck because the error preempts this.

I have upgraded nix from the unstable channel https://search.nixos.org/packages?channel=unstable&show=nix_2_4&from=0&size=50&sort=relevance&type=packages&query=nix

and now have

% nix --version
nix (Nix) 2.4pre-rc1

Unfortunately, an error still occurs; in rnix-lsp:

 % nix build --extra-experimental-features nix-command --extra-experimental-features flakes
error: builder for '/nix/store/qr18i5gs3cnhzyayvgx6nplkf0ydmxxd-rnix-lsp-0.2.1.drv' failed with exit code 101;
       last 10 log lines:
       > ---- lookup::tests::test_provide_builtins stdout ----
       > thread 'lookup::tests::test_provide_builtins' panicked at 'assertion failed: val.1.get(\"abort\").unwrap().documentation.is_some()', src/lookup.rs:317:9
       >
       >
       > failures:
       >     lookup::tests::test_provide_builtins
       >
       > test result: FAILED. 23 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.11s
       >
       > error: test failed, to rerun pass '--bin rnix-lsp'
       For full logs, run 'nix log /nix/store/qr18i5gs3cnhzyayvgx6nplkf0ydmxxd-rnix-lsp-0.2.1.drv'.
       

@peterbecich
Copy link
Contributor Author

Interestingly, the Mac OS test here #61 succeeds:

rnix-lsp> test lookup::tests::test_provide_builtins ... ok(B

@aaronjanse
Copy link
Member

Later this weekend I'll try to see if it's possible to make the error message more helpful when nixUnstable is not found

@peterbecich peterbecich changed the title Possible error in test_provide_builtins? Possible error in test_provide_builtins? Mac OS Nov 1, 2021
@peterbecich
Copy link
Contributor Author

Thanks!

@Ma27
Copy link
Member

Ma27 commented Nov 15, 2021

What's the status here?

@aaronjanse
Copy link
Member

I ended up getting distracted by evaluation + parsing. If anyone else wants to work on a helpful error message, feel free to do so

@peterbecich
Copy link
Contributor Author

peterbecich commented Nov 16, 2021

I've bypassed the error by removing the test:
fn test_provide_builtins() { ...
and installing rnix-lsp from source:
nix-env -i -f .

It appears to work fine.
Thanks

peterbecich pushed a commit to peterbecich/rnix-lsp that referenced this issue Nov 30, 2021
Ma27 pushed a commit that referenced this issue Dec 24, 2021
#60
(cherry picked from commit c682ffa)
@lilyball
Copy link

lilyball commented Jan 6, 2022

I'm getting this issue locally. Interestingly, cache.nixos.org has a binary artifact available for rnix-lsp on aarch64-apple-darwin but not x86_64-apple-darwin (as of NixOS/nixpkgs@5c37ad8), so hydra must be building it on M1 somehow.

Edit: Nevermind, my failure is the same test but a different assertion, it's failing on trying to match against the nix --version output (#75).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants