-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: go list complains about "missing dot" with unknown imports #33807
Comments
Change https://golang.org/cl/191657 mentions this issue: |
Inserted a panic at the Go compiler like: --- a/src/cmd/go/internal/module/module.go
+++ b/src/cmd/go/internal/module/module.go
@@ -184,6 +184,7 @@ func CheckPath(path string) error {
return fmt.Errorf("malformed module path %q: leading slash", path)
}
if !strings.Contains(path[:i], ".") {
+ panic("!?")
return fmt.Errorf("malformed module path %q: missing dot in first path element", path)
}
if path[0] == '-' { then get the result:
|
go1.13rc1 list -e -json -compiled=true -test=false -export=false -deps=true -find=false -tags "aaa bbb" -- golang.org/x/mobile/bind/testdata/testpkg/javapkg outputs a JSON with {
"ImportPath": "Java/java/beans",
"DepOnly": true,
"Incomplete": true,
"Stale": true,
"StaleReason": "build ID mismatch",
"Error": {
"ImportStack": [
"golang.org/x/mobile/bind/testdata/testpkg/javapkg",
"Java/java/beans"
],
"Pos": "bind/testdata/testpkg/javapkg/classes.go:8:2",
"Err": "malformed module path \"Java/java/beans\": missing dot in first path element"
}
}
{
"ImportPath": "Java/java/io",
"DepOnly": true,
"Incomplete": true,
"Stale": true,
"StaleReason": "build ID mismatch",
"Error": {
"ImportStack": [
"golang.org/x/mobile/bind/testdata/testpkg/javapkg",
"Java/java/io"
],
"Pos": "bind/testdata/testpkg/javapkg/classes.go:9:2",
"Err": "malformed module path \"Java/java/io\": missing dot in first path element"
}
}
... |
|
It looks like the underlying problem here is that you're trying to use |
The error message here is correct: |
Duplicate of #27234 |
OK, so we might need to fix Go itself for reverse binding. @hyangah , what do you think? |
Let's continue discussion at #27234 (comment) |
I think in the module mode, we should generate this fake packages inside the main module so |
so, is this bug fixed? |
Yes. This issue happens when Go module is enabled and reverse binding is used at the same time. In the current plan, we don't enable reverse binding when Go module is enabled. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In order to reproduce the problem, the change https://go-review.googlesource.com/c/mobile/+/190479 is required on my local machine to force to use the patched
gomobile
/gobind
. This CL changes$PATH
order to use the guiltgomobile
/gobind
.What did you expect to see?
The test passes
What did you see instead?
This is actually what the try bots are complaining. (Apparently the try bots use Go 1.13 or later).
CC @hyangah
The text was updated successfully, but these errors were encountered: