aksdb / caddy-cgi

Common Gateway Interface plugin for the Caddy HTTP server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module does not build anymore

werdnum opened this issue · comments

Seems to be this issue - probably caused by bumping dependencies?

$ xcaddy build --with github.com/aksdb/caddy-cgi/v2 |& gh gist create
✓ Created gist
https://gist.github.com/werdnum/513d0b8a72a38b65437a62f142012e48

In particular:

2023/11/23 14:42:38 [INFO] exec (timeout=0s): /usr/local/bin/go build -o /Users/andrew/caddy -ldflags -w -s -trimpath
# github.com/caddyserver/caddy/v2/modules/caddyhttp
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:462:9: cannot use func(eh parser.ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) {…} (value of type func(eh parser.ExprHelper, target *expr.Expr, args []*expr.Expr) (*expr.Expr, *common.Error)) as parser.MacroExpander value in return statement
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:479:13: eh.GlobalCall undefined (type parser.ExprHelper has no field or method GlobalCall)
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:479:37: eh.Ident undefined (type parser.ExprHelper has no field or method Ident)
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:479:66: cannot use matchArgs (variable of type []*expr.Expr) as []ast.Expr value in argument to eh.NewList
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:488:9: cannot use func(eh parser.ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) {…} (value of type func(eh parser.ExprHelper, target *expr.Expr, args []*expr.Expr) (*expr.Expr, *common.Error)) as parser.MacroExpander value in return statement
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:495:14: eh.GlobalCall undefined (type parser.ExprHelper has no field or method GlobalCall)
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:495:38: eh.Ident undefined (type parser.ExprHelper has no field or method Ident)
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:509:9: cannot use func(eh parser.ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) {…} (value of type func(eh parser.ExprHelper, target *expr.Expr, args []*expr.Expr) (*expr.Expr, *common.Error)) as parser.MacroExpander value in return statement
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:545:14: eh.GlobalCall undefined (type parser.ExprHelper has no field or method GlobalCall)
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:545:38: eh.Ident undefined (type parser.ExprHelper has no field or method Ident)
../go/pkg/mod/github.com/caddyserver/caddy/v2@v2.7.5/modules/caddyhttp/celmatcher.go:545:38: too many errors
2023/11/23 14:43:48 [INFO] Cleaning up temporary folder: /Users/andrew/buildenv_2023-11-23-1439.1035174675

I'm seeing the same problem.

Found a workaround:
xcaddy build master --with github.com/aksdb/caddy-cgi/v2@v2.2.1

Damn, I think the module cache bit me. I'll release a revised version to overrule the one in the cache soonish.

I released v2.2.3, which should fix this now.

Tested using:
xcaddy build master --with github.com/aksdb/caddy-cgi/v2@v2.2.3
Confirmed fixed!
Thank you.