feat(golang-rewrite): Rewrite application in Go by Stratus3D · Pull Request #1805 · asdf-vm/asdf

4 min read Original article ↗

added a commit that referenced this pull request

Dec 16, 2024
…version

The Go version of asdf in PR #1805 cannot be upgraded to
with `asdf update` so the command has been replaced with
a message instructing users to Go to the asdf website or
use their OS package manager to install the latest
version of asdf.

Stratus3D added a commit that referenced this pull request

Dec 16, 2024
…version

The Go version of asdf in PR #1805 cannot be upgraded to
with `asdf update` so the command has been replaced with
a message instructing users to Go to the asdf website or
use their OS package manager to install the latest
version of asdf.

Stratus3D added a commit that referenced this pull request

Dec 16, 2024
…version

The Go version of asdf in PR #1805 cannot be upgraded to
with `asdf update` so the command has been replaced with
a message instructing users to Go to the asdf website or
use their OS package manager to install the latest
version of asdf.

Stratus3D added a commit that referenced this pull request

Dec 16, 2024
…version

The Go version of asdf in PR #1805 cannot be upgraded to
with `asdf update` so the command has been replaced with
a message instructing users to Go to the asdf website or
use their OS package manager to install the latest
version of asdf.

Also fix failing build by:

* Correcting dependencies on Ubuntu GitHub workflow runners
* Fixing elvish shell test
* Commenting out failing nushell tests

This was referenced

Dec 16, 2024

This was referenced

Dec 17, 2024

This was referenced

Dec 18, 2024

@Stratus3D Stratus3D changed the title feat(golang-rewrite): Rewrite application in Go feat!(golang-rewrite): Rewrite application in Go

Dec 18, 2024

@Stratus3D Stratus3D changed the title feat!(golang-rewrite): Rewrite application in Go feat(golang-rewrite): Rewrite application in Go

Dec 18, 2024
feat(golang-rewrite): implement asdf plugin extension commands
…sdf`

* 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
```
feat(golang-rewrite): implement `asdf plugin test` command
* Fix `release-build` workflow
* Upgrade to Go 1.23.4
…cmd-dir

feat(golang-rewrite): rename module and move `main` pacakge to `cmd/asdf`
* 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
chore(golang-rewrite): upgrade to Go 1.23.4
* Update `pluginListCommand` to print tools and versions to STDOUT
* Improve output of `asdf current` command
feat(golang-rewrite): misc. plugin improvements
* 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
feat(golang-rewrite): misc. version improvements
feat(golang-rewrite): misc. version improvements part 2
* 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
feat(golang-rewrite): self-contained completion code

@Stratus3D

feat(golang-rewrite): update upgrade guide

This was referenced

Dec 19, 2024