4 ms·
If you're lucky, this can be "carefully, but still automatically". Rust lets you specify an exact toolchain to download in a rust-toolchain file; rustup will t
by twic 9y ago
If you're lucky, this can be "carefully, but still automatically".
Rust lets you specify an exact toolchain to download in a rust-toolchain file; rustup will then download the one you need. For a variety of JVM-based languages, SDKMAN! can install specific versions of the SDK and set them up in your shell; that makes it fairly easy to write build scripts which use a specific version. Where i work, we have packages in our oddball internal dependency management tool which contain the entire GCC toolchain, so i can make sure my C++ projects build with a consistent version.
It would be great if tools like this existed for every language.
Docker offers a semi-reasonable approach to this, too.
- yebyen 9y agoThe Docker approach is IMHO the most reasonable approach, but the fact is that "in a container" is still regarded as a bad word in many places. We're talking about containers but mostly still embargoed from using them for anything serious. I mostly work on Ruby with RVM, where you can specify the exact version of language runtime and every gem dependency in the Gemfile, or let most of the details be inferred by bundler into the Gemfile.lock, and your runtime environment will balk appropriately if it's apparently being asked to run with something other than what you've described there. It's not as concise as `rustup` but I feel like `rvm install ruby-{version}; bundle install` gets me about 97.5% of the way there, to "still automatically" as you've described, with the remaining 2.5% being the native extensions that may have those external library dependencies (which are not part of Ruby at all.)