Skip to content

[devprod] Makefile target for creating mocks is broken #4134

@shaan420

Description

@shaan420

Filing M3 Issues

General Issues

When I run "make mock-gen-aggregator" it fails with errors pointing to file not found etc.

shankar ~/go-repos/src/oss/m3 % make mock-gen-aggregator
Installing build tools
go: finding module for package golang.org/x/tools/go/ast/astutil
go: finding module for package github.com/m3db/m3x/log
go: found github.com/m3db/m3x/log in github.com/m3db/m3x v0.0.0-20190408051622-ebf3c7b94afd
go: found golang.org/x/tools/go/ast/astutil in golang.org/x/tools v0.1.12
go: finding module for package golang.org/x/tools/imports
go: finding module for package golang.org/x/tools/go/ast/astutil
go: found golang.org/x/tools/go/ast/astutil in golang.org/x/tools v0.1.12
go: found golang.org/x/tools/imports in golang.org/x/tools v0.1.12
go: finding module for package golang.org/x/tools/imports
go: finding module for package github.com/pkg/errors
go: found github.com/pkg/errors in github.com/pkg/errors v0.9.1
go: found golang.org/x/tools/imports in golang.org/x/tools v0.1.12
--- Generating mocks aggregator
20:38:52.350246[F] unable to write output to /home/user/go/src/github.com/m3db/m3/src/aggregator/aggregator/aggregator_mock.go: open /home/user/go/src/github.com/m3db/m3/src/aggregator/aggregator/aggregator_mock.go: no such file or directory
src/aggregator/generated/mocks/generate.go:22: running "sh": exit status 1
make: *** [Makefile:391: mock-gen-aggregator] Error 1

It seems like the make target rely on hardcoded filepaths which might not be the case in most scenarios.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions