NeoCode icon indicating copy to clipboard operation
NeoCode copied to clipboard

Repo Needs MacOS dependency check

Open Sewdohe opened this issue 3 years ago • 9 comments

We need the dependency checking function for MacOS to be working, so very vanilla users can jump right into this config without worrying about getting deps. through brew. The script should do all of that for them, however, I don't have a mac so is hard for me to test if I were to write it.

I know we actually have a good amount of mac users here, anyone want to take on the job of writing / testing this?

Writing the windows dep installer was a pain, tbh, I had to install and uninstall scoop 1,000 times. It's a rather annoying undertaking, just a fair warning ⚠️

But you can basically follow the code written for the check_dependencies function for windows, just replacing everything with brew install instead of scoop install.

Sewdohe avatar Feb 22 '22 18:02 Sewdohe

I really want to get the macOS binary having the dep installer so I can add it to the releases page. The whole point of the project is to reduce the entry barrier for NeoVim and I think having to install deps may deter some potential users?

Sewdohe avatar Feb 22 '22 18:02 Sewdohe

I can take a look at it. Though I can't guarantee anything yet, most Homebrew testing can also be done through linux so you can try some stuff out as well

brukberhane avatar Feb 22 '22 18:02 brukberhane

Oh, I wasn't aware that brew was available to linux distros as well. That's actually great news as I didn't know how to approach the linux deps installer as each linux distro uses a different package manager

Sewdohe avatar Feb 22 '22 18:02 Sewdohe

Yeah Homebrew could potentially simplify the fragmentation of Linux distros as well.... although scripting might be the way to go when it comes to linux...

brukberhane avatar Feb 23 '22 02:02 brukberhane

Yeah Homebrew could potentially simplify the fragmentation of Linux distros as well.... although scripting might be the way to go when it comes to linux...

Well I was looking at a crate for Rust, which will return the linux distro as well as a more "generalized" distro. e.i. Pop OS returns LIKE Ubuntu, so we'd know we can use the apt package manager. Same thing would work for Manjaro / arch and packman, etc.

Sewdohe avatar Feb 23 '22 02:02 Sewdohe

Dependency check script is live if anyone wants to try it and confirm!

Run the binary with the --deps flag

Sewdohe avatar Feb 28 '22 05:02 Sewdohe

It doesn't install Homebrew for you.... I couldn't decide whether to do that for them or not.

brukberhane avatar Feb 28 '22 06:02 brukberhane

It doesn't install Homebrew for you.... I couldn't decide whether to do that for them or not.

Good point, not sure if we should!

I think this way we could either:

  • think about "packing" them into the installer (e.g. pgAdmin packs its own binaries to interact with the DB)
  • Install them at runtime. Where they would be installed only if they exists

Also, would it be worth it to identify the exact list of dependencies needed for each OS? Thinking of writing flexible code that just installs differently depending on the OS!

lzambarda avatar Feb 28 '22 13:02 lzambarda

It doesn't install Homebrew for you.... I couldn't decide whether to do that for them or not.

Good point, not sure if we should!

I think this way we could either:

* think about "packing" them into the installer (e.g. pgAdmin packs its own binaries to interact with the DB)

* Install them at runtime. Where they would be installed only if they exists

Also, would it be worth it to identify the exact list of dependencies needed for each OS? Thinking of writing flexible code that just installs differently depending on the OS!

This is basically what we're working on. The script can check for a binary on the PATH variable, and uses an OS dependent package manager to install the dependencies if they aren't found on the PATH.

The script uses rust's cfg decorator to conditionally compile certain code for certain systems, and we are exposing options as flags for the installer. For example, --deps will call the dep checker before installing the config, and --intstall-packer will headlessly run Neovim with :PackerInstall to install all plugins before first boot.

We are slowly but surely getting there lol

Sewdohe avatar Feb 28 '22 17:02 Sewdohe