Skip to content
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

Compilation error #745

Closed
tsipo opened this issue May 18, 2022 · 16 comments · Fixed by #746
Closed

Compilation error #745

tsipo opened this issue May 18, 2022 · 16 comments · Fixed by #746

Comments

@tsipo
Copy link

tsipo commented May 18, 2022

Describe the bug
Hi there,
Your module requires github.com/golang-sql/sqlexp
This module had no go.mod file until now, and one was added today (https://github.com/golang-sql/sqlexp/blob/master/go.mod) for go 1.16.
After running go get -u ./... on my module (which requires yours) I saw:

$ go get -u ./...
go: upgraded github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 => v0.0.0-20220518152126-d42ba59f5c11
...

Trying to build my module, I get the following compilation error:

# github.com/denisenkom/go-mssqldb
../../../../pkg/mod/github.com/denisenkom/go-mssqldb@v0.12.0/token.go:790:79: cannot use info.Message (variable of type string) as type fmt.Stringer in struct literal:
	string does not implement fmt.Stringer (missing String method)

Compilation finished with exit code 2

To Reproduce
See above.
Expected behavior
Code that compiles. Thank you!

Further technical details

Operating system: Ubuntu 20.04.4
Golang version: go1.18.2 linux/amd64

Additional context
N/A

@ATAN13
Copy link

ATAN13 commented May 19, 2022

+1

@mhughdo
Copy link

mhughdo commented May 19, 2022

I got the same error when installing go-mssqldb (one of my modules requires it).

@dtapps
Copy link

dtapps commented May 19, 2022

+1

@syuichi-tsuji
Copy link

so am I. I got the same error.

@vgichira
Copy link

Using go install instead of go get solves the problem for go 1.17+

@mazlumtoprak
Copy link

+1, go install not helping on my side

@vgichira
Copy link

+1, go install not helping on my side

What's your go version?

@mazlumtoprak
Copy link

+1, go install not helping on my side

What's your go version?

GOVERSION="go1.18.2"

@sushilkg
Copy link
Contributor

+1

@sushilkg
Copy link
Contributor

Added a PR to fix this: #746. Can anyone from the maintainers team approve/merge this please?

@RudraNirvan
Copy link
Contributor

+1
^ Thanks.

@tsipo
Copy link
Author

tsipo commented May 19, 2022

Is it tagged? I don't see a new tag yet, and that's what the go toolchain is looking for...

@kardianos
Copy link
Collaborator

Now tagged. v0.12.1

@abdulrabbani00
Copy link

@kardianos - I am still noticing the error with v0.12.1 and go version: 1.18.2:

Error: /tmp/go/pkg/mod/github.com/denisenkom/go-mssqldb@v0.12.1/token.go:790:79: cannot use info.Message (variable of type Message) as type string in struct literal

@kardianos
Copy link
Collaborator

kardianos commented May 19, 2022 via email

@abdulrabbani00
Copy link

I appreciate the speedy fix :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.