gnostic: New release is needed to make @latest not break

@timburks just in case, you missed the comment in #283 😉 It seems we need and actual release to make this work again: github.com/google/gnostic/cmd/protoc-gen-openapi@latest It ignores the tag and uses the release. This works: github.com/google/gnostic/cmd/protoc-gen-openapi@v0.6.1

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 86 (6 by maintainers)

Most upvoted comments

You’re very welcome! 😃 And thanks for ensuring that it went (relatively) smooth with all the pushing, pulling and tagging @timburks 😃 Thank you @seankhliao for guiding us! I really appreciate it 😃

Also works on the official golang:1.16 image. Earlier Go versions don’t support the path@version syntax, so I think we’ve got it fixed. Thanks for researching all of this @morphar and @seankhliao for advising and following!

I just verified on a second system. I’m using go1.18beta on both, fwiw.

go clean -modcache fixed it! 👍

These also work for me

go install github.com/google/gnostic/cmd/disco@latest
go install github.com/google/gnostic/cmd/parse-linter-output@latest
go install github.com/google/gnostic/cmd/petstore-builder@latest
go install github.com/google/gnostic/cmd/protoc-gen-jsonschema@latest
go install github.com/google/gnostic/cmd/protoc-gen-openapi@latest
go install github.com/google/gnostic/cmd/report@latest
go install github.com/google/gnostic/cmd/report-messages@latest
go install github.com/google/gnostic/cmd/vocabulary-operations@latest

I merged #295, pushed v0.6.6, and reran the same set of installs now using @v0.6.6, all succeeded.

I pushed all the remaining cmd/*/v0.6.5 tags.

EDIT: Oddly, I noticed that some of the cmd subdirectories install and some don’t. disco, protoc-gen-jsonschema, protoc-gen-openapi fail and the others succeed.

go install github.com/google/gnostic/cmd/disco@v0.6.5
go install github.com/google/gnostic/cmd/parse-linter-output@v0.6.5
go install github.com/google/gnostic/cmd/petstore-builder@v0.6.5
go install github.com/google/gnostic/cmd/protoc-gen-jsonschema@v0.6.5
go install github.com/google/gnostic/cmd/protoc-gen-openapi@v0.6.5
go install github.com/google/gnostic/cmd/report@v0.6.5
go install github.com/google/gnostic/cmd/report-messages@v0.6.5
go install github.com/google/gnostic/cmd/vocabulary-operations@v0.6.5

that’s expected, it won’t work until the cmd/disco/go.mod file is removed (that’s what defines module boundaries)

yes, that’s right

Yes you need the cmd/*/v0.6.5 tags, they’re needed to publish the cmd/* modules so they can retract themselves

Also, let’s pause and test installing @latest of @v0.6.5 when we have that

I think we need to add something like this to the root go.mod: retract [v0.6.0, v0.6.4] Edit: I’ll add and hope that I’m right.

I’m good with both. I do have the time 😃

Let’s make the second PR after the first is merged to avoid needing to update the PR to merge.

@morphar yes, I just found that all the cmd/*/go.mod files are still present in v0.6.4

#288 + #289 should fix the issues

@shenqidebaozi we all looked at the code and agreed that it looked right 😉

Just for context:

Removing a package

If you would like to hide versions of a module on pkg.go.dev, as well as from the go command, you should retract them. Retracting a module version involves adding a retract directive to your go.mod file and publishing a new version. See the Go blog post New module changes in Go 1.16 and the modules reference for details.