Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ability to use file-based configuration for additional asdf plugin repos #226

Closed
mark-thm opened this issue Feb 27, 2023 · 6 comments · Fixed by #249
Closed

add ability to use file-based configuration for additional asdf plugin repos #226

mark-thm opened this issue Feb 27, 2023 · 6 comments · Fixed by #249
Labels
enhancement New feature or request

Comments

@mark-thm
Copy link

I'd like to check in my .tool-versions file so that my CI environment and team can use tools all at the same version, but some asdf plugins are in repositories that aren't linked back to the main plugins list (e.g. https://github.com/looztra/asdf-promtool). I'd love to be able to throw the URL for the plugin into the .tool-versions file, perhaps something akin to:

promtool 2.24.0 https://github.com/looztra/asdf-promtool

Or some other file I could check in.

@mark-thm mark-thm added the enhancement New feature or request label Feb 27, 2023
@jdx
Copy link
Owner

jdx commented Feb 27, 2023

I'm considering this with the following syntax:

promtool@https://github.com/looztra/asdf-promtool 2.24.0

what you proposed is tricky since plugins can define multiple versions. I would need to know definitively if the string was a version or a repo.

This could also go into a lockfile (#141) or as part of a custom rtx config (which I want to create anyways), like .rtx.toml.

One issue with this is that it isn't clear what should happen if the plugin url isn't the same as the one specified in .tool-versions. Should it just warn on install?

@jdx
Copy link
Owner

jdx commented Feb 27, 2023

in the meantime, you could setup a custom shorthand repo like this: https://github.com/jdxcode/rtx-shorthands

then share it with your team and have them set that up first

@mark-thm
Copy link
Author

Ah, I wasn't intending to express a preference on syntax, the one you've defined seems adequate. I think if the shorthand repo doesn't match the specified one a warning should be enough.

.rtx.toml also seems very reasonable as a way to solve this, then as simple as dropping an extra mapping.

@jdx jdx linked a pull request Mar 1, 2023 that will close this issue
8 tasks
@jdx jdx removed a link to a pull request Mar 1, 2023
8 tasks
@jdx
Copy link
Owner

jdx commented Mar 2, 2023

I've laid some groundwork for this in #241, currently it parses that config but it doesn't do anything with it just yet

@jdx
Copy link
Owner

jdx commented Mar 2, 2023

I am considering doing this differently though and having a plugins section, e.g.:

[tools]
python = ['3.11', '3.10']
[plugins]
python = 'https://github.com/jdxcode/rtx-python'

I'm not sure which I like better just yet.

@mark-thm
Copy link
Author

mark-thm commented Mar 3, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants