Thread (2 messages) 2 messages, 2 authors, 2016-07-19

Re: [PATCH] contrib/persistent-https: update ldflags syntax for Go 1.7+

From: Junio C Hamano <hidden>
Date: 2016-07-19 17:04:43

Shawn Pearce [off-list ref] writes:
On Mon, Jul 18, 2016 at 9:32 PM, Parker Moore [off-list ref] wrote:
quoted
quoted
The label does not even identify the version of the source in any way, so I am not sure how people are depending on that feature anyway ;-)
Would it be a better solution simply to remove this build flag?
Alternatively, if Git wished to support Go v1.5 and below, I would be
more than happy to send a patch with a dynamic lookup in the Makefile
based on the output of `go version`. I would be more than happy to
submit either patch.
I think we could remove that BUILD_LABEL entirely. Colby liked having
a marker so he knows what "version" a user is running, but without any
correlation to source here it just isn't that useful.
Inside an organization where people use it as a tool supplied by
somebody else, who is the designated supplier of it, build-stamp may
be sufficient to identify what "version" a user is running.  If we
wanted to do a "here is the source that was built from", the logical
place to pull that information from would be ../../GIT-VERSION-FILE,
but the mechanism to embed the information would still be -X var=val
(or "-X var val" for older Go).

So unless the "dynamic lookup in the Makefile" turns out to be too
gross, we would want to keep the mechanism and just make it usable
for versions before 1.5 and also after 1.7, I would guess.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help