omissis / go-jsonschema

A tool to generate Go data types from JSON Schema definitions.
MIT License
582 stars 93 forks source link

Go install complains on go.mod #131

Closed ksysoev closed 1 year ago

ksysoev commented 1 year ago

Hi,

New version has a problem with installation via running go install.

Run go install github.com/atombender/go-jsonschema/cmd/gojsonschema@v0.13.0
go: downloading github.com/atombender/go-jsonschema v0.13.0
go: github.com/atombender/go-jsonschema/cmd/gojsonschema@v0.13.0 (in github.com/atombender/go-jsonschema@v0.13.0):
    The go.mod file for the module providing named packages contains one or
    more replace directives. It must not contain directives that would cause
    it to be interpreted differently than if it were the main module.
omissis commented 1 year ago

hi @ksysoev I will take a look asap, thanks for the report! 🙏

nicholasjackson commented 1 year ago

It will be this line in the go.mod

replace github.com/atombender/go-jsonschema/tests/data => ./tests/data

The local folder will not exist when trying to do a go install, as an interim, 0.12.1 installs fine.

go install github.com/atombender/go-jsonschema/cmd/gojsonschema@v0.12.1
omissis commented 1 year ago

@ksysoev @nicholasjackson the issue should have been addressed in v0.13.1, if you can spare a moment to double check it I will then close this issue. Thanks!

ksysoev commented 1 year ago

@omissis it works. thank you for the prompt fix.