junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
64.33k stars 2.38k forks source link

Publish official version for Go module #2879

Closed lcheylus closed 2 months ago

lcheylus commented 2 years ago

Info

Problem / Steps to reproduce

When I try to get Go module version for your FZF project, the version is incorrect :

$ go list -m github.com/junegunn/fzf@0.30.0
github.com/junegunn/fzf v0.0.0-20220404140143-209366754892

It's a pseudo-version number (see https://go.dev/doc/modules/publishing) but it would be better if version was 0.30.0.

Thus, the versions for fzf are not published on Go Module Mirror https://proxy.golang.org/

$ go list -m --versions github.com/junegunn/fzf
github.com/junegunn/fzf

For some automatic builds for OS packaging, the version returned by go list -m <module> is used to determine the current version. And with pseudo-version number, it's not handled properly. See for example, automatic build of FZF for OpenBSD OS https://github.com/openbsd/ports/blob/master/sysutils/fzf/Makefile

Please could you publish the release versions of FZF on Go Module Mirror with the correct versioning (i.e. 0.30.0 for the current version) ?

junegunn commented 3 months ago

Related: https://github.com/golang/go/issues/32945

So, I'm going to have to create tags with v prefix. I can do that, but I'm afraid that might break automation scripts for some packages, so I can't easily decide to do so from now on. One option would be to push both v#.#.# and #.#.#.

lcheylus commented 2 months ago

@junegunn Thanks to fix this issue :)

The latest version 0.54.0 of fzf is now published on https://pkg.go.dev :)

$ go list -m github.com/junegunn/fzf@latest
github.com/junegunn/fzf v0.54.0