Closed Dithilli closed 1 year ago
Hey @Dithilli, thanks for reporting this. Indeed, go get
is not appropriate for installing the pegomock binary anymore.
I was going to submit a PR to update it but I can't seem to.
What was the problem? You should be able to just edit the README and GitHub will create a fork for you where you can make the change and open a PR. Did you try that?
I did and for some reason I was getting permissions errors. Let me try again. Sent from my iPhoneOn Feb 7, 2023, at 4:50 AM, Peter Götz @.***> wrote: Hey @Dithilli, thanks for reporting this. Indeed, go get is not appropriate for installing the pegomock binary anymore.
I was going to submit a PR to update it but I can't seem to.
What was the problem? You should be able to just edit the README and GitHub will create a fork for you where you can make the change and open a PR. Did you try that?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
Hey, I am having trouble with installation via go install as well.
go install `github.com/petergtz/pegomock/pegomock@latest`
go: finding module for package golang.org/x/tools/go/loader
go: finding module for package gopkg.in/alecthomas/kingpin.v2
go: found gopkg.in/alecthomas/kingpin.v2 in gopkg.in/alecthomas/kingpin.v2 v2.3.1
go: found golang.org/x/tools/go/loader in golang.org/x/tools v0.6.0
go: github.com/petergtz/pegomock/pegomock imports
gopkg.in/alecthomas/kingpin.v2: gopkg.in/alecthomas/kingpin.v2@v2.3.1: parsing go.mod:
module declares its path as: github.com/alecthomas/kingpin/v2
but was required as: gopkg.in/alecthomas/kingpin.v2
Hey @gurpreetseedhar, would you be willing to submit a pull-request?
Is this project abandoned? Does not install, does not run w/o crashing.
Hey @llamahunter, @gurpreetseedhar, @Dithilli,
I've just released a new major version with Go modules support and updated installation instructions. Does this fix your issues?
@llamahunter If things are still crashing for you, can paste some output here? (I realize error handling could be better in some parts, where you only get a panic. I'd be happy to fix those, if you paste them here.)
@llamahunter If things are still crashing for you, can paste some output here? (I realize error handling could be better in some parts, where you only get a panic. I'd be happy to fix those, if you paste them here.)
I found that if I rolled back to golang 1.16, it would run without crashing. I had tried to patch up the current code and make a PR, but couldn't figure out how to get the repo to build.
There were also discrepancies in some upstream packages between github.com and gopkg.in urls. Did that get fixed?
Will try again with the latest release. Have the installation notes in the README been updated? They still referred to things like 'go get' last I checked.
@llamahunter
I had tried to patch up the current code and make a PR, but couldn't figure out how to get the repo to build.
Agree, it was pretty hard to get it to build with current Go versions and dependencies etc. Needed lots of changes. It's building and running tests successfully now. I'm still working on the GitHub action, which seems to have some problems still.
There were also discrepancies in some upstream packages between github.com and gopkg.in urls. Did that get fixed?
Yes, I fixed that too.
Have the installation notes in the README been updated?
Yes. See section Installing Pegomock and Getting Started in there.
Sorry, I take it back. The versioning introduced some issues. Will post again here, when it's fixed.
@llamahunter Okay, fixed the bug, GH action is green. Would be very happy to hear if it works for you now.
Ok, works now. Had some mysterious errors about some things not working (e.g. with Whenever()) because there were other imports I needed to update from github.com/petergtz/pegomock
to github.com/petergtz/pegomock/v3
(especially the ginko_compatible
one). Might mention that in an 'upgrade from previous version' step?
Good idea to add a migration guide. I mentioned the necessary steps in the release description, but no one reads that probably 🙂
Good idea to add a migration guide. I mentioned the necessary steps in the release description, but no one reads that probably 🙂
Ah, I often do look at release descriptions for stuff that frequently updates with breaking changes, but for a rare change, and especially a major change, I expect the README.md to say something about 'v2 to v3 migration guide', which, in this case, could just link to the release description.
Makes sense. Done.
I'm closing this issue now. Anyone please feel free if you think the problem is not solved.
go get no longer works, and people should use go install github.com/petergtz/pegomock/pegomock@latest
I was going to submit a PR to update it but I can't seem to.