Import go project github.com/aws/aws-sdk-go/service/sqs

Hi,
I tried to import this

github.com/aws/aws-sdk-go/service/sqs

using

mono ~/Documents/Elements/EBuild.exe --import-go-project github.com/aws/aws-sdk-go/service/sqs

I end up with 2 projects, one of which wont compile.

Building github.com.jmespath.go-jmespath gives

E: No member “FieldByName” on type “go.reflect.Value” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/interpreter.go (322)]
E: No member “FieldByName” on type “go.reflect.Value” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/interpreter.go (333)]
E: No static member “NewParser” on type “JMESPath” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (52)]
E: Type mismatch, cannot assign “Error” to “Tuple” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (53)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (54)]
E: Unknown type “jmespath.SyntaxError” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (55)]
E: Integer parameter for generic type not allowed here [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (55)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (55)]
/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go(55,25): duplicate-error E46: Unknown identifier “err”
E: Type mismatch, cannot assign “Error” to “Tuple” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (55)]
E: Unknown identifier “ok”, did you mean “go.html.template.ok”? [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (55)]
E: Unknown identifier “syntaxError”, did you mean “go.golang.org.x.net.webdav.internal.xml.syntaxError”? [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (56)]
E: Member “SyntaxError.HighlightLocation” of type “” is a expression but is used as a method [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (56)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (58)]
E: Unknown identifier “parsed”, did you mean “go.flag.parsed”? [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (62)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (68)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (69)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (70)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (75)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (76)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (77)]
E: Parameter 1 is “go.builtin.string”, should be “Reference”, in call to JMESPath.Search(data: Object): Tuple<Object,go.builtin.error> [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (82)]
/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go(82,33): duplicate-error E486: Parameter 1 is “go.builtin.string”, should be “Reference”, in call to JMESPath.Search(data: Object): Tuple<Object,go.builtin.error>
E: Type mismatch, cannot assign “Error” to “Tuple” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (82)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (83)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (84)]
E: Unknown identifier “result”, did you mean “go.internal.singleflight.result”? [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (86)]
/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go(86,36): duplicate-error E509: Unknown identifier “result”, did you mean “go.internal.singleflight.result”?
E: Type mismatch, cannot assign “Error” to “Tuple” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (86)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (87)]
E: Unknown identifier “err” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (88)]
E: Unknown identifier “toJSON” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/cmd/jpgo/main.go (90)]
E: No static member “NewParser” on type “JMESPath” [/Users/JohnMoshakis/Documents/develop/Go/sqs/github.com.jmespath.go-jmespath/fuzz/jmespath.go (7)]

I watched a few videos on go, so I dont know if they are legit errors.

Thanks,
John

Hmm, I get

~> Process Builder started
   The remote server returned an error: (404) Not Found.
H: Could not check out http://github.com/aws/aws-sdk-go/service/sqs

(and indeed, http://github.com/aws/aws-sdk-go/service/sqs does not exist)

Strange, it worked yesterday. This is the start

Johns-Mac-mini:sqs JohnMoshakis$ mono ~/Documents/Elements/EBuild.exe --import-go-project github.com/aws/aws-sdk-go/service/sqs
RemObjects EBuild. An open source build engine for Elements and beyond.
Copyright RemObjects Software 2016-2020. All Rights Reserved. Created by marc hoffman.
Version 10.0.0.2481 (develop) built on bajor, 20200207-180747. Commit 6feffc3.

(1/1) Importing github.com.aws.aws-sdk-go/service/sqs (7 files)
(2/11) Importing github.com.aws.aws-sdk-go/aws (93 files)
(3/33) Importing github.com.aws.aws-sdk-go/aws/credentials (12 files)
(4/33) Importing github.com.aws.aws-sdk-go/aws/awserr (2 files)
(5/33) Importing github.com.aws.aws-sdk-go/internal/sync/singleflight (1 files)

This works.

mono ~/Documents/Elements/EBuild.exe --import-go-project github.com/aws/aws-sdk-go

I was on this page yesterday

https://docs.aws.amazon.com/sdk-for-go/api/service/sqs/

and right at the top it has this import “github.com/aws/aws-sdk-go/service/sqs

so I used that url.

Ah yes. The way this works is that github url need to be adjusted a it to get from the. ice-looking url to the actual git url; the logic that does this expected https:// (and added https:// if no protocol was provided), but did to handle an explicit “http://” (which I got when copying the link from the post ;). That part is fixed.

I can reproduce your errors

  • No member “FieldByName” on type “go.reflect.Value” seems to be a legitimate omission in the gold base library; I’ll get that added for Friday.

  • No static member “NewParser” on type “JMESPath” as me stumped, as the error seems legit (the type doesnt seem to have that member). Whats also odd is that I Geta. case fix on that line, from “jmespath” to “JMESPath”. I see the type declared with the uppercase; I dont see what the lowercase “jmespath” would refer to, so the case fix seems “legit”. strange.

  • Type mismatch, cannot assign “Error” to “Tuple” and E: Unknown identifier “err” are then simply follow-up errors from that…

Actually, looks like a bug, indeed. There’s a struct called JMESPath, but theres a namespace called jmespath and it contains the method NewParser(). Some part of the compiler gets confused by the case difference.

Logged as bugs://83917: Go: namespace vs class

1 Like