grind icon indicating copy to clipboard operation
grind copied to clipboard

Grind depends on types.EvalNode

Open attilaolah opened this issue 10 years ago • 10 comments

/go/src/rsc.io/grind/vardecl/vardecl.go:88: undefined: types.EvalNode

attilaolah avatar Jun 17 '15 12:06 attilaolah

Looks like types.EvalNood has been removed in https://github.com/golang/tools/commit/665374f1c86631cf73f4729095d4cf4313670545.

attilaolah avatar Jun 17 '15 12:06 attilaolah

Bump! I can't go get it :(

mvdan avatar Aug 14 '15 20:08 mvdan

Yeah, here's hoping this will get updated - really loved this tool :) Unfortunately, my Go skills are not quite good enough yet for submitting a pull request..

fekle avatar Sep 10 '15 09:09 fekle

Would also like to see this fixed, was hoping to integrate it into Go Report Card http://goreportcard.com/

shawnps avatar Oct 03 '15 07:10 shawnps

I think grind is becoming less and less attractive, esp. now that there's gometalinter.

attilaolah avatar Oct 11 '15 18:10 attilaolah

No other tool does the same code rewrites that grind does.

dgryski avatar Oct 12 '15 05:10 dgryski

Did*.

anacrolix avatar Oct 12 '15 11:10 anacrolix

I forked the code at jackspirou/grind and added the fix that @xwb1989 provided. I just wanted a place that I could run go get against and pickup PR #10. I would have just used the fork @xwb1989 had to submit the PR, but the import paths need to match the repo for a proper go get.

I ended up with go get github.com/jackspirou/grind for grind on Go versions 1.4+.

I know this is an old issue, but I thought it might help someone who is looking for a quick go get of grind.

jackspirou avatar Dec 26 '15 02:12 jackspirou

@jackspirou Trying to go get your fork doesn't work for me:

go get github.com/jackspirou/grind
# github.com/jackspirou/grind/vardecl
../../jackspirou/grind/vardecl/vardecl.go:89: xScope.Pos undefined (type *types.Scope has no field or method Pos)
../../jackspirou/grind/vardecl/vardecl.go:89: too many arguments in call to types.Eval

I would have created an issue on your fork, but you don't have issues enabled.

tylerstillwater avatar Dec 28 '15 17:12 tylerstillwater

@tylerb issues are now enabled. What version of go are you using? Just curious, since the travis tests pass on 1.4+. I'll see if I can debug it, please open an issue :)

EDIT:

on go version go1.5.1 darwin/amd64 everything builds with:

$ go get -u -v github.com/jackspirou/grind                                                                                                     
github.com/jackspirou/grind (download)
Fetching https://golang.org/x/tools/go/gcimporter?go-get=1
Parsing meta tags from https://golang.org/x/tools/go/gcimporter?go-get=1 (status code 200)
get "golang.org/x/tools/go/gcimporter": found meta tag main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/gcimporter?go-get=1
get "golang.org/x/tools/go/gcimporter": verifying non-authoritative meta tag
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
golang.org/x/tools (download)
Fetching https://golang.org/x/tools/go/exact?go-get=1
Parsing meta tags from https://golang.org/x/tools/go/exact?go-get=1 (status code 200)
get "golang.org/x/tools/go/exact": found meta tag main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/exact?go-get=1
get "golang.org/x/tools/go/exact": verifying non-authoritative meta tag
Fetching https://golang.org/x/tools/go/types?go-get=1
Parsing meta tags from https://golang.org/x/tools/go/types?go-get=1 (status code 200)
get "golang.org/x/tools/go/types": found meta tag main.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools/go/types?go-get=1
get "golang.org/x/tools/go/types": verifying non-authoritative meta tag
github.com/jackspirou/grind/flow
github.com/jackspirou/grind/block
github.com/jackspirou/grind/grinder
github.com/jackspirou/grind/deadcode
github.com/jackspirou/grind/vardecl
github.com/jackspirou/grind/gotoinline
github.com/jackspirou/grind

EDIT: issue resolved here: https://github.com/jackspirou/grind/issues/1

jackspirou avatar Dec 28 '15 20:12 jackspirou