`../sniprun` is not executable
PorcoRosso85 opened this issue · 17 comments
:checkhealth sniprun
might provide welcome additional information
Linking old nixos issues here so I don't forget #137
Is there the case that binary cannot be found despite installation is done?
If there is the way to check any log, I want to know how to fix bug.
Then I suspect the installation hasn't been done
It can happen when a plugin manager installs the plugin (but this fails because no internet / no rust toolchain), then you restore connectivity / install rust. Most plugins manager won't update or reinstall the plugin even if you tell them to because they think everything is up to date.
A common fix would be to remove the plugin, ensuring the path to the repo sniprun ( you see that in your first error ) doesn't exist anymore, and then installing again.
There may be nix shenanigans and I'm not familiar with that, so the 'manual' way would be to to cargo build --release
(equivalent to the bash./install.sh 1
you should have in your plugin manager's config) from sniprun's repo
Well that's kind of a first time sniprun doesn't work this much. And I've had NixOS users who succeeded, so this has no reason to not be doable.
Since the binary is reported to 'crash at start' (checkhealth) but also appear to be compiled successfully, I'm very curious about what happens if you just ... run it.
$HOME/.local/share/nvim/plugged/sniprun/target/release/sniprun
The normal behavior would be to display nothing, and block the terminal until ctrl-c (waiting for rpc communication that won't happen). Maybe we'll have a useful message there.
If there's nothing, maybe we could try to get the backtrace (export RUST_BACKTRACE=1
) or run it through debugging tools.
Seeing similar issues in the latest MacOS. Looks like sniprun is failing to build but install.sh
ignores the failure. If I try to cargo build --release
manually I see:
$ cargo build --release
error: failed to determine package fingerprint for build script for sniprun v1.2.12 (/Users/matt.anger/.local/share/nvim/lazy/sniprun)
Caused by:
failed to determine the most recently modified file in /Users/matt.anger/.local/share/nvim/lazy/sniprun
Caused by:
failed to determine list of files in /Users/matt.anger/.local/share/nvim/lazy/sniprun
Caused by:
failed to open git index at /Users/matt.anger/.local/share/nvim/lazy/sniprun/.git/
Caused by:
invalid data in index - calculated checksum does not match expected; class=Index (10)
I tried deleting and recreating the git repo, doing a git reset --hard origin/master
, all still exhibit the issue. I've tried both latest stable and beta rust toolchains:
cargo --version
cargo 1.69.0-beta.1 (9880b408a 2023-02-28)
It doesn't look like the same issue exactly. @PorcoRosso85 is able to compile the binary, at least. (@PorcoRosso85 , what happens if you directly run the binary from the command line ???)
I don't know what kind of ninja mutant computer can produce your error @AngerM and google is not very talkative about this one. I'm (of course-wouldn't be fun otherwise) not able to reproduce this, be it on stable (1.68), beta (1.69) or nigthly (1.70), from the repo auto-cloned by my package manager (packer).
You could always try to clone this repo independently and compile there (and if it still fails, delete the .git/ folder ?)
Super weird. Had it happen on multiple different machines all with the same error. Doing
$ mv .git .gitbackup
$ cargo build -r
$ mv .gitbackup .git
seems to allow it to build?
Hi.
It worked, thank :)
Maybe, @michaelb ’s documentation is enough also for nixos user.
If anything should be added, it's maybe better for us that there is representation in more detail for manually installation.
It worked
What worked, and what did you do ? Is your original issue solved ?
I'm a little in the dark here, and while I'll gladly document more comprehensively the install procedure on NixOS, I could use some help
Sure (always better than nothing)
using cargo in nixos, there are some choices to install it
- not use nixpkgs
- use nixpkgs for rustup, and then install cargo using rustup
- use nixpkgs for cargo itself
if choose 1
maybe nothing is different to other users
if choose 2 or 3
cargo won't create $HOME/.cargo
so, anyone has to configure the path of cargo themselves
I choosed 2
nixos user maybe have to choose this way:
https://michaelb.github.io/sniprun/sources/README.html#or-install-sniprun-manually
but, as @michaelb told me as below in this issue, some tasks are required
if we add more info to your documentations for stupid user like me,
for example
or install sniprun manually
I trust you know how to add a plugin to the runtimepath, just don’t forget to run ./install.sh, or alternatively, cargo build --release to fetch/build the binary.
or install sniprun manually
I trust you know how to add a plugin to the runtimepath,
- just don’t forget to run ./install.sh,
- or alternatively, cargo build --release to fetch/build the binary
- copy binary to neovim data path, such as ' $HOME/.local/share/nvim/plugged/sniprun/target/release/sniprun'
Hey, I updated the documentation to better explain how to install sniprun on NixOS
You're welcome to suggest improvements to the install script verbosity if you want to