Commit Graph

1882 Commits

Author SHA1 Message Date
Bruno Sales Cardoso
90fccb06cb
Merge 36fd9f8a4b into 9c12b79969 2024-12-18 15:33:00 -05:00
Trevor Brown
9c12b79969
Merge pull request #98 from asdf-vm/tb/breaking-changes-update
feat(golang-rewrite): update upgrade guide
2024-12-18 14:11:39 -05:00
Trevor Brown
005898800b feat(golang-rewrite): update upgrade guide 2024-12-18 14:10:04 -05:00
Trevor Brown
875bee8f36
Merge pull request #97 from asdf-vm/tb/self-contained-completions
feat(golang-rewrite): self-contained completion code
2024-12-18 12:29:33 -05:00
Trevor Brown
c8593842ee feat(golang-rewrite): self-contained completion code
* Add `asdf completion` command
* Move completion files to `cli/completions`
* Add completions for Bash, Zsh, Fish, Elvish, and Nushell
* Update Zsh completion code to work with new completion install method
2024-12-18 12:23:40 -05:00
Trevor Brown
08ca28f53d Merge pull request #96 from asdf-vm/tb/version-improvements-2
feat(golang-rewrite): misc. version improvements part 2
2024-12-18 11:32:04 -05:00
Trevor Brown
e69149ef38 Merge pull request #95 from asdf-vm/tb/version-improvements
feat(golang-rewrite): misc. version improvements
2024-12-18 11:32:04 -05:00
Trevor Brown
b9e79e6456 feat(golang-rewrite): misc. version improvements part 2
* Remove old commands from help output
* Add message to `asdf update` command
* Explain why `asdf global` and `asdf local` have been removed
* Add reference argument to `git.Repoer.Clone` method
* Update `asdf plugin test` command to install specific ref of plugin if provided
* Update `asdf plugin update` command to run pre and post plugin update hooks, and `post-plugin-update` plugin callback
* Enable `plugin_update_command.bats` tests
2024-12-18 11:32:04 -05:00
Trevor Brown
76bc18a1b9 Merge pull request #94 from asdf-vm/tb/plugin-improvements
feat(golang-rewrite): misc. plugin improvements
2024-12-18 11:32:04 -05:00
Trevor Brown
9ed4216525 feat(golang-rewrite): misc. version improvements
* Update `pluginListCommand` to print tools and versions to STDOUT
* Improve output of `asdf current` command
2024-12-18 11:32:04 -05:00
Trevor Brown
b7193e43ef Merge pull request #93 from asdf-vm/tb/go-upgrade
chore(golang-rewrite): upgrade to Go 1.23.4
2024-12-18 11:32:04 -05:00
Trevor Brown
3af0291316 feat(golang-rewrite): misc. plugin improvements
* Correct the environment `bin/install` runs in
* Improve output of `asdf list all` command when plugin not found
* Update `asdf plugin test` command to install a tool version in the test
2024-12-18 11:32:04 -05:00
Trevor Brown
f0d74ece4d Merge pull request #92 from asdf-vm/DeedleFake-rename-module-and-use-cmd-dir
feat(golang-rewrite): rename module and move `main` pacakge to `cmd/asdf`
2024-12-18 11:32:04 -05:00
Trevor Brown
d2fcf6fef5 chore(golang-rewrite): upgrade to Go 1.23.4
* Fix `release-build` workflow
* Upgrade to Go 1.23.4
2024-12-18 11:32:04 -05:00
Trevor Brown
7896be10ea Merge pull request #91 from asdf-vm/tb/plugin-test-command
feat(golang-rewrite): implement `asdf plugin test` command
2024-12-18 11:32:04 -05:00
DeedleFake
5d5d04fbb7 feat(golang-rewrite): rename module and move main pacakge to cmd/asdf
* Replace direct `fmt.Println()` usage in a test with `t.Log()`
* Rename `cmd` to `cli`
* Move asdf command from module root
* Fix some linter warnings, thus enabling some tests that were being skipped
* Fix `Makefile`
* Rename module to `github.com/asdf-vm/asdf`
* Fix `TestGetAllToolsAndVersionsInContent/returns_empty_list_with_found_true_and_no_error_when_empty_content`
* Rewrite `Unique()` to be a bit more straightforwards
* Get workflow checks passing again

toolversions.Unique is ever so slightly faster, technically.

```
goos: linux
goarch: amd64
pkg: github.com/asdf-vm/asdf/internal/toolversions
cpu: AMD Ryzen 9 3900X 12-Core Processor
          │ /tmp/old.txt │            /tmp/new.txt            │
          │    sec/op    │   sec/op     vs base               │
Unique-24    346.5n ± 1%   342.4n ± 1%  -1.17% (p=0.027 n=10)

          │ /tmp/old.txt │          /tmp/new.txt          │
          │     B/op     │    B/op     vs base            │
Unique-24     160.0 ± 0%   160.0 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

          │ /tmp/old.txt │          /tmp/new.txt          │
          │  allocs/op   │ allocs/op   vs base            │
Unique-24     3.000 ± 0%   3.000 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal
```
2024-12-18 11:32:04 -05:00
Trevor Brown
a27ae46831 Merge pull request #90 from asdf-vm/tb/plugin-extension-commands
feat(golang-rewrite): implement asdf plugin extension commands
2024-12-18 11:32:04 -05:00
Your Name
369beebab9 feat(golang-rewrite): implement asdf plugin test command
* Enable `plugin_test_command.bats` tests
* Implement `asdf plugin test` command
2024-12-18 11:32:04 -05:00
Your Name
ccc98ad4e9 feat(golang-rewrite): implement asdf plugin extension commands
* Enable `plugin_extension_command.bats` tests
* Add comment on `version_commands.bats` tests
* Show help output when asdf run with no arguments
* Document breaking change in asdf extension commands feature
* Create `Plugin.ExtensionCommandPath` method
* Create `asdf cmd` subcommand
* Get `plugin_extension_command.bats` tests passing
* Document breaking changes to asdf extension commands
2024-12-18 11:32:04 -05:00
Trevor Brown
82f19436c8 Merge pull request #89 from asdf-vm/tb/plugin-list-all-tests
feat(golang-rewrite): implement `asdf plugin list all` command
2024-12-18 11:32:03 -05:00
Trevor Brown
5e542da7b5 Merge pull request #88 from asdf-vm/tb/install-command-tests
feat(golang-rewrite): get all `install_command.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
e7df5ff325 feat(golang-rewrite): implement asdf plugin list all command
* Enable `plugin_list_all_command.bats` tests
* Create `PluginIndex.Get` method
* Create `asdf plugin list all` subcommand
* Extract plugin index repo URL into config package
* Fix failing tests
2024-12-18 11:32:03 -05:00
Trevor Brown
609d60686b Merge pull request #87 from asdf-vm/tb/more-shim-exec-fixes-2
feat(golang-rewrite): get remaining `shim_exec.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
b6ec89f95f feat(golang-rewrite): get all install_command.bats tests passing
* Enable `install_command.bats` tests
* Update `versions.InstallVersion` function to accept `toolversions.Version` struct
* Remove download directory after install if not configured to keep it
* Add download callback requirement to list of breaking changes
* Add `--keep-download` flag to install command
* Get all `install_command.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
e8cde35779 Merge pull request #86 from asdf-vm/tb/more-shim-exec-fixes
feat(golang-rewrite): more shim exec fixes
2024-12-18 11:32:03 -05:00
Trevor Brown
162cb8ecee feat(golang-rewrite): get remaining shim_exec.bats tests passing
* Disable custom shim template tests
* Document another breaking change
* Enable `shim_exec.bats` tests
* Fix bug in `shims.getCustomExecutablePath` function
* Pass default relative executable path as third argument to `exec-path` callback
* Get remaining `shim_exec.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
03bd11f7cf Merge pull request #83 from asdf-vm/tb/shim-exec-fixes
fix(golang-rewrite): `asdf exec` and `asdf env` command fixes
2024-12-18 11:32:03 -05:00
Trevor Brown
f639f8a4d0 feat(golang-rewrite): more shim exec fixes
* Create `toolversions.ParseSlice` function
* Create `toolversions.Format` function
* Refactor `shims` package to use `toolversions.Version` struct
* Fix handling of path versions in `shims.FindExecutable` function
2024-12-18 11:32:03 -05:00
Trevor Brown
f01233eaee Merge pull request #82 from asdf-vm/tb/shim-exec-env
feat(golang-rewrite): implement `asdf env` command
2024-12-18 11:32:03 -05:00
Trevor Brown
7dfa8b40ae fix(golang-rewrite): asdf exec and asdf env command fixes
* Create `CurrentEnv` and `MergeEnv` helper functions
* Add another test for `paths.RemoveFromPath` function
* Move executable finding functions to shims package
* Correct PATH code for env and exec commands
2024-12-18 11:32:03 -05:00
Trevor Brown
0e43521ea7 Merge pull request #81 from asdf-vm/tb/reshim-fix
fix(golang-rewrite): allow directories returned by list-bin-paths to be absent from the file system
2024-12-18 11:32:03 -05:00
Trevor Brown
26a3815948 feat(golang-rewrite): implement asdf env command
* Create `CallbackPath` method on `Plugin` struct
* Correct behavior of `asdf shimversions` command
* Update `shims.FindExecutable` function to return plugin
* Create `repotest.WritePluginCallback` function
* Create `execenv` package for invoking `exec-env` plugin callback
* Make `MapToSlice` a public function
* Return resolved version from `shims.FindExecutable` function
* Create `shims.ExecutablePaths` function
* Enable `shim_env_command.bats` tests
* Implement `asdf env` command
2024-12-18 11:32:03 -05:00
Trevor Brown
20a7f851a0 Merge pull request #80 from asdf-vm/tb/asdf-version-info-fix-2
feat(golang-rewrite): correct asdf-version workflow step to produce version as output (second attempt)
2024-12-18 11:32:03 -05:00
Trevor Brown
80ac9bb51c fix(golang-rewrite): allow directories returned by list-bin-paths to be absent from the file system
* create `repotest.WritePluginCallback` function
* add test for `list-bin-paths` callback that returns non-existent path
* if directory name returned by `list-bin-paths` doesn't exist skip it
2024-12-18 11:32:03 -05:00
Trevor Brown
1d83d64203 Merge pull request #79 from asdf-vm/tb/asdf-version-info-fix
feat(golang-rewrite): correct asdf-version workflow step to produce version as output
2024-12-18 11:32:03 -05:00
Trevor Brown
572ed07f2b feat(golang-rewrite): correct asdf-version workflow step to produce version as output 2024-12-18 11:32:03 -05:00
Trevor Brown
8eeb85ddcc Merge pull request #78 from asdf-vm/tb/asdf-version-info
feat(golang-rewrite): compile asdf version into Go binaries
2024-12-18 11:32:03 -05:00
Trevor Brown
19a0597502 feat(golang-rewrite): correct asdf-version workflow step to produce version as output 2024-12-18 11:32:03 -05:00
Trevor Brown
c1d8975f88 Merge pull request #77 from asdf-vm/tb/shim-exec-bats
feat(golang-rewrite): introduce `Version` struct, get some `shim_exec.bats` tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
6d708b2807 feat(golang-rewrite): compile asdf version into Go binaries
* Create asdf-version script to print formatted version
* Update Makefile to set main.version variable during build
* Improve help output formatting
* Update release-build workflow to set asdf version in binaries
2024-12-18 11:32:03 -05:00
Trevor Brown
9d9fc698f4 Merge pull request #76 from asdf-vm/tb/shim-versions-command
feat(golang-rewrite): create shimversions command
2024-12-18 11:32:03 -05:00
Trevor Brown
924eecfa6a feat(golang-rewrite): introduce Version struct, get some shim_exec.bats tests passing
* Get more shim_exec.bats tests passing by adding shebang lines to test scripts
* Disable shim_exec test case for scenario that is no longer possible
* Add documentation on another breaking change
* Create toolversions.Version struct and update code to use new struct
2024-12-18 11:32:03 -05:00
Trevor Brown
5e61624690 Merge pull request #75 from asdf-vm/tb/upgrade-doc
feat(golang-rewrite): create version 0.14 to 0.15 upgrade guide
2024-12-18 11:32:03 -05:00
Trevor Brown
822e14c561 feat(golang-rewrite): create shimversions command
* Enable `shim_versions_command.bats` tests
* Create `asdf shimversions` command
2024-12-18 11:32:03 -05:00
Trevor Brown
7f4208333e Merge pull request #74 from asdf-vm/tb/remove-command-bats
feat(golang-rewrite): more `asdf plugin remove` tests
2024-12-18 11:32:03 -05:00
Trevor Brown
53cd454474 feat(golang-rewrite): create version 0.14 to 0.15 upgrade guide 2024-12-18 11:32:03 -05:00
Trevor Brown
626bde0a97 feat(golang-rewrite): more asdf plugin remove tests
* Enable `remove_command.bats` tests
* Update `remove_command.bats` to use new command name
* Create `internal/data` package
* Use data package for install paths
* Get all asdf plugin remove command BATS tests passing
2024-12-18 11:32:03 -05:00
Trevor Brown
5ec4dbfd70 Merge pull request #73 from asdf-vm/tb/asdf-list-commands
feat(golang-rewrite): create `asdf list` and `asdf list all` commands
2024-12-18 11:32:02 -05:00
Trevor Brown
a0b079c903 Merge pull request #72 from asdf-vm/tb/asdf-uninstall-command
feat(golang-rewrite): create `asdf uninstall` command
2024-12-18 11:32:02 -05:00
Trevor Brown
8db188a702 feat(golang-rewrite): create asdf list and asdf list all commands
* Enable `asdf list` BATS tests
* Update list_command.bats code to use non-hyphenated version of list all command
* Implement `asdf list all` command
* Implement `asdf list` command
2024-12-18 11:32:02 -05:00