Giter VIP home page Giter VIP logo

bob's Introduction

Hi ๐Ÿ‘‹, I'm Mordechai Hadad

A passionate backend developer from Israel

Languages and Tools:

bash cplusplus csharp docker git linux postgresql python rust sqlite tailwind typescript

mordechaihadad

mordechaihadad

ย mordechaihadad

mordechaihadad

bob's People

Contributors

0atman avatar avishayy avatar aymanalqadhi avatar damingerdai avatar danirdd92 avatar deepsource-io[bot] avatar dhruvinsh avatar dvchoudh avatar guilhas07 avatar kianmeng avatar lmburns avatar lostl1ght avatar mordechaihadad avatar n-shift avatar orhun avatar owittek avatar princejoogie avatar rachmadaniharyono avatar saguywalker avatar tamton-aquib avatar tranzystorekk avatar tversteeg avatar utilyre avatar utkarshgupta137 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

bob's Issues

issue : bob use xxx

when i use custom configuration, the following error:

โžœ bob use stable
Oct 13 14:01:26.334 ERROR Error: ๅฆไธ€ไธช็จ‹ๅบๆญฃๅœจไฝฟ็”จๆญคๆ–‡ไปถ๏ผŒ่ฟ›็จ‹ๆ— ๆณ•่ฎฟ้—ฎใ€‚ (os error 32)

i'm thinking if install,uninstall,use will read the config file๏ผŒi think it should be putting the config file with the execute file

OS: Windows 11

Add Linux ARM build for M1 devices

Hello from Asahi Linux! Could you add aarch64-linux for m1 linux please?

I'm hoping this can be as simple as it was for #22 ?

Thank you so much! ๐Ÿ˜ƒ

Possible to install prerelease?

Hey, I just wanted to know if it is/will be possible to install prerelease version using bob use prelease ?
Thanks for your time, and btw really good plugin!

Cannot use with multiple users

It doesn't seem to be possible to install this properly for multiple users.

In an Ubuntu 20.04 installation, if I first bring in the binary from the releases page as the root user into /usr/bin, and run bob install stable and then bob use stable, if I try to use the binary as another user, I will get ERROR Error: Couldn't create downloads directory.

If I try to uninstall bob using bob erase, and set ownership of the bob binary to the non-root user, and then try to subsequently run bob install stable, I will still get ERROR Error: Couldn't create downloads directory. If I run bob using sudo, I can install the package, but it still installs to /root/.local/share/neovim/bin, so it seems there is still some config left over that isn't cleaned up with erase.

nvim-qt.exe proxy opens a console window

The nvim-qt proxy added in #116 opens a console window on Windows when executed, so every instance of nvim-qt I have open now has two windows open until I exit nvim-qt. Any way to get around that?

Why isn't this crate uploaded to `crates.io`?

I understand the conflict with the existing bob crate, but why not at least upload it under a different name? I know I could technically install it using the --git and --tag arguments to cargo, but that's pretty unorthodox (and tedious). Is there a specific reason it was done this way?

Use the XDG Base Directory Specification

Right now the directories are hard-coded for each OS.

I really like that the directories that are currently used โ€“ even though hard-coded โ€“ adheres to the standard directories of each OS:

It would be really cool if the paths were first checked using the XDG Base Directory Specification and fall back to the OS-specific locations.

  • $HOME for the home directory
  • $XDG_DATA_HOME for the local data directory. $HOME/.local/share by default.
  • $XDG_CONFIG_HOME for the config directory. $HOME/.config by default.

The downloads and installation directory are not part of the specification but can be defined as custom directories and can already be configured using downloads_location and installation_location.

As an alternative/bonus it would also be cool if the local data and config directories could be changed using environment variables โ€“ $BOB_DATA_HOME and $BOB_CONFIG_HOME maybe?

What am I supposed to add to my PATH?

Hey ๐Ÿ‘‹๐Ÿพ

I'm just trying this out as I think it is amazing. But I fail to do so. Simply because I don't know where the bob use version is set/placed/... I can see the installed versions in ~/.local/share/bob. But there is nothing relevant in ~/.local/share/nvim. So I'm unsure which path I need to add to my $PATH here as I can't set it to all **/*bin folders of ~/.local/share/bob. It also doesn't change anything to manually set the installation_location in the configuration file. What am I missing?

Thanks for your help in advance!

Error: Couldn't find bob.json

First off, thanks for making this tool!

After the recent update that addresses nightly not being updated, I'm getting this error when running bob use nightly.
The output of the command is:

Mar 13 01:19:18.878  INFO Looking for nightly updates
Mar 13 01:19:18.957 ERROR Error: Couldn't find bob.json

bob list output:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Version  โ”‚  Status     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  nightly  โ”‚  Installed  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

I have tried bob erase and reinstalled nightly, it installs fine but errors when trying to use it. I'm on version 2.1.2

Running `cargo install bob-nvim` on Macos results in compile error.

wup,

I am not so familiar with rust and cargo so this might be an easy one to solve but atm this is what I get when trying to install bob.

โ•ฐ๏‘  cargo install bob-nvim
    Updating crates.io index
  Installing bob-nvim v1.2.1
error: failed to compile `bob-nvim v1.2.1`, intermediate artifacts can be found at `/Users/hjalmarjakobsson/.local/share/cargo/target`

Caused by:
  failed to select a version for the requirement `clap = "^4.0.15"`
  candidate versions found which didn't match: 3.2.23, 3.2.22, 3.2.21, ...
  location searched: crates.io index
  required by package `bob-nvim v1.2.1`

Changing `XDG_DATA_HOME` and `XDG_CONFIG_HOME` before nvim command resutls error

I am following this tutorial to learn how to configure neovim (link) with lua and there we are trying to create a isolated environment to not interfere with any existing configuration.
When I am trying this XDG_DATA_HOME=$NVIM_BEGINNER/share XDG_CONFIG_HOME=$NVIM_BEGINNER nvim it gives me following error:
ERROR Error: The used file required for bob could not be found. This could mean that Neovim is not installed through bob.
I have made sure that I don't have any other installation of neovim other than the one created by bob

Error: Couldn't create downloads directory

After updating to the latest version (2.1.0), I get this error:

image

I am on macOS. I didn't have this issue with 2.0. Also, I already have the new bob location:

image

Also, I do not have any config file.

Using neovim installed with bob as sudo

Hi! First of all, all compliments to you, this is an amazing project.

Today I tried to use the neovim as sudo, and noticed that it does not work.

What I tried:

  • set SUDO_EDITOR, VISUAL and EDITOR to nvim
  • sudo nvim ... prints:
    sudo: nvim: command not found
  • sudo -e ... opens the file in default editor nano
  • sudoedit ... opens the file in default editor nano

I'm currently using Fedora Workstation 37.

Is there some configuration I'm missing, or is this something that generally does not work right now. If it's the latter, then please consider this as a feature request. I would also gladly try to help with the implementation of this if help is needed.

ERROR Error: environment variable not found

Hello, I am using docker in macbook M1 and the image I am using is ubuntu: 22.04. I get this error either by downloading directly or installing with cargo. How should this be solved?

image

bob installs strange nvim binary on aarch64 system

oatman@oatman-m1:~ -$ bob list
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Version  โ”‚  Status     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  v0.8.3   โ”‚  Used       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

oatman@oatman-m1:~ -$ ~/.local/share/bob/nvim-bin/nvim
thread 'main' panicked at 'Failed to spawn child process: Os { code: 8, kind: Uncategorized, message: "Exec format error" }', /home/oatman/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bob-nvim-2.1.2/src/main.rs:57:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

oatman@oatman-m1:~ 101$ uname -a
Linux oatman-m1 6.1.0-asahi-2-2-edge-ARCH #2 SMP PREEMPT_DYNAMIC Fri, 16 Dec 2022 05:04:23 +0000 aarch64 GNU/Linux

oatman@oatman-m1:~ -$ file ~/.local/share/bob/nvim-bin/nvim
/home/oatman/.local/share/bob/nvim-bin/nvim: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=3316a51827a56c2b724f2d97ddf55a8d7731a641, for GNU/Linux 3.7.0, with debug_info, not stripped

cargo install failed

first using cargo 1.58.0 i got following error

> cargo install --git https://github.com/MordechaiHadad/bob.git -F bob/rustls
error: Found argument '-F' which wasn't expected, or isn't valid in this context

USAGE:
    cargo install --git <URL>

so i update my to cargo 1.61.0

> cargo install --git https://github.com/MordechaiHadad/bob.git -F bob/rustls
error: Found argument '-F' which wasn't expected, or isn't valid in this context

        If you tried to supply `-F` as a value rather than a flag, use `-- -F`

USAGE:
    cargo install [OPTIONS] [--] [crate]...

so install with only the url and it work cargo install --git https://github.com/MordechaiHadad/bob.git

openssl version

> openssl version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)

[Feature request]: Install older nightly versions

The reason I am requesting this is because the latest nightly version has caused an error with an autocommand that I have that restores the cursor position. I would like to continue using the autocommand, but find it somewhat difficult to go to a previous nightly version. If I install the stable release then some of the api calls I have in my configuration won't work.

Would it be possible to specify a date for the nightly version release? If something like this were to happen again, I could just do bob install nightly <yesterday's date>.

Another option would be to use the commit hash like bob install nightly 60604d6. Or the nightly could be dropped and just a commit hash could be given.

Editing to say that I am unsure exactly how to see previous nightly releases. I can't seem to figure out how to find older versions that have been released with the tag nightly. I still think that the commit hash would work as an option to rollback the current nightly version.

bob sync alwas returns error

Hi,

everytime I run bob sync, I'll get the following error:

$ bob sync
Mar 13 10:44:55.490 INFO Starting sync process
Mar 13 10:44:55.491 INFO Using version v0.8.3
set in /home/xyz/.config/bob/nvim.version
Mar 13 10:44:55.491 ERROR Error: Please provide a proper version string

My config file in ~/.config/bob:

$ cat config.json
{
"enable_nightly_info": true,
"downloads_location": "/home/xyz/.local/share/bob",
"installation_location": "/home/xyz/.local/share/bob/nvim-bin",
"version_sync_file_location": "/home/xyz/.config/bob/nvim.version",
"rollback_limit": 3
}

My nvim.version in ~/.config/bob:

v0.8.3

Bob was installed via cargo:
cargo 1.67.1 (8ecd4f20a 2023-01-10)
rustc 1.67.1 (d5a82bbd2 2023-02-07)
OS is Ubuntu 22.04.2

I don't understand, why I get this error. I checked the version string online against the regular expression from bob, I tried "stable" and "nightly" as version strings, but I always get the described error.
Any clues, what's going wrong?

zsh: exec format error: ./.local/share/bob/v0.8.3/nvim-linux64/bin/nvim

Running ARM Ubuntu on Oracle cloud. Bob installed x86_64. Installed bob using cargo install --git https://github.com/MordechaiHadad/bob.git (if it matters)

โ•ญโ”€ubuntu on instance-20221207-0257 in ~ 23-03-07 - 17:50:13
โ•ฐโ”€ file ./.local/share/bob/v0.8.3/nvim-linux64/bin/nvim
./.local/share/bob/v0.8.3/nvim-linux64/bin/nvim: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=5d575f4797452c24c5893fdb1c0317e2d8be2340, for GNU/Linux 3.2.0, with debug_info, not stripped

failed to install when trying to use bob as a standalone

i installed bob by downloading the binary from releases section
extracting it to ~/.bob/bin
exporting the path in zshrc
and changing it to a executable by chmod +x bob

yet
on calling this cmd
bob use stable
the following error is returned

bob: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

i tried installing openssl, but it is manually installed for me

i m using ubuntu 22.04(LTS)

i dont want to install rust for bob therefore if someone could provide a solution to install dependencies without making much changes to my system files..

Feature Request - Support environment variables in configuration paths

Hey ๐Ÿ‘‹๐Ÿพ

I would like to ask if it would be possible to allow using environment variables within the configuration file. Especially for the paths. I want to be able to do something like this:

{
  "installation_location": "$XDG_DATA_HOME/bob/bin"
}

Is that hard to do in regards of multi OS support?

Feautre request - Export current version to a local file

Hey, thank you for developing bob!

I want to track the current nvim version I use, specifically track it using version control, so if a plugin / configuration I use stopped working after changing neovim's version, I would be able to tell so after a while if I haven't seen the issue immediately.

What's nice is that using bob install (without an argument) can now look at that configured file and install the version from there rather than expect the version. (WIth an appropriate log message)

Ideally, this would be a config, and I'd use a workflow of this sort:

bob use 0.9.0
# bob writes the 0.9.0 to a preconfigured file, let's say `/Users/user/.config/nvim/bob.version`
git add bob.version
git commit -m "neovim upgraded to 0.9.0"

Then it'd be really easy for me to see when I actually changed versions, and potentially I can also use git bisect to find out if the reason my config suddenly has issues is due to upgrading the version (of course, bob install would be needed between each step)

Right now I implemented this for myself using simple zsh wrappers around bob install, but having this as a built-in feature would be really nice.

If it's something you want to support, I'll gladly work on it and open a PR.

invalid peer certificate

Hello,

I wanted to see if you had any ideas how to get bob working in a corporate environment? (self signed cert / transparent proxy)

bob is returning the following error.

$ bob install nightly
Jan 09 08:53:38.845 ERROR Error: error sending request for url (https://api.github.com/repos/neovim/neovim/releases/tags/nightly): error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer

I've tried sending the same request via curl, and it works fine. (i receive the correct JSON response)

curl --request GET --url "https://api.github.com/repos/neovim/neovim/releases/tags/nightly" --header "Accept: application/vnd.github+json" --header "user-agent: bob"

Are you aware of any options I may have? I don't know anything about rust, but i can see you're using reqwest's get.

Idea to solucionate MacBook M1 Pro install problem

I have the same issues as #32

I don't know rust, but I think you could add an if statement to check the target architecture so you can differentiate mac intel from M1, then the symlink is created correctly and also set correct permissions to the files.

So I think this could be a solution using target_arch

use_handler.rs
...
        } else {
            use std::os::unix::fs::symlink;
            let folder_name = if cfg!(target_os = "macos") {
                if cfg!(target_arch = "arm") {
                    "nvim-macos"
                } else {
                    "nvim-osx64"
                }
            } else {
                "nvim-linux64"
            };
            if let Err(error) = symlink(format!("{base_path}/{folder_name}"), &installation_dir) {
                return Err(anyhow!(error))
            }
        }
....
expand_archive.rs
...
    pb.finish_with_message(format!(
        "Finished expanding to {}/{}",
        downloaded_file.path, downloaded_file.file_name
    ));
    let platform = if cfg!(target_os = "macos") {
        if cfg!(target_arch = "arm") {
            "nvim-macos"
        } else {
            "nvim-osx64"
        }
    } else {
        "nvim-linux64"
    };
    let file = &format!("{}/{platform}/bin/nvim", downloaded_file.file_name);
    let mut perms = fs::metadata(file)?.permissions();
    perms.set_mode(0o111);
    fs::set_permissions(file, perms)?;
    Ok(())
...

sorry if there are syntax errors ๐Ÿ˜…. Also, I can open a PR if you guide me on how to test it.

MacBook M1 Pro install problem

thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: No such file or directory (os error 2)', src/modules/expand_archive.rs:12:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

image

Does not work

Linux Kubunut 20.04
Konsole with zsh
cargo version 1.59.0
bob_issue

Error: Couldn't create downloads directory

I follow the build instruction on an aarch64 machine. Building itself was successful, but when running bob list I got

ERROR Error: Couldn't create downloads directory

Is there a way to include nvim-qt on Windows?

Hi,

This is the first time I have used bob, is there a way to include nvim-qt? I did not see it mentioned in the readme. In the case that it actually should be available, there are the steps I took to get started:

bob install nightly
bob use nightly
ls C:\Users\xxx\AppData\Local\bob\nvim-bin\


    Directory: C:\Users\xxx\AppData\Local\bob\nvim-bin


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        18/03/2023   9:10 PM        4768768 nvim.exe

ERROR: failed to compile

Description

Error while compiling bob.

   Compiling bob v1.1.2 (/home/nikit/.cargo/git/checkouts/bob-f97b36b3fbc90c07/d4c00fc)
error[E0433]: failed to resolve: could not find `private` in `anyhow`
   --> src/modules/install_handler.rs:112:49
    |
112 |                     let chunk = item.or(anyhow::private::Err(anyhow::Error::msg("hello")))?;
    |                                                 ^^^^^^^ could not find `private` in `anyhow`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `bob` due to previous error
error: failed to compile `bob v1.1.2 (https://github.com/Mordech

Version

openssl 1.1.1q
rustc 1.62.1 (e092d0b6b 2022-07-16)

Operating system and version

Gentoo Base System release 2.8 x86_64
Kernel: 5.15.59-gentoo

Steps to reproduce

  1. Run: cargo install --git https://github.com/MordechaiHadad/bob.git -F bob/openssl

Expected behavior

Compilation completed successfully.

Actual behavior

Got an error above.

Can't use `nvim` from non-administrative terminal on Windows

When installing and switching to a new version of neovim, the nvim command can only be accessed on an administrative terminal. I've tested installing and switching on both non-administrative and administrative terminals only to get the same issue. I was able to fix it by restarting my computer, although that shouldn't be necessary.

For some background, this is my first time installing and using bob. I was also using PowerShell.

bob install nightly|stable fails

I'm on MacOS and I can't install nvim nightly nor stable. When it fails, bob stops working (complaining about bob.json) and I have to run it again so that responds again.

Using bob install with version number works fine tho.

I'm using the one from the Releases page, as it was impossible to compile it nor install it with cargo.

froura@Devourer 
--------------- 
OS: macOS 12.5 21G72 x86_64 
Host: MacBookPro16,1 
Kernel: 21.6.0 
Uptime: 59 mins 
Packages: 59 (brew) 
Shell: zsh 5.8.1 
Resolution: 1792x1120 
DE: Aqua 
WM: Amethyst 
Terminal: tmux 
CPU: Intel i7-9750H (12) @ 2.60GHz 
GPU: Intel UHD Graphics 630, AMD Radeon Pro 5300M 
Memory: 13865MiB / 32768MiB 

image

Use proxy executable

According to #65, bob uses symlinks to nvim to avoid updating the PATH each time the version is switched. This comes with numerous issues, with one being Windows requiring administrative privileges.

To solve this, use a proxy executable named nvim that is in the PATH, that simply redirects to the currently used nvim executable. This process is used by rustup/cargo, as well as aftman (which you could reference). It allows much more flexibility for how nvim is called and used, and avoids the need for administrative privileges to create symlinks. It may come with other benefits as well, but I'd have to do more research.

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.