jsonschema icon indicating copy to clipboard operation
jsonschema copied to clipboard

go install installs old version

Open theory opened this issue 4 years ago • 3 comments

Wanted to install jv 5.0, but go install couldn't figure it out:

$ go version
go version go1.17.1 darwin/amd64
$ go install github.com/santhosh-tekuri/jsonschema/cmd/jv@v5 
go install: github.com/santhosh-tekuri/jsonschema/cmd/jv@v5: no matching versions for query "v5"

Using @latest works, but installs v1:

$ go install github.com/santhosh-tekuri/jsonschema/cmd/jv@latest
go: downloading github.com/santhosh-tekuri/jsonschema v1.2.4

Not sure if this is a go issue or if the repo needs a cmd/jv/go.mod file to fix it.

theory avatar Sep 30 '21 14:09 theory

I guess it's because cmd/jv isn't versioned like the library is.

theory avatar Sep 30 '21 14:09 theory

i am not sure whether go.mod should be added in cmd/jv

but noticed that following command works:

go install github.com/santhosh-tekuri/jsonschema/v5/cmd/jv@latest

santhosh-tekuri avatar Oct 01 '21 14:10 santhosh-tekuri

Oh! Just need to put the v5 in the right place I guess. This stuff is so opaque.

theory avatar Oct 01 '21 14:10 theory

ran into this as well, would be good to add to the README

decentralgabe avatar Nov 10 '22 01:11 decentralgabe

@decentralgabe this is already added into GitHub README in 6fcf576

santhosh-tekuri avatar Nov 10 '22 05:11 santhosh-tekuri