golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.27k stars 17.7k forks source link

cmd/compile/internal/importer: flip enable alias to true [1.23 backport] #70517

Open xieyuschen opened 3 days ago

xieyuschen commented 3 days ago

This issue is created to request a backport at go1.23 to fix #70394. The issue doesn't exist in go1.24(master) as the code has refactored a bit before and fixed this issue.

https://github.com/golang/go/blob/b0bbfb1e0f8f3ea55e1e286d32b57daf96495878/src/cmd/compile/internal/importer/ureader.go#L34

The backport fix allows ureader to read exportdata with alias correctly and it doesn't affect the correctness of compile to construct exportdata for the following packages.

@timothy-king

gopherbot commented 3 days ago

Change https://go.dev/cl/629997 mentions this issue: [release-branch.go1.23] cmd/compile: enable alias for pkgReader