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

can't generate query sets on Windows #18

Closed
JermineHu opened this issue Nov 18, 2017 · 3 comments
Closed

can't generate query sets on Windows #18

JermineHu opened this issue Nov 18, 2017 · 3 comments
Labels

Comments

@JermineHu
Copy link

JermineHu commented Nov 18, 2017

My ENV:
go version go1.9.2 windows/amd64

My Code Path:

E:\GOPATH\src\test\models.go

My question :
To excute go generate ./... got a failure info : can't generate query sets: can't parse file models.go to get structs: can't load types for file models.go in package "./." But in Desktop dictionary path “test/models.go” to excute go generate ./... was successful !

The code :

import "github.com/jinzhu/gorm"

//go:generate goqueryset -in models.go
// User struct represent user model. Next line (gen:qs) is needed to autogenerate UserQuerySet.
// gen:qs
type User struct {
	gorm.Model
	Rating      int
	RatingMarks int
}
@arowden
Copy link

arowden commented Dec 18, 2017

I'm also having this issue.

@lightglitch
Copy link
Contributor

I'm having something similar and I think

https://github.com/jirfag/go-queryset/blob/master/parser/parser.go#L46

windows paths, I will try to do some debugging.

@jirfag
Copy link
Owner

jirfag commented Feb 8, 2018

I merged PR from @lightglitch
@JermineHu @arowden @lightglitch please check issue on master branch

@jirfag jirfag added the bug label Feb 8, 2018
@jirfag jirfag changed the title can't generate query sets: can't generate query sets on Windows Feb 8, 2018
@jirfag jirfag closed this as completed Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants