Radar · Go · #003 · Week 41 · Oct 5 – 11, 2026
Deprecate and delete x/sys/execabs
Worth knowingecosystem
- What changed
- The proposal to add //go:fix directives, mark the package deprecated, wait a month after tagging, then isolate, tag, and delete x/sys/execabs was accepted.
- Production impact
- The source does not say.
- Try it
- Run
go vet -fixon a module that imports x/sys/execabs to see the suggested migration to os/exec. - Source
- github.com/golang/go/issues/64047
Understand it, then run it
The x/sys/execabs package was a thin wrapper around os/exec that existed to work around a security issue before Go 1.19. Starting with Go 1.19 the behavior of os/exec was changed to include that fix, and the wrapper is no longer needed. The proposal accepted in October 2026 marks x/sys/execabs as deprecated, adds //go:fix directives to point users to os/exec, and plans to delete the package after a month of tagging.
For a new Go programmer, this means you should import and use os/exec directly for running external commands. The extra import of x/sys/execabs is now discouraged and will eventually disappear.
The change does not affect the language itself; it only removes an unnecessary compatibility layer.
If you see a deprecation warning about x/sys/execabs, replace the import with os/exec and the code will continue to work.
Run it now
package main
import (
"fmt"
"os/exec"
)
func main() {
// Demonstrate the current way to run an external command.
// The execabs wrapper has been deprecated, so we use os/exec directly.
cmd := exec.Command("echo", "execabs deprecated")
output, err := cmd.CombinedOutput()
if err != nil {
fmt.Printf("command failed: %v\n", err)
return
}
fmt.Printf("output: %s", output)
}
What it printed when we ran it on Go 1.27.1
output: execabs deprecated
Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.
Written by gpt-oss-120b from the linked source · claims checked against the sources · human-reviewed