+1
Passing the git ID and other version information via ldflags would be
better in my opinion than embedding a file.  It can be automated in the
Makefile, and the values can go directly into a variable, so you don't have
to do any string parsing.  The feature has been around a long time, so we
wouldn't need to increase the minimum Go version.

On Thu, Sep 29, 2022 at 8:43 AM Ming Luo <ming....@kafkaesque.io.invalid>
wrote:

> Have you thought about using ldflags to pass git commit or git tag which
> can be the actual version. This will tie into a build system automatically
> without additional files. We don't have to maintain the version
> information in git and a separate file.
> Here is an example.
>
> https://urldefense.com/v3/__https://stackoverflow.com/questions/11354518/application-auto-build-versioning/55090713*55090713__;Iw!!PbtH5S7Ebw!eR_uHNK3r-klu3s2SdSgZYyQ6vW7X2-gTWTxxFK-RzPj5G23CJbZyVTU4SJa4M8WEAc0rns0tm6aXT1eTEgWQlc-JZ8wSCs$
>
>
> On Thu, 29 Sept 2022 at 02:41, r...@apache.org <ranxiaolong...@gmail.com>
> wrote:
>
> > Hello Matteo:
> >
> > Considering that some users are still using the Go 1.15 version, in the
> > 0.9.0 release, we still use the form of hard code and set the form of
> > pulsar-go-client to the version of 0.9.0. In order to ensure that the
> 0.9.0
> > release maintains backward compatibility, we may continue to do this for
> a
> > while. When we scrap Go 1.15, we will use the official Go embed to
> > dynamically configure pulsar Version information for -client-go.
> >
> > --
> > Thanks
> > Xiaolong Ran
> >
> > Matteo Merli <matteo.me...@gmail.com> 于2022年9月29日周四 11:33写道:
> >
> > > +1
> > >
> > > It would be good to determine and document a compatibility policy to
> > state
> > > which versions are going to be supported and for how long.
> > >
> > > On Wed, Sep 28, 2022 at 8:31 PM 沈家琦 <gleiphir2...@gmail.com> wrote:
> > >
> > > > +1
> > > > pulsar-go-client from Go 1.15 to Go 1.16
> > > >
> > > > Thanks
> > > >
> > > > r...@apache.org <ranxiaolong...@gmail.com> 于2022年9月29日周四 11:11写道:
> > > >
> > > > > Hello everyone:
> > > > >
> > > > > In the current version of pulsar-go-client, we do not support
> > embedding
> > > > the
> > > > > version information of pulsar-go-client into
> > > > > Client Command to send to the Broker. Now the hard code is fixed to
> > > > 0.1.0.
> > > > > This makes it impossible for us to determine
> > > > > which version of pulsar-go-client the current user is using through
> > the
> > > > > version information.
> > > > >
> > > > > To support this feature, the more clumsy method is described using
> > > > > https://github.com/apache/pulsar-client-go/pull/820.
> > > > > However, Go 1.16 officially supports the feature of embed (
> > > > >
> https://urldefense.com/v3/__https://pkg.go.dev/embed__;!!PbtH5S7Ebw!eR_uHNK3r-klu3s2SdSgZYyQ6vW7X2-gTWTxxFK-RzPj5G23CJbZyVTU4SJa4M8WEAc0rns0tm6aXT1eTEgWQlc-3UTCMWo$
> ), which supports reading the
> > > > > specified file directly, which seems to be a more elegant way, but
> > this
> > > > > requires Go 1.16 version. Yes, the current minimum
> > > > > version supported by our pulsar-go-client is Go 1.15, which
> requires
> > us
> > > > to
> > > > > change the minimum version of
> > > > > pulsar-go-client from Go 1.15 to Go 1.16.
> > > > >
> > > > > So here we start a discussion within the community to see if we can
> > > make
> > > > > this change.
> > > > >
> > > > > --
> > > > > Thanks
> > > > > Xiaolong Ran
> > > > >
> > > >
> > > --
> > > --
> > > Matteo Merli
> > > <matteo.me...@gmail.com>
> > >
> >
>
>
> --
> Powered by Pulsar
> Engineering, Kesque
>

Reply via email to