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

go module support #16

Open
LennyPenny opened this issue Feb 25, 2020 · 11 comments
Open

go module support #16

LennyPenny opened this issue Feb 25, 2020 · 11 comments

Comments

@LennyPenny
Copy link

LennyPenny commented Feb 25, 2020

Heyho,
I'm trying to run this on a go module and it doesn't seem to find any of the packages.

Here's the output of go test vs courtney

lenny@localhost ~/g/xxxx> go test ./...
? gitlab.com/xxx/yyy/xxxx/cmd/service [no test files]
? gitlab.com/xxx/yyy/xxxx/config [no test files]
? gitlab.com/xxx/yyy/xxxx/model [no test files]
ok gitlab.com/xxx/yyy/xxxx/pkg/extractparsers 0.011s
ok gitlab.com/xxx/yyy/xxxx/pkg/filerule 0.005s
? gitlab.com/xxx/yyy/xxxx/pkg/http/rest [no test files]
? gitlab.com/xxx/yyy/xxxx/pkg/http/rest/context [no test files]
? gitlab.com/xxx/yyy/xxxx/pkg/http/rest/middleware [no test files]
? gitlab.com/xxx/yyy/xxxx/pkg/log [no test files]
ok gitlab.com/xxx/yyy/xxxx/pkg/rule 0.006s
ok gitlab.com/xxx/yyy/xxxx/pkg/zapi 0.004s
ok gitlab.com/xxx/yyy/xxxx/util 0.003s

lenny@localhost ~/g/xxxx> courtney ./...
Package not found for /home/lenny/gits/xxxx

@dave
Copy link
Owner

dave commented Feb 25, 2020

Aah I haven’t updated this to support modules. Not sure if I’ll get around to doing this any time soon unfortunately.

@jcollum
Copy link

jcollum commented Jun 10, 2020

Damn I was excited to try this tool but not supporting modules is a deal breaker for my project.

@dave
Copy link
Owner

dave commented Jun 10, 2020

PRs welcome!

@jcollum
Copy link

jcollum commented Jun 11, 2020

My team might be game for that. Do you have any guidance to offer? I'm a very new Go dev, I'm not sure where to start here.

@rubensayshi
Copy link
Collaborator

@dave I wanted to give it a shot to see if I could, but I'm stuck at packages.Load panicing with;

2020/12/11 16:15:51 internal error: nil Pkg importing "strconv" from "example/com/my/module/src/package"

unfortunately the packages tool is used much by people so it's hard to find other code of people using it... you got any idea?

@dave
Copy link
Owner

dave commented Dec 11, 2020

No idea, sorry!

@rubensayshi
Copy link
Collaborator

@jcollum @LennyPenny
I've managed to get it to work for my repo with go mod enabled, there's a PR for review and if you could give it a shot to see if it works for you that would be very helpful; #21

@LuckyPigeon
Copy link

This commit works for me go get -u github.com/dave/courtney@038390a12707e2d91979d2ca77a71597f4afe400

@rubensayshi
Copy link
Collaborator

@LuckyPigeon we merged my MR a while back, master should be working fine for go mod

@imsodin
Copy link

imsodin commented Mar 18, 2022

Can that be tagged such that the module can be imported cleanly?

@dave
Copy link
Owner

dave commented Mar 18, 2022

Ooh sorry I'll do this later today

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

6 participants