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 the ability to track which versions are in use #1717

Open
nicolas-miller-storable opened this issue Jan 25, 2024 · 1 comment
Open

Add the ability to track which versions are in use #1717

nicolas-miller-storable opened this issue Jan 25, 2024 · 1 comment

Comments

@nicolas-miller-storable

Is your feature request related to a problem? Please describe

I work on a lot of different projects, meaning I have a lot of versions of different tools installed. I currently have 14 versions of Node.js on my device. Unfortunately, I do not have an easy way to determine which of those tools are actually in use. If I want to purge unused tool versions, I have to audit all the .tool-versions files in all my projects manually. I would really love if asdf had a mechanism in place to help me keep track of the different tool versions specified in my various .tool-versions files.

Describe the proposed solution

I would like to see a new core asdf command to tag projects. For the sake of discussion, let's call this command asdf track.

When I run asdf track in a project directory with a .tool-versions file present, it writes that directory to a dot file in my home directory. Again, for the sake of discussion, let's just call this file .tool-version-tracker.

When I want to clean house, I then run asdf track --audit (or something similar). This prompts asdf to read the .tool-version-tracker, follow the various paths, inspect the .tool-versions files, and spit out a distinct list of tools and versions in use across my device. That way, I can easily determine which versions I can purge.

As a bonus, this could spit out the project directories alongside the versions. This would make it easier for me to audit my projects and find out which ones are in desperate need of upgrades.

Describe similar asdf features and why they are not sufficient

asdf list is perfect for seeing which versions of a certain tool I have installed, but there is currently no scripted way for me to see which versions I'm actually using.

Describe other workarounds you've considered

I was going to write a bash script to trawl the directories on my device with .tool-versions files, but I figured I'm not the only developer who would benefit from this feature.

@nicolas-miller-storable
Copy link
Author

I did see #819 and #830. I'm not concerned with making asdf do the cleanup of old versions. I'm only interested in asdf telling me what tools and versions are found in .tool-versions files across my device. If that's still out of scope for asdf, I understand.

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

No branches or pull requests

1 participant