asdf-community / asdf-poetry

Poetry plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
71 stars 15 forks source link

Feature request: support for installing poetry plugins #45

Open jfly opened 3 weeks ago

jfly commented 3 weeks ago

It would be nice to be able to ensure poetry gets installed with some plugins.

I suppose it would require doing something quite clever with the .tool-versions format. A couple ideas:

  1. Add a special environment variable that contains a (comma separated?) list of plugins to install.
    • This feels unfortunate because it wouldn't give me any mechanism for using poetry 1.2.3 both with a given plugin and without a given plugin.
  2. Do something clever with asdf plugin naming. For example, folks could run asdf plugin-add poetry-with-FOO-with-BAR https://github.com/asdf-community/asdf-poetry.git and under the hood, asdf-plugin would parse the plugin name and install the given plugins (in this case, "FOO" and "BAR") when it installs a particular version of poetry.
    • This is quite a hack, but I think it would work. asdf doesn't seem to pass the plugin name down when invoking install, but we could deduce it from the location of the install script.
jdx commented 3 weeks ago

Configuration is supported in mise.toml, that'd likely be the preferred strategy here. This works today, but the poetry plugin would need to look for the configuration and install the plugins

jfly commented 3 weeks ago

@jdx, for folks like me with no knowledge of mise, could you elaborate a little more? The 2 suggestions I included would work with pure asdf, would yours?