go-reform/reform

Go 1.15: generated code does not pass go vet

Closed this issue ยท 5 comments

uzzz commented

Describe the bug
With go 1.15 generated code that does not pass go test because of go vet warning.

To Reproduce

$ go version
go version go1.15 darwin/amd64

$ reform --version
v1.4.1

$ cat test.go 
package main


//go:generate reform

//reform:items
type item struct {
	ID string `reform:"id,pk"`
}

$ go generate ./...
$ go test ./...
./test_reform.go:107:10: conversion from int64 to string yields a string of one rune, not a string of digits (did you mean fmt.Sprint(x)?)

Expected behavior
No error on go vet

Additional context
golang/go#32479

I can see a pull request, when is it planned to go into release? go1.15 is currently broken ๐Ÿ˜ž

Unfortunately, that PR is not enough. Workaround for now: go test -vet=atomic,bool,buildtags,errorsas,ifaceassert,nilfunc,printf

Please try v1.5.0-beta1

v1.5.0 released. See #269 for more in-depth explanation.

uzzz commented

Yes, seems fine now, thanks for fixing it.