{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":299395539,"defaultBranch":"main","name":"wand","ownerLogin":"svengreb","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2020-09-28T18:20:51.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/13448100?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1688908497.0","currentOid":""},"activityList":{"items":[{"before":"42b2462f0c7dd90f784fb1acbf1bc81417c47a73","after":null,"ref":"refs/heads/feature/gh-133-go-1.17-run-support-versioned-modules","pushedAt":"2023-07-09T13:14:57.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"svengreb","name":"Sven Greb","path":"/svengreb","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13448100?s=80&v=4"}},{"before":"3fffd9e77ecca0244b51925f36934d17e119edf2","after":"37858a37edad30e41a2f1802ec8aee48bd53fee2","ref":"refs/heads/main","pushedAt":"2023-07-09T13:14:56.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"svengreb","name":"Sven Greb","path":"/svengreb","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13448100?s=80&v=4"},"commit":{"message":"`go run` support for versioned modules (Go 1.17+) (#134)\n\nAs of Go 1.17 the `go run` command can finally run in module-aware\r\nmode [1] while not \"polluting\" the current module in the working\r\ndirectory, if there is one (`go.mod` file present) ๐ŸŽ‰\r\nThis finally allows to run commands \"on-the-fly\" [10] of Go `main`\r\nmodule packages without installing them or without changing dependencies\r\nof the current module!\r\n\r\nTo support this feature with wand a new `task.GoModule` [2] has been\r\nimplemented in a new `golang/run` [3] package.\r\nIt can be run using a command runner [4] that handles tasks of kind\r\n`KindGoModule` [5] so mainly `gotool.Runner` [6].\r\n\r\nThe new `golang/run.Task` [3] is customizable through the following\r\nfunctions:\r\n\r\n- `WithArgs(...string) run.Option` - sets additional arguments to pass\r\n to the command.\r\n- `WithEnv(map[string]string) run.Option` - sets the task specific\r\n environment.\r\n- `WithModulePath(string) run.Option` - sets the module import path.\r\n- `WithModuleVersion(*semver.Version) run.Option` - sets the module\r\n version.\r\n\r\nNext to the new task the `gotool.Runner` [6] has been extended with a\r\nnew `WithCache(bool)` [9] runner option to toggle the usage of the local\r\ncache directory in the root directory of the module. The runner has been\r\nmade \"smart\" in the way that it either...\r\n\r\n- installing the executable through a `golang.Runner` [8], which runs\r\n `go install pkg@version` to leverage Go 1.16's feature [12], and\r\n execute it afterwards. This is the current default behavior of this\r\n runner which will be used when `WithCache(true)` [9] is used.\r\n- pass the task to a `golang.Runner` [8], using the new `golang/run` [3]\r\n package task, so that it can run `go run pkg@version ` instead.\r\n This is the new \"smart\" behavior of the runner which will be used when\r\n `WithCache(false)` [9] (default) is used.\r\n\r\nThe new default behavior is to not use a local cache so that caching\r\nwill be a opt-in!\r\nThis decision was made because native support for running commands\r\n\"on-the-fly\" should always be preferred to custom logic which is what\r\nthe local cache directory and [gotool.Runner` [6] purpose is.\r\n\r\n!!!\r\n Note that the minimum Go version for task runners, the new\r\n `golang/run`\r\n task [3] and the \"Elder\" wand [7] has been increased to `1.17.0` since\r\n this version initially introduced `go run` support in module-awar\r\n mode [1]!\r\n This is enforced through a build constraint [11] (`go:build go1.17`).\r\n!!!\r\n\r\nThe `Elder` [7] reference implementation has also adapted to this new\r\nfeature by...\r\n\r\n1. deprecating the `*elder.Elder.Bootstrap(...string) []error` method!\r\n As of wand version `0.9.0` it will be a no-op and will be removed in\r\n version `0.10.0`. To install executables anyway the new\r\n `*elder.Elder.CacheExecutables error` method should be used instead.\r\n To ensure that the wand is properly initialized and operational the\r\n `*elder.Elder.Validate(..task.Runner) []error` method is the way to\r\n go. A warning message will be printed when the method is called to\r\n ensure that users adapt accordionally.\r\n2. providing a new `*elder.Elder.CacheExecutables(...string) error`\r\n method which allows to pass paths of Go modules that should be\r\n explicitly installed to the local cache directory. This method is a\r\n kind of workaround for the, now deprecated,\r\n `*elder.Elder.Bootstrap(...string) []error` method to allows users to\r\n still cache command executables locally.\r\n3. changing the signature of the `*elder.Elder.Validate() error` method\r\n to `*elder.Elder.Validate(...task.Runner) []error` method which\r\n allows users to ensure that the _wand_ is properly initialized an\r\n operational. Optionally command runner [4] can be passed that will\r\n be validated while passing nothing will validate all currently\r\n supported runners.\r\n\r\n[1]: https://go.dev/doc/go1.17#go%20run\r\n[2]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task#GoModule\r\n[3]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/golang/run\r\n[4]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task#Runner\r\n[5]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task#KindGoModule\r\n[6]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/gotool#Runner\r\n[7]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/elder\r\n[8]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/golang#Runner\r\n[9]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/golang/run#WithCache\r\n[10]: https://pkg.go.dev/cmd/go#hdr-Compile_and_run_Go_program\r\n[11]: https://pkg.go.dev/cmd/go#hdr-Build_constraints\r\n[12]: https://github.com/svengreb/wand/issues/89\r\n\r\nGH-133","shortMessageHtmlLink":"go run support for versioned modules (Go 1.17+) (#134)"}},{"before":"041f12424b00f4fddaf7241a6022bf84ee95dcab","after":"42b2462f0c7dd90f784fb1acbf1bc81417c47a73","ref":"refs/heads/feature/gh-133-go-1.17-run-support-versioned-modules","pushedAt":"2023-07-09T13:12:45.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"svengreb","name":"Sven Greb","path":"/svengreb","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13448100?s=80&v=4"},"commit":{"message":"`go run` support for versioned modules (Go 1.17+)\n\nAs of Go 1.17 the `go run` command can finally run in module-aware\nmode [1] while not \"polluting\" the current module in the working\ndirectory, if there is one (`go.mod` file present) ๐ŸŽ‰\nThis finally allows to run commands \"on-the-fly\" [10] of Go `main`\nmodule packages without installing them or without changing dependencies\nof the current module!\n\nTo support this feature with wand a new `task.GoModule` [2] has been\nimplemented in a new `golang/run` [3] package.\nIt can be run using a command runner [4] that handles tasks of kind\n`KindGoModule` [5] so mainly `gotool.Runner` [6].\n\nThe new `golang/run.Task` [3] is customizable through the following\nfunctions:\n\n- `WithArgs(...string) run.Option` - sets additional arguments to pass\n to the command.\n- `WithEnv(map[string]string) run.Option` - sets the task specific\n environment.\n- `WithModulePath(string) run.Option` - sets the module import path.\n- `WithModuleVersion(*semver.Version) run.Option` - sets the module\n version.\n\nNext to the new task the `gotool.Runner` [6] has been extended with a\nnew `WithCache(bool)` [9] runner option to toggle the usage of the local\ncache directory in the root directory of the module. The runner has been\nmade \"smart\" in the way that it either...\n\n- installing the executable through a `golang.Runner` [8], which runs\n `go install pkg@version` to leverage Go 1.16's feature [12], and\n execute it afterwards. This is the current default behavior of this\n runner which will be used when `WithCache(true)` [9] is used.\n- pass the task to a `golang.Runner` [8], using the new `golang/run` [3]\n package task, so that it can run `go run pkg@version ` instead.\n This is the new \"smart\" behavior of the runner which will be used when\n `WithCache(false)` [9] (default) is used.\n\nThe new default behavior is to not use a local cache so that caching\nwill be a opt-in!\nThis decision was made because native support for running commands\n\"on-the-fly\" should always be preferred to custom logic which is what\nthe local cache directory and [gotool.Runner` [6] purpose is.\n\n!!!\n Note that the minimum Go version for task runners, the new\n `golang/run`\n task [3] and the \"Elder\" wand [7] has been increased to `1.17.0` since\n this version initially introduced `go run` support in module-awar\n mode [1]!\n This is enforced through a build constraint [11] (`go:build go1.17`).\n!!!\n\nThe `Elder` [7] reference implementation has also adapted to this new\nfeature by...\n\n1. deprecating the `*elder.Elder.Bootstrap(...string) []error` method!\n As of wand version `0.9.0` it will be a no-op and will be removed in\n version `0.10.0`. To install executables anyway the new\n `*elder.Elder.CacheExecutables error` method should be used instead.\n To ensure that the wand is properly initialized and operational the\n `*elder.Elder.Validate(..task.Runner) []error` method is the way to\n go. A warning message will be printed when the method is called to\n ensure that users adapt accordionally.\n2. providing a new `*elder.Elder.CacheExecutables(...string) error`\n method which allows to pass paths of Go modules that should be\n explicitly installed to the local cache directory. This method is a\n kind of workaround for the, now deprecated,\n `*elder.Elder.Bootstrap(...string) []error` method to allows users to\n still cache command executables locally.\n3. changing the signature of the `*elder.Elder.Validate() error` method\n to `*elder.Elder.Validate(...task.Runner) []error` method which\n allows users to ensure that the _wand_ is properly initialized an\n operational. Optionally command runner [4] can be passed that will\n be validated while passing nothing will validate all currently\n supported runners.\n\n[1]: https://go.dev/doc/go1.17#go%20run\n[2]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task#GoModule\n[3]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/golang/run\n[4]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task#Runner\n[5]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task#KindGoModule\n[6]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/gotool#Runner\n[7]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/elder\n[8]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/golang#Runner\n[9]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/golang/run#WithCache\n[10]: https://pkg.go.dev/cmd/go#hdr-Compile_and_run_Go_program\n[11]: https://pkg.go.dev/cmd/go#hdr-Build_constraints\n[12]: https://github.com/svengreb/wand/issues/89\n\nGH-133","shortMessageHtmlLink":"go run support for versioned modules (Go 1.17+)"}},{"before":null,"after":"041f12424b00f4fddaf7241a6022bf84ee95dcab","ref":"refs/heads/feature/gh-133-go-1.17-run-support-versioned-modules","pushedAt":"2023-07-09T13:12:18.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"svengreb","name":"Sven Greb","path":"/svengreb","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13448100?s=80&v=4"},"commit":{"message":"`go run` support for versioned modules (Go 1.17+)\n\nAs of Go 1.17 the `go run` command can finally run in module-aware\nmode [1] while not \"polluting\" the current module in the working\ndirectory, if there is one (`go.mod` file present) ๐ŸŽ‰\nThis finally allows to run commands \"on-the-fly\" [10] of Go `main`\nmodule packages without installing them or without changing dependencies\nof the current module!\n\nTo support this feature with wand a new `task.GoModule` [2] has been\nimplemented in a new `golang/run` [3] package.\nIt can be run using a command runner [4] that handles tasks of kind\n`KindGoModule` [5] so mainly `gotool.Runner` [6].\n\nThe new `golang/run.Task` [3] is customizable through the following\nfunctions:\n\n- `WithArgs(...string) run.Option` - sets additional arguments to pass\n to the command.\n- `WithEnv(map[string]string) run.Option` - sets the task specific\n environment.\n- `WithModulePath(string) run.Option` - sets the module import path.\n- `WithModuleVersion(*semver.Version) run.Option` - sets the module\n version.\n\nNext to the new task the `gotool.Runner` [6] has been extended with a\nnew `WithCache(bool)` [9] runner option to toggle the usage of the local\ncache directory in the root directory of the module. The runner has been\nmade \"smart\" in the way that it either...\n\n- installing the executable through a `golang.Runner` [8], which runs\n `go install pkg@version` to leverage Go 1.16's feature [12], and\n execute it afterwards. This is the current default behavior of this\n runner which will be used when `WithCache(true)` [9] is used.\n- pass the task to a `golang.Runner` [8], using the new `golang/run` [3]\n package task, so that it can run `go run pkg@version ` instead.\n This is the new \"smart\" behavior of the runner which will be used when\n `WithCache(false)` [9] (default) is used.\n\nThe new default behavior is to not use a local cache so that caching\nwill be a opt-in!\nThis decision was made because native support for running commands\n\"on-the-fly\" should always be preferred to custom logic which is what\nthe local cache directory and [gotool.Runner` [6] purpose is.\n\n!!!\n Note that the minimum Go version for task runners, the new\n `golang/run`\n task [3] and the \"Elder\" wand [7] has been increased to `1.17.0` since\n this version initially introduced `go run` support in module-awar\n mode [1]!\n This is enforced through a build constraint [11] (`go:build go1.17`).\n!!!\n\nThe `Elder` [7] reference implementation has also adapted to this new\nfeature by...\n\n1. deprecating the `*elder.Elder.Bootstrap(...string) []error` method!\n As of wand version `0.9.0` it will be a no-op and will be removed in\n version `0.10.0`. To install executables anyway the new\n `*elder.Elder.CacheExecutables error` method should be used instead.\n To ensure that the wand is properly initialized and operational the\n `*elder.Elder.Validate(..task.Runner) []error` method is the way to\n go. A warning message will be printed when the method is called to\n ensure that users adapt accordionally.\n2. providing a new `*elder.Elder.CacheExecutables(...string) error`\n method which allows to pass paths of Go modules that should be\n explicitly installed to the local cache directory. This method is a\n kind of workaround for the, now deprecated,\n `*elder.Elder.Bootstrap(...string) []error` method to allows users to\n still cache command executables locally.\n3. changing the signature of the `*elder.Elder.Validate() error` method\n to `*elder.Elder.Validate(...task.Runner) []error` method which\n allows users to ensure that the _wand_ is properly initialized an\n operational. Optionally command runner [4] can be passed that will\n be validated while passing nothing will validate all currently\n supported runners.\n\n[1]: https://go.dev/doc/go1.17#go%20run\n[2]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task#GoModule\n[3]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/golang/run\n[4]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task#Runner\n[5]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task#KindGoModule\n[6]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/gotool#Runner\n[7]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/elder\n[8]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/golang#Runner\n[9]: https://pkg.go.dev/github.com/svengreb/wand@v0.9.0/pkg/task/golang/run#WithCache\n[10]: https://pkg.go.dev/cmd/go#hdr-Compile_and_run_Go_program\n[11]: https://pkg.go.dev/cmd/go#hdr-Build_constraints\n[12]: https://github.com/svengreb/wand/issues/89\n\nGH-133","shortMessageHtmlLink":"go run support for versioned modules (Go 1.17+)"}},{"before":"fcd8b4ee80458659a9f80d0d788c3869e62ef231","after":null,"ref":"refs/heads/fix/gh-131-double-task-exec-with-quiet-runner-option","pushedAt":"2023-07-09T09:25:29.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"svengreb","name":"Sven Greb","path":"/svengreb","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13448100?s=80&v=4"}},{"before":"48c53164000ceb835eb74335a69e9878e81e3162","after":"3fffd9e77ecca0244b51925f36934d17e119edf2","ref":"refs/heads/main","pushedAt":"2023-07-09T09:25:28.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"svengreb","name":"Sven Greb","path":"/svengreb","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13448100?s=80&v=4"},"commit":{"message":"Fix double task execution with `quiet` runner option (#132)\n\nWhen the `WithRunnerQuiet` option [1] of the `golang` runner [3] or\r\n`WithQuiet` option [2] of the `gotool` runner [4] was set to `true`,\r\nthe task passed to their `Run` method [5] was running twice. This was\r\ncaused by a missing return statement when the execution finished with a\r\n`error` of value `nil` [^1] [^2].\r\n\r\nTo fix this bug both code blocks are now returning early with `nil`\r\ninstead of keep going on in the code flow.\r\n\r\n[1]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/golang#WithRunnerQuiet\r\n[2]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/gotool#WithQuiet\r\n[3]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/golang#Runner\r\n[4]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/gotool#Runner\r\n[5]: https://pkg.go.dev/github.com/svengreb/wand/pkg/task@v0.8.0#Runner.Run\r\n\r\n[^1]: https://github.com/svengreb/wand/blob/v0.8.0/pkg/task/golang/golang.go#L43-L50\r\n[^2]: https://github.com/svengreb/wand/blob/v0.8.0/pkg/task/gotool/gotool.go#L218-L225\r\n\r\nGH-131","shortMessageHtmlLink":"Fix double task execution with quiet runner option (#132)"}},{"before":null,"after":"fcd8b4ee80458659a9f80d0d788c3869e62ef231","ref":"refs/heads/fix/gh-131-double-task-exec-with-quiet-runner-option","pushedAt":"2023-07-09T09:21:55.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"svengreb","name":"Sven Greb","path":"/svengreb","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13448100?s=80&v=4"},"commit":{"message":"Fix double task execution with `quiet` runner option\n\nWhen the `WithRunnerQuiet` option [1] of the `golang` runner [3] or\n`WithQuiet` option [2] of the `gotool` runner [4] was set to `true`,\nthe task passed to their `Run` method [5] was running twice. This was\ncaused by a missing return statement when the execution finished with a\n`error` of value `nil` [^1] [^2].\n\nTo fix this bug both code blocks are now returning early with `nil`\ninstead of keep going on in the code flow.\n\n[1]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/golang#WithRunnerQuiet\n[2]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/gotool#WithQuiet\n[3]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/golang#Runner\n[4]: https://pkg.go.dev/github.com/svengreb/wand@v0.8.0/pkg/task/gotool#Runner\n[5]: https://pkg.go.dev/github.com/svengreb/wand/pkg/task@v0.8.0#Runner.Run\n\n[^1]: https://github.com/svengreb/wand/blob/v0.8.0/pkg/task/golang/golang.go#L43-L50\n[^2]: https://github.com/svengreb/wand/blob/v0.8.0/pkg/task/gotool/gotool.go#L218-L225\n\nGH-131","shortMessageHtmlLink":"Fix double task execution with quiet runner option"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADUbITagA","startCursor":null,"endCursor":null}},"title":"Activity ยท svengreb/wand"}