google / mangle

Apache License 2.0
1.07k stars 38 forks source link

go test fails #37

Closed vorburger closed 3 weeks ago

vorburger commented 3 weeks ago

Just wanted to let you know that, as of da29859, blindly following https://github.com/google/mangle#building--testing fails:

$ go version
go1.22.6 linux/amd64

$ go get ./...
go: downloading bitbucket.org/creachadair/stringset v0.0.11
go: downloading github.com/golang/glog v1.2.0
go: downloading google.golang.org/protobuf v1.34.0
go: downloading go.uber.org/multierr v1.11.0
go: downloading github.com/antlr4-go/antlr/v4 v4.13.0
go: downloading github.com/chzyer/readline v1.5.1
go: downloading golang.org/x/sys v0.22.0
go: downloading golang.org/x/exp v0.0.0-20240707233637-46b078467d37

$ go build ./...

$ go test ./...
# github.com/google/mangle/analysis
analysis/rectify_test.go:20:2: missing go.sum entry for module providing package github.com/google/go-cmp/cmp (imported by github.com/google/mangle/analysis); to add:
        go get -t github.com/google/mangle/analysis
FAIL    github.com/google/mangle/analysis [setup failed]
# github.com/google/mangle/ast
analysis/rectify_test.go:20:2: missing go.sum entry for module providing package github.com/google/go-cmp/cmp (imported by github.com/google/mangle/analysis); to add:
        go get -t github.com/google/mangle/analysis
FAIL    github.com/google/mangle/ast [setup failed]
# github.com/google/mangle/builtin
analysis/rectify_test.go:20:2: missing go.sum entry for module providing package github.com/google/go-cmp/cmp (imported by github.com/google/mangle/analysis); to add:
        go get -t github.com/google/mangle/analysis
FAIL    github.com/google/mangle/builtin [setup failed]
# github.com/google/mangle/engine
analysis/rectify_test.go:20:2: missing go.sum entry for module providing package github.com/google/go-cmp/cmp (imported by github.com/google/mangle/analysis); to add:
        go get -t github.com/google/mangle/analysis
FAIL    github.com/google/mangle/engine [setup failed]
# github.com/google/mangle/factstore
analysis/rectify_test.go:20:2: missing go.sum entry for module providing package github.com/google/go-cmp/cmp (imported by github.com/google/mangle/analysis); to add:
        go get -t github.com/google/mangle/analysis
FAIL    github.com/google/mangle/factstore [setup failed]
# github.com/google/mangle/packages
analysis/rectify_test.go:20:2: missing go.sum entry for module providing package github.com/google/go-cmp/cmp (imported by github.com/google/mangle/analysis); to add:
        go get -t github.com/google/mangle/analysis
FAIL    github.com/google/mangle/packages [setup failed]
# github.com/google/mangle/parse
analysis/rectify_test.go:20:2: missing go.sum entry for module providing package github.com/google/go-cmp/cmp (imported by github.com/google/mangle/analysis); to add:
        go get -t github.com/google/mangle/analysis
FAIL    github.com/google/mangle/parse [setup failed]
# github.com/google/mangle/symbols
analysis/rectify_test.go:20:2: missing go.sum entry for module providing package github.com/google/go-cmp/cmp (imported by github.com/google/mangle/analysis); to add:
        go get -t github.com/google/mangle/analysis
FAIL    github.com/google/mangle/symbols [setup failed]
# github.com/google/mangle/unionfind
analysis/rectify_test.go:20:2: missing go.sum entry for module providing package github.com/google/go-cmp/cmp (imported by github.com/google/mangle/analysis); to add:
        go get -t github.com/google/mangle/analysis
FAIL    github.com/google/mangle/unionfind [setup failed]
ok      github.com/google/mangle/functional     0.006s
?       github.com/google/mangle/interpreter    [no test files]
?       github.com/google/mangle/interpreter/mg [no test files]
?       github.com/google/mangle/parse/gen      [no test files]
?       github.com/google/mangle/proto2struct   [no test files]
ok      github.com/google/mangle/json2struct    0.001s
ok      github.com/google/mangle/rewrite        0.003s
FAIL

@burakemir & @mihaimaruseac FYI

@teivah just in case you are bored and looking for 😸 something to contribute to...

vorburger commented 3 weeks ago

FYI I've still managed to run it, these appear to be "just" test failures, not preventing building the binary:

$ go install ./...

$ ~/go/bin/mg

<decl>.            adds declaration to interactive buffer
<clause>.          adds clause to interactive buffer, evaluates.
?<predicate>       looks up predicate name and queries all facts
?<goal>            queries all facts that match goal
::load <path>      pops interactive buffer and loads source file at <path>
::help             display this help text
::pop              reset state to before interactive defs. or last load command
::show <predicate> shows information about predicate
::show all         shows information about all available predicates
<Ctrl-D>           quit
burakemir commented 3 weeks ago

One needs to run go get -t ./... to get all the dependencies used for testing. I will update the README.md