Closed dnapier closed 1 year ago
The issue persists. I think this is a trickle down dependency issue..
Unless I'm misreading it, goregen needs to either update their go.mod or your expr module needs to use convey directly rather than indirectly through goregen.
go: finding module for package github.com/smartystreets/assertions
go: finding module for package github.com/jtolds/gls
go: found github.com/jtolds/gls in github.com/jtolds/gls v4.20.0+incompatible
go: found github.com/smartystreets/assertions in github.com/smartystreets/assertions v1.15.0
go: [redacted] imports
goa.design/goa/v3/dsl imports
goa.design/goa/v3/expr imports
github.com/zach-klippenstein/goregen tested by
github.com/zach-klippenstein/goregen.test imports
github.com/smartystreets/goconvey/convey imports
github.com/smartystreets/assertions: github.com/smartystreets/assertions@v1.15.0: parsing go.mod:
module declares its path as: github.com/smarty/assertions
but was required as: github.com/smartystreets/assertions
Seems that package is only used in one place:
Adding:
replace github.com/smartystreets/assertions v1.15.0 => github.com/smartystreets/assertions v1.13.0
To my go.mod fixes this for now.
Could you post repro steps for this issue? I can't seem to reproduce with a simple example, the following compiles and runs fine for me:
package main
import (
"fmt"
"goa.design/goa/v3/dsl"
)
func main() {
it := dsl.Type("Person", func() {
dsl.Attribute("name", dsl.String)
})
fmt.Println(it)
}
Given the following go.mod
:
module example
go 1.20
require goa.design/goa/v3 v3.12.1
require (
github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/smartystreets/assertions v1.13.1 // indirect
github.com/stretchr/testify v1.8.3 // indirect
github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/tools v0.11.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Tried it again and got the same error as before. Deleted smartystreets from go.mod and deleted go.sum, re-ran build commands and it worked. I think the difference was that assertions was being required as v1.15.0, but is now required as v1.13.1.
The output of
go mod tidy
on a program which imports the dsl package produces this output:I believe goa just needs to update it’s go.mod indirect imports to resolve this. The upstream (convey) changed their dependencies.