Skip to content

Fix tests by using new location of kingpin/v2 package.#99

Merged
turnage merged 1 commit intoturnage:masterfrom
sam-fredrickson:use-moved-kingpin-v2
Mar 21, 2025
Merged

Fix tests by using new location of kingpin/v2 package.#99
turnage merged 1 commit intoturnage:masterfrom
sam-fredrickson:use-moved-kingpin-v2

Conversation

@sam-fredrickson
Copy link
Copy Markdown
Contributor

I tried to run the tests, but got errors because of the kingpin.v2 package.

$ go test ./...
# github.com/turnage/graw/cmd/act
cmd/act/act.go:10:2: no required module provides package gopkg.in/alecthomas/kingpin.v2; to add it:
	go get gopkg.in/alecthomas/kingpin.v2
FAIL	github.com/turnage/graw/cmd/act [setup failed]
# github.com/turnage/graw/cmd/feed
cmd/act/act.go:10:2: no required module provides package gopkg.in/alecthomas/kingpin.v2; to add it:
	go get gopkg.in/alecthomas/kingpin.v2
FAIL	github.com/turnage/graw/cmd/feed [setup failed]
ok  	github.com/turnage/graw	(cached)
?   	github.com/turnage/graw/botfaces	[no test files]
ok  	github.com/turnage/graw/reddit	(cached)
ok  	github.com/turnage/graw/streams	(cached)
ok  	github.com/turnage/graw/streams/internal/monitor	(cached)
ok  	github.com/turnage/graw/streams/internal/rsort	(cached)
FAIL

Next I tried getting that package, but found that it has been moved.

$ go get gopkg.in/alecthomas/kingpin.v2
go: gopkg.in/alecthomas/kingpin.v2@upgrade (v2.4.0) requires gopkg.in/alecthomas/kingpin.v2@v2.4.0: parsing go.mod:
        module declares its path as: github.com/alecthomas/kingpin/v2
                but was required as: gopkg.in/alecthomas/kingpin.v2

So, I changed the two files that used the old path with the new one, and now the tests pass.

$ go test ./...
ok  	github.com/turnage/graw	(cached)
?   	github.com/turnage/graw/botfaces	[no test files]
?   	github.com/turnage/graw/cmd/act	[no test files]
?   	github.com/turnage/graw/cmd/feed	[no test files]
ok  	github.com/turnage/graw/reddit	(cached)
ok  	github.com/turnage/graw/streams	(cached)
ok  	github.com/turnage/graw/streams/internal/monitor	(cached)
ok  	github.com/turnage/graw/streams/internal/rsort	(cached)

@turnage
Copy link
Copy Markdown
Owner

turnage commented Mar 21, 2025

Thank you!

@turnage turnage merged commit ee225b5 into turnage:master Mar 21, 2025
1 check passed
@sam-fredrickson sam-fredrickson deleted the use-moved-kingpin-v2 branch March 21, 2025 20:37
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

Successfully merging this pull request may close these issues.

2 participants