Bioconductor / BBS

The Bioconductor Build System
9 stars 11 forks source link

Install Rust #180

Closed jwokaty closed 3 weeks ago

jwokaty commented 2 years ago

Install Rust, depending on acceptance of https://github.com/Bioconductor/Contributions/issues/2732. We may also want to put rextendr as a CRAN dependency.

I used https://www.rust-lang.org/tools/install to install on nebbiolo2.

If the package is accepted, we may want to consider adding it to the docker if it isn't large.

hpages commented 1 year ago

Hi Jen,

Rust and related tools like Cargo are part of Ubuntu and should preferably be installed with sudo apt-get install rustc cargo (standard installation method on Ubuntu). Generally speaking the standard method should be the first choice. It has several advantages:

  1. It guarantees a clean system-wide installation. For example right now, cargo is not available for the pkgbuild user, only for the biocbuild user (and as a consequence new contributed package rd4 fails to install for the pkgbuild user). Installing with apt-get install cargo guarantees that things get installed in standard locations that are available for all the users on the machine.
  2. It's safe. Even though you're using sudo, you can trust that sudo apt-get install ... won't mess up your system. There's no such guarantee with other installation mechanisms.
  3. It makes things a lot easier to uninstall and thus tends to make it easier to keep the machine in a clean state in the long run. Things that have been installed via other installation mechanisms are sometimes hard to uninstall and it can be tricky to bring the machine back to its previous state.
  4. It keeps the setup of the machine simple, easy to document, and easy to replicate. For example, to keep track of new external deps, we just need to add the names of the Debian packages to BBS/Ubuntu-files/20.04/apt_bioc.txt or other appropriate file under BBS/Ubuntu-files/20.04/, making it easy to automate installation across machines including Docker images.

However, there's actually one important exception to the "install with apt-get first" rule: Python modules. These should preferably be installed via pip3 (as documented in Prepare-Ubuntu-20.04-HOWTO.md).

Hope this makes sense.

As always, don't hesitate to ask if you have questions.

H.

jwokaty commented 1 year ago

Thanks for this. This crossed my mind, but I typically pick the recommended way according to the package's documentation since I know that Ubuntu (and Debian) packages can be behind. I'll stick to sudoing in the future. It might be useful to document things like this and as well as criteria/considerations for package inclusion in the future somewhere. I'm closing this issue for now since Rust isn't needed.

hpages commented 1 year ago

It might be useful to document things like this and as well as criteria/considerations for package inclusion in the future somewhere.

You're welcome to copy/paste what I wrote above somewhere in Prepare-Ubuntu-20.04-HOWTO.md.

I'm closing this issue for now since Rust isn't needed.

hmm.. what about rd4? https://github.com/Bioconductor/Contributions/issues/2732#issuecomment-1225248829

jwokaty commented 1 year ago

Ah, I thought Rust is only required if rextendr is required?

hpages commented 1 year ago

No, rd4 still needs Rust + Cargo to install. You can see this when you try to install rd4 with R CMD INSTALL rd4.

hpages commented 1 year ago

It might be useful to document things like this

Just did that: https://github.com/Bioconductor/BBS/blob/master/Doc/Prepare-Ubuntu-20.04-HOWTO.md#important-notes