Skip to content

feat(.tool-versions): support for a new tool#2265

Merged
olblak merged 15 commits intoupdatecli:mainfrom
v1v:feature/use-tools-version
Jul 9, 2024
Merged

feat(.tool-versions): support for a new tool#2265
olblak merged 15 commits intoupdatecli:mainfrom
v1v:feature/use-tools-version

Conversation

@v1v
Copy link
Copy Markdown
Contributor

@v1v v1v commented Jul 2, 2024

Support for .tool-versions format, see https://asdf-vm.com/manage/configuration.html#tool-versions

Test

To test this pull request, you can run the following commands:

cd pkg/plugins/resources/toolversions 
go test

PASS
ok  	github.com/updatecli/updatecli/pkg/plugins/resources/toolversions	1.030s
cd pkg/plugins/utils/toolversions
go test
PASS
ok  	github.com/updatecli/updatecli/pkg/plugins/utils/toolversions	0.378s

Additional Information

Tradeoff

Potential improvement

Support for the autodiscovery?

@olblak olblak added the enhancement New feature or request label Jul 3, 2024
@olblak
Copy link
Copy Markdown
Member

olblak commented Jul 3, 2024

Support for the autodiscovery?

Is there an API that we can query to retrieve the package version?

@v1v
Copy link
Copy Markdown
Contributor Author

v1v commented Jul 3, 2024

Is there an API that we can query to retrieve the package version?

I've been thinking of using an ad hoc implementation for some of the known tools, such as Golang, Python, Java, or similar ones.

For instance, there are some GitHub actions in charge of configuring some tools and installing the given version or aliases:

I don't know if a similar implementation to what Jenkins does for crawling the tools:

Could be an option?

What do you think? Am I thinking this too much, and it might not be something worthy to do it?

@v1v v1v changed the title 🏗️ feat(.tool-versions): support for a new tool feat(.tool-versions): support for a new tool Jul 3, 2024
@v1v v1v marked this pull request as ready for review July 3, 2024 07:13
@dduportal
Copy link
Copy Markdown
Contributor

Is there an API that we can query to retrieve the package version?

I've been thinking of using an ad hoc implementation for some of the known tools, such as Golang, Python, Java, or similar ones.

For instance, there are some GitHub actions in charge of configuring some tools and installing the given version or aliases:

* https://github.com/actions/setup-node

* https://github.com/actions/setup-go

* https://github.com/actions/setup-python

I don't know if a similar implementation to what Jenkins does for crawling the tools:

* https://github.com/jenkins-infra/crawler

Could be an option?

What do you think? Am I thinking this too much, and it might not be something worthy to do it?

I believe an issue with discussion would be needed: ASDF support would be really cool, but we have to plan it all together as there are no centralized package index: it uses plugins for each implementation.

Plugin could be used to retrieve informations but it might be a case by case implementation

@v1v
Copy link
Copy Markdown
Contributor Author

v1v commented Jul 3, 2024

I believe an issue with discussion would be needed: ASDF support would be really cool, but we have to plan it all together as there are no centralized package index: it uses plugins for each implementation.

See #2274

@olblak
Copy link
Copy Markdown
Member

olblak commented Jul 5, 2024

@v1v Could I also ask you to create a documentation page on https://github.com/updatecli/website/tree/master/content/en/docs/plugins/resource ?

I see a few spelling issues with unknown words, you can add them to "https://github.com/updatecli/updatecli/blob/main/.github/actions/spelling/allow.txt" to ignore those message

Feel free to ping if you need some help to finalize this pullrequest

olblak and others added 7 commits July 5, 2024 09:04
…ersion' into feature/use-tools-version

* refs/remotes/origin/feature/use-tools-version:
  deps(go): bump module github.com/hashicorp/hcl/v2 (updatecli#2256)
  deps: Bump Golang version to 1.22.5 (updatecli#2267)
  fix(npm-source): Deprecated field can be bool (updatecli#2268)
@v1v
Copy link
Copy Markdown
Contributor Author

v1v commented Jul 5, 2024

@v1v Could I also ask you to create a documentation page on updatecli/website@master/content/en/docs/plugins/resource ?

Done, see updatecli/website#1477

@olblak olblak added the plugin-tool-versions All things related to tool-version label Jul 5, 2024
@olblak olblak added this to the 0.80.0 milestone Jul 6, 2024
@olblak
Copy link
Copy Markdown
Member

olblak commented Jul 6, 2024

@v1v Are you confident merging this pullrquest?
I did a quick test with your e2e tests and it sounds great

@v1v
Copy link
Copy Markdown
Contributor Author

v1v commented Jul 8, 2024

@v1v Are you confident merging this pullrquest?

Yes.

I ran a few local executions with different cases and so far it works as I intended 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request plugin-tool-versions All things related to tool-version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants