-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
What version of Go are you using (go version
)?
$ go version
go version devel +3a65abfbda Tue Oct 13 20:13:25 2020 +0000 linux/amd64
Does this issue reproduce with the latest release?
Not on go1.15.6.
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="on" GOARCH="amd64" GOOS="linux"
What did you do?
Run unit tests for corner cases for import paths.
What did you expect to see?
Non-ascii import path works.
What did you see instead?
Non-ascii import path fails as if it didn't exist.
cmd/panic/main.go:40:2: malformed import path "github.com/maruel/panicparse/v2/cmd/panic/internal/ùtf8": invalid char 'ù'
Source: https://github.com/maruel/panicparse/blob/v2.0.1/cmd/panic/internal/%C3%B9tf8/%C3%B9tf8.go
A bisect points to https://go-review.googlesource.com/c/go/+/258298
Paging author @bcmills
Bisected with golang checked out at $HOME/src-oth/golang and github.com/maruel/panicparse checked out at $HOME/src/panicparse:
$HOME/src-oth/bisect.sh:
#!/bin/bash
set -eu
git bisect reset
git checkout $(git merge-base origin/master go1.15.6)
git bisect start
git bisect good
git checkout origin/master
git bisect bad
git bisect run $HOME/src-oth/test.sh
and $HOME/src-oth/test.sh:
#!/bin/sh
set -eu
cd $HOME/src-oth/golang/src
./make.bash
cd $HOME/src/panicparse
$HOME/src-oth/golang/bin/go test ./cmd/panic
I used panicparse at origin/master but I expect v2.0.1 to have the same outcome.
To be clear, it's a corner case. I'm not sure there's a lot of people that create non-ascii package path name but it'd be sad if it regressed. Should probably have a unit test for this.