Radar · Go · #003 · Week 41 · Oct 5 – 11, 2026
Decouple export data formats used by compiler and x/tools
Worth knowingecosystem
- What changed
- The proposal to separate the compiler’s export format from the tools’ export format was accepted; a new
cmd/exporttool will produce tools‑readable export data, andgo list -exportwill follow the tools format. - Production impact
- The source does not say.
- Try it
- Run
go list -exporton a package and inspect the generated file; compare it with the output of the newcmd/exporttool (available in the development version). - Source
- github.com/golang/go/issues/79427
Understand it, then run it
Export data is a compact binary file that the Go compiler writes so that tools can understand the types defined in a package. Today the compiler and the x/tools library both read the same export format. The proposal accepted on 2026‑10‑08 separates those formats. A new command, cmd/export, will create export files in the format that tools expect, and go list -export will point to those files instead of the compiler’s object file. The compiler’s own export format will become internal‑only.
Run it now
package main
import (
"encoding/json"
"fmt"
"os/exec"
)
type ListInfo struct {
Export string `json:"Export"`
}
func main() {
// Run `go list -json -export` on the standard library package fmt.
// This demonstrates the current Export field, which points to a compiler‑produced .a file.
cmd := exec.Command("go", "list", "-json", "-export", "fmt")
out, err := cmd.Output()
if err != nil {
panic(err)
}
var info ListInfo
if err := json.Unmarshal(out, &info); err != nil {
panic(err)
}
fmt.Println("Export file path (current behavior):")
fmt.Println(info.Export)
}
What it printed when we ran it on Go 1.27.1
Export file path (current behavior): /opt/gocache/88/88b5e23569a6a57669612c078d181f9d823b92f8c2e63ef69ecc277114529d41-d
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