Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after running make #85

Open
AGMETEOR opened this issue Feb 8, 2020 · 8 comments
Open

Error after running make #85

AGMETEOR opened this issue Feb 8, 2020 · 8 comments

Comments

@AGMETEOR
Copy link
Contributor

AGMETEOR commented Feb 8, 2020

Running make produces this error.

  • Commenting out line 70 in the Makefile fixes the issue

# $(GO) vet -vettool=$(GOPATH)/bin/shadow ./...

Usage: shadow [-flag] [package]

This analyzer check for shadowed variables.
A shadowed variable is a variable declared in an inner scope
with the same name and type as a variable in an outer scope,
and where the outer variable is mentioned after the inner one
is declared.

(This definition can be refined; the module generates too many
false positives and is not yet enabled by default.)

For example:

        func BadRead(f *os.File, buf []byte) error {
                var err error
                for {
                        n, err := f.Read(buf) // shadows the function variable 'err'
                        if err != nil {
                                break // causes return of wrong value
                        }
                        foo(buf)
                }
                return err
        }


Flags:  -V      print version and exit
  -all
        no effect (deprecated)
  -c int
        display offending line with this many lines of context (default -1)
  -cpuprofile string
        write CPU profile to this file
  -debug string
        debug flags, any subset of "fpstv"
  -fix
        apply all suggested fixes
  -flags
        print analyzer flags in JSON
  -json
        emit JSON output
  -memprofile string
        write memory profile to this file
  -source
        no effect (deprecated)
  -strict
        whether to be strict about shadowing; can be noisy
  -tags string
        no effect (deprecated)
  -trace string
        write trace log to this file
  -v    no effect (deprecated)
make: *** [govet] Error 2
@hanzei
Copy link
Contributor

hanzei commented Feb 9, 2020

What go version are you using?

@AGMETEOR
Copy link
Contributor Author

AGMETEOR commented Feb 9, 2020

go version go1.13.1 darwin/amd64

@hanzei
Copy link
Contributor

hanzei commented Feb 20, 2020

Would you please try running go get -u golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow in /tmp?

@s-trooper
Copy link

Hi, i cannt compile too, on make i get:

main.go:9:2: cannot find package "github.com/mattermost/mattermost-server/v5/model" in any of:
        /usr/lib/go-1.10/src/github.com/mattermost/mattermost-server/v5/model (from $GOROOT)
        /home/xxx/go/src/github.com/mattermost/mattermost-server/v5/model (from $GOPATH)
main.go:10:2: cannot find package "github.com/pkg/errors" in any of:
        /usr/lib/go-1.10/src/github.com/pkg/errors (from $GOROOT)
        /home/xxx/go/src/github.com/pkg/errors (from $GOPATH)
main.go:11:2: cannot find package "github.com/mattermost/mattermost-server/v5/model" in any of:
        /usr/lib/go-1.10/src/github.com/mattermost/mattermost-server/v5/model (from $GOROOT)
        /home/xxx/go/src/github.com/mattermost/mattermost-server/v5/model (from $GOPATH)
main.go:12:2: cannot find package "github.com/mholt/archiver/v3" in any of:
        /usr/lib/go-1.10/src/github.com/mholt/archiver/v3 (from $GOROOT)
        /home/xxx/go/src/github.com/mholt/archiver/v3 (from $GOPATH)
main.go:13:2: cannot find package "github.com/pkg/errors" in any of:
        /usr/lib/go-1.10/src/github.com/pkg/errors (from $GOROOT)
        /home/xxx/go/src/github.com/pkg/errors (from $GOPATH)
make: build/bin/manifest: Command not found
build/setup.mk:16: *** "Cannot parse id from plugin.json".  Stop.

@AGMETEOR
Copy link
Contributor Author

AGMETEOR commented Mar 4, 2020

Tried running go get ./... ?

@s-trooper
Copy link

I got it to compile/make, the default golang in Ubuntu 18.04 is go1.10, that doesn't work. After upgrade to go1.14 is all ok, it does compile.

@s-trooper
Copy link

sure it is not my business but you should consider to write the requirements for development environment. i am still not able to compile this template, i've installed latest nodejs, npm, golang and now after 2 hours i stick in some eslint error ... that feels more alpha than beta so far.

@AGMETEOR
Copy link
Contributor Author

AGMETEOR commented Mar 4, 2020

What error are you getting? If I am to take a wild guess, make sure you also have TypeScript installed, otherwise, please share the error details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants