chukmunnlee / caddy-openapi

A Caddy module to validate HTTP request and response against a OpenAPI spec (V3) file
Apache License 2.0
23 stars 7 forks source link

Compatibility with latest Caddy 2.6+ releases? #2

Closed benjaoming closed 1 year ago

benjaoming commented 1 year ago

Hi!

Thanks for a super useful project to validate OpenAPI spec implementations :+1:

I'm not a Go developer, but I understood that the latest dependency error is probably because Go 1.17 support was dropped in Caddy so I can no longer build the module with Caddy 2.6+.

Go 1.17 was dropped here and it was released in Caddy 2.6.0: https://github.com/caddyserver/caddy/pull/4925

#0 15.14 2023/02/20 09:34:50 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/chukmunnlee/caddy-openapi github.com/caddyserver/caddy/v2@v2.6.4 
#0 15.94 go: downloading github.com/chukmunnlee/caddy-openapi v0.7.0
#0 30.79 panic: internal error: can't find reason for requirement on github.com/google/pprof@v0.0.0-20210407192527-94a9f03dee38
#0 30.79 
#0 30.79 goroutine 1 [running]:
#0 30.79 cmd/go/internal/modget.(*resolver).updateBuildList.func1({{0xc000376f30?, 0xc00025a750?}, {0xc000096660?, 0xc000300de8?}})
#0 30.79    /usr/local/go/src/cmd/go/internal/modget/get.go:1760 +0x114
#0 30.79 cmd/go/internal/modget.(*resolver).updateBuildList(0xc00055c800, {0xb313d0, 0xc000028058}, {0x0, 0x0, 0x0})
#0 30.79    /usr/local/go/src/cmd/go/internal/modget/get.go:1765 +0x597
#0 30.79 cmd/go/internal/modget.(*resolver).resolveQueries(0xc00055c800, {0xb313d0, 0xc000028058}, {0xc0000575f0, 0x2, 0x472485?})
#0 30.79    /usr/local/go/src/cmd/go/internal/modget/get.go:1243 +0x1e5
#0 30.79 cmd/go/internal/modget.runGet({0xb313d0, 0xc000028058}, 0xc000026480?, {0xc000024220, 0x2, 0x2})
#0 30.79    /usr/local/go/src/cmd/go/internal/modget/get.go:314 +0x40b
#0 30.79 main.invoke(0xe2cfc0, {0xc0000241f0, 0x5, 0x5})
#0 30.79    /usr/local/go/src/cmd/go/main.go:225 +0x34e
#0 30.79 main.main()
#0 30.79    /usr/local/go/src/cmd/go/main.go:179 +0x7d1
#0 30.79 2023/02/20 09:35:05 [FATAL] exit status 2
------
failed to solve: executor failed running [/bin/sh -c xcaddy build --with github.com/chukmunnlee/caddy-openapi]: exit code: 1
benjaoming commented 1 year ago

caddy:2.7.3-builder works :tada: