Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Dependencies to Installation Docs #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christopher-besch
Copy link
Contributor

@christopher-besch christopher-besch commented Dec 4, 2021

closes LunarVim#2028
There is probably a lot more to be added here but this is at least a start.

@chase
Copy link
Contributor

chase commented Dec 4, 2021

xclip applies to Linux, maybe not macOS and certainly not Windows.
This is also missing ripgrep, for what it's worth.

Copy link
Contributor

@kylo252 kylo252 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea, but it might be better to link the actual tools instead.

We also don't need either cargo or xclip.

Comment on lines +9 to +10
- `cargo`
- `xclip`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `cargo`
- `xclip`
- `rg`

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand where the connection between cargo and xclip is. When I installed LunarVim with cargo as a dependency, xclip was still missing.

@abzcoding
Copy link
Member

Sidenote: when the installer asks you for rust dependencies, it will install fd-find and ripgrep for you

@chase
Copy link
Contributor

chase commented Dec 4, 2021

@kylo252 The installer uses cargo to install ripgrep and fd-find, so maybe it should go in there and rg and fd should sub-items of it: https://github.com/LunarVim/LunarVim/blob/rolling/utils/installer/install.sh#L242-L251

@christopher-besch
Copy link
Contributor Author

Sidenote: when the installer asks you for rust dependencies, it will install fd-find and ripgrep for you

I'm pretty sure it doesn't, as it didn't ask me when I installed the latest version, which lead to the referenced Issue.

@kylo252
Copy link
Contributor

kylo252 commented Dec 4, 2021

@kylo252 The installer uses cargo to install ripgrep and fd-find

The thing is that you can install these through your package manager or something and never have to deal with cargo 🤷

I'm pretty sure it doesn't, as it didn't ask me when I installed the latest version, which lead to the referenced Issue.

Maybe you missed it, since it's optional.

@christopher-besch
Copy link
Contributor Author

christopher-besch commented Dec 4, 2021

Maybe you missed it, since it's optional.

Maybe I did, but the installer never asked me so I don't even now where I should've been looking.

@kylo252
Copy link
Contributor

kylo252 commented Dec 4, 2021

Maybe I did, but the isntaller never asked me so I don't even now where I should've been looking.

Which system did you say you were using? I know that Debian has some other fd by default.

@chase
Copy link
Contributor

chase commented Dec 4, 2021

@kylo252 The installer uses cargo to install ripgrep and fd-find

The thing is that you can install these through your package manager or something and never have to deal with cargo shrug

While it may be optional, I think it's the most direct way to getting them installed. Also distros may have out of date versions of the software or like in Ubuntu, doesn't install the binary as fd.

There are also cases, like on macOS, where the package manager is unreliable and often comes with out of date software and in the case of Homebrew, it often compiles from source anyway.

@kylo252
Copy link
Contributor

kylo252 commented Dec 4, 2021

There are also cases, like on macOS, where the package manager is unreliable and often comes with out of date software and in the case of Homebrew, it often compiles from source anyway.

It's a bit more tricky with macOS and where to get cargo, see LunarVim/LunarVim#1021 (comment)

@christopher-besch
Copy link
Contributor Author

Which system did you say you were using?

I'm using Manjaro which initially lacks both xclip and fd. I've also tested Ubuntu and Fedora, where they're installed by default. On Debian xclip is missing but fd is fine.

@Uzaaft
Copy link
Contributor

Uzaaft commented Dec 11, 2021

In Debian, fd references to another binary and not https://github.com/sharkdp/fd. Ref: The docs of https://github.com/sharkdp/fd
I am not sure of the Debian fd is the same as the rust package find-fd that LunarVim uses, since I don't use Debian and can't find any docs on this. @christopher-besch Could you look into this, since it seems like you have a Debian system? A fast fd -h might be sufficient.

@christopher-besch
Copy link
Contributor Author

Interesting...
The Debian package for fd is called fd-find. I installed that and it exposed fd only through fdfind, without the dash. There is no fd package for Debian.
This is the help page you requested:
image

@christopher-besch
Copy link
Contributor Author

I wonder if LunarVim is even capable of finding that weird fdfind command.

@kylo252
Copy link
Contributor

kylo252 commented Dec 12, 2021

I wonder if LunarVim is even capable of finding that weird fdfind command.

I'm always hesitant to how much additional processing I can do in the installer because it's a headache not being able to use basic bash features (e.g. associative arrays) on macOS 😢

see LunarVim/LunarVim@a9bf1d0 (#1052)

I'd much rather stop trying to re-invent the wheel and instead use actual native tools per-platform for detecting dependencies.

@Uzaaft
Copy link
Contributor

Uzaaft commented Dec 12, 2021

You can alias fdfind to fD, just follow the guide in the docs.

@christopher-besch
Copy link
Contributor Author

christopher-besch commented Dec 12, 2021

You can alias fdfind to fD, just follow the guide in the docs.

But that's something the user has to do. It's obviously be much more convenient for the installation script to do that job.

I'm always hesitant to how much additional processing I can do in the installer [...]

I feel you. Your efforts are very much appreciated!
What kind of dependency detection tools are you thinking about?

@Uzaaft
Copy link
Contributor

Uzaaft commented Dec 12, 2021

You can alias fdfind to fD, just follow the guide in the docs.

But that's something the use has to do. It's obviously be much more convenient for the installation script to do that job.

I'm always hesitant to how much additional processing I can do in the installer [...]

I feel you. Your efforts are very much appreciated! What kind of dependency detection tools are you thinking about?

If the user chooses to manually install all dependencies, I think they should do the job.

Regarding the detection of dependencies, are we talking about only the *NIX systems? If so, I got a neat built in method that I use in my fish config.

if command -v <the_command> &> /dev/null
     do_stuff_if_command_is_found
else
    do_something_else
end

The fish code above should Posix compliant

@kylo252
Copy link
Contributor

kylo252 commented Dec 12, 2021

But that's something the user has to do. It's obviously be much more convenient for the installation script to do that job.

I don't think it's that easy to do with only user-level privileges. Hell, some users don't even have npm install working without sudo. And technically, none of these are a requirement, but more in the quality-of-life category.

I feel you. Your efforts are very much appreciated!

Thank you ❤️

What kind of dependency detection tools are you thinking about?

Ideally, your package manager should deal with this, because the alternative is very time-consuming when trying to create a cross-platform dependency-aware installer from scratch.

@christopher-besch
Copy link
Contributor Author

Ideally, your package manager should deal with this [...]

So we'd need to publish LunarVim on all kinds of package managers?

@kylo252
Copy link
Contributor

kylo252 commented Dec 12, 2021

So we'd need to publish LunarVim on all kinds of package managers?

Only the most popular ones from each platform:

  • Linux: PKGBUILD and maybe Nix
  • OSX: Homebrew
  • OpenBSD: these gurus can handle following simple instructions
  • Windows: maybe scoop (although I just realized that we can re-use PKGBUILD with msys!)

The alternative is that someone has to write that package manager just for lunarvim 😞

@christopher-besch
Copy link
Contributor Author

What about Arch?

@Uzaaft
Copy link
Contributor

Uzaaft commented Dec 14, 2021

Arch uses PKGBUILD.
Example: Tensorflow PKGBUILD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Telescope File Finder doesn't Ignore .gitignore
5 participants