Replies: 7 comments 17 replies
-
Great question! It's been in the back of my mind as of late. My take is that 3 is the most logical one and aligns with tea's goal of full portability without muddying the developer environment with randomly versioned gem binaries. However I'd only prefer it to option 2 if it allows the user to install and execute gems by Ruby version: $ tea +ruby-lang.org^3 gem install cocoapods
$ tea +ruby-lang.org^3 pod install Without support for that, needing to add specific gem bins to PATH defeats said portability goal IMO. As an aside, |
Beta Was this translation helpful? Give feedback.
-
Here are my 2 cents. There are 3 use cases. Developer experience. I've used Python and a little Node. What I've noticed with Python is that Python libraries and projects are so dependent on the version of python, that it all is bundled together, ala Option 3. Node installs the libraries in each project directory but installs Node so that it's in the path. I prefer the python way because if I'm working on 2 different Node projects requiring different versions of Node, I have to use nvm to switch, which is a pain. My experience distributing a Python project is not good because it really needs to be in a virtual environment so that users can have different versions of Python. I think this is really a problem with Python because Python changes fast. I think tea can really solve this problem. I have a lot of software deployment experience and it's always been intermixed with the OS (like yum/apt) or Brew's approach. This is a horrible developer experience but a great user experience. I'm hoping that tea will do option 3 but with the ability to add symlinks to any location in the PATH. Other languages may work better with different options. So I can only speak about what I know. |
Beta Was this translation helpful? Give feedback.
-
Yeah not an easy question. I fully understand the benefits of option 3. Especially for developers etc. However, if you’re not an actual developer but just someone who likes to play around and/or improve your machine, and perhaps fiddling around with some tools… I would absolutely like to have a more brew-like experience when installing tools (or at least an option/flag). Just one example, I usually want to install coreutils and other GNU tools on my Mac, Homebrew have the option to add to (man)path or prefix with a letter g. With tea I need to manually symlink every tool. And I don’t get the right manpath. Or create a bunch of unnecessary aliases. The same goes for several other tools as well. So I always end up using brew, just one simple command and everything just works. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback everyone. I think the RFC is overly complicated, it is in fact a decision between two different approaches:
With a secondary consideration for both of where should the binfiles go? eg. if I |
Beta Was this translation helpful? Give feedback.
-
I had another idea that relates to this. I was thinking of how to install the stable diffusion apps and they download the same model files that are over 4 gigs. The best way to manage the models is to put them in a global location. Second, they also save the output images inside of the folder that contains the code, which to me is... an anti-pattern (probably not the right word, but you get the idea). I am pretty sure InvokeAI and Automatic1111 can be configured, so they'd have to be configured. But then what do we configure the model and output directories to be? |
Beta Was this translation helpful? Give feedback.
-
I’m formulating the following idea:
|
Beta Was this translation helpful? Give feedback.
-
There should an option to have a custom location for dependency cache, and project local path for specific dependency graph needed for that project. For example, the global cache for Gitpod needs to be in |
Beta Was this translation helpful? Give feedback.
-
Motivation
One of the core benefits of
tea
: it's relocatable.tea
does not pollute your system environment, everything gets "installed" in a relocatable folder~/.tea
.tea
can also install languages likenode
andruby
and it's dependency managers,npm
andgem
, respectively.However, these language dependency managers install packages to global directories like
~/.npm
and~/.gem
.Tools from these ecosystems expect to find packages in these locations.
In this RFC, we would love to hear feedback from the community.
Proposal
There are a couple of options that we are weighing:
~/.gem
~/.local/bin
tea
's directory, i.e.~/.tea/foo
Option №1 Dependency manager's default location
Languages and their dependency managers have set default locations for their package installations. Tea should not change how or where
gem
installs Ruby gems. Tea packagesruby
andgem
and leaves the rest to them.tea
, it will be installed here:~/.tea/ruby-lang.org/v3.2.1/bin
~/.gem
Option №2 General location
Tea is a package manager that cares about developer experience and by following that mantra, a general location, which is already in the user's
$PATH
should be picked as a logical install location.tea
, it will be installed here:~/.tea/ruby-lang.org/v3.2.1/bin
.~/.local/bin
or/usr/local/bin
or~/.tea/bin
.Option №3 A
tea
locationTea is relocatable and stows packages in a "sandbox". If you want to remove a particular package from your
tea
installation, you simply remove the package folder:rm -r ~/.tea/foo.org
tea
, it will be installed here:~/.tea/ruby-lang.org/v3.2.1/bin
~/.tea/ruby-lang.org/v3.2.1/bin
The benefit: if I want to remove a particular version of Ruby, along with all installed gems, I simply remove
~/.tea/ruby-lang.org/v3.2.1
.Beta Was this translation helpful? Give feedback.
All reactions