integrii / flaggy

Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
The Unlicense
856 stars 30 forks source link

Go Module Status #42

Closed bensallen closed 5 years ago

bensallen commented 5 years ago

Bit confused by the project's current go.mod relation to the tagged version 1.1.0.

Current go mod tidy results with a import "github.com/integrii/flaggy" has master being selected:

go 1.12

require (
    github.com/integrii/flaggy v0.0.0-20190220052119-eb3cf98db853
)

Editing go.mod to:

go 1.12

require (
    github.com/integrii/flaggy 1.1.0
)

Results in:

$ go mod tidy
go: finding github.com/integrii/flaggy 1.1.0
go: github.com/integrii/flaggy@v0.0.0-20180921152458-f984caf11202: go.mod has post-v0 module path "github.com/integrii/flaggy/v1" at revision f984caf11202
go: error loading module requirements

and results in go.mod being updated to:

go 1.12

require (
    github.com/integrii/flaggy v0.0.0-20180921152458-f984caf11202
)

This error makes sense since f984caf11202 go.mod has v1 declared. It appears the later commit 6cc633c fixes this by removing all the v1 tags.

Is the project in a transitional state before the next release, eg. presumable tagging v1.1.1 would fix this?

Thanks.

integrii commented 5 years ago

Thanks for reporting this! You put in a ton of details and understand the problem really well, which makes this easy to fix.

I didn't realize that I forgot to tag a new release after fixing the module paths. I wrote a test program that is external to this repo and tagged v1.2.0 to set things right. My test program builds properly and creates a go module like this:

module github.com/integrii/flaggy-test

require github.com/integrii/flaggy v1.2.0

Thanks!

bensallen commented 5 years ago

Welcome. Thanks for the fix and the great package.