-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: Subversion VCS build information should be included in the build #73444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
ToolProposal
Issues describing a requested change to a Go tool or command-line program.
Comments
do you want to submit a change? |
bsdcode
added a commit
to bsdcode/go
that referenced
this issue
Apr 19, 2025
The existing implementation lacks the Status function for retrieving VCS build information for Subversion. As a consequence, binaries aren't stamped with the Revision, CommitTime and Uncommitted information from SVN repositories. This change provides the svnStatus function and retrieves the information by running svn info and svn status commands. Fixes golang#73444
bsdcode
added a commit
to bsdcode/go
that referenced
this issue
Apr 19, 2025
The existing implementation lacks the Status function for retrieving VCS build information for Subversion. As a consequence, binaries aren't stamped with the Revision, CommitTime and Uncommitted information from SVN repositories. This change provides the svnStatus function and retrieves the information by running svn info and svn status commands. Fixes golang#73444
Change https://go.dev/cl/666875 mentions this issue: |
Thanks, I submitted the change. |
@samthanawalla not sure why you said in CL 630195 this needed to be a proposal? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
ToolProposal
Issues describing a requested change to a Go tool or command-line program.
Go version
go version go1.24.2 freebsd/amd64
Output of
go env
in your module/workspace:What did you do?
Consider an example SVN repository containing an example program reading out the VCS build information:
$ svn info Path: . Working Copy Root Path: /tmp/example URL: file:///tmp/svn Relative URL: ^/ Repository Root: file:///tmp/svn Repository UUID: 06cb4ac0-f01c-f011-8e60-309c239b96ba Revision: 5 Node Kind: directory Schedule: normal Last Changed Author: user Last Changed Rev: 5 Last Changed Date: 2025-04-19 12:22:27 +0200 (Sat, 19 Apr 2025) $ svn list go.mod main.go
Executing the resulting binary
example
should list the SVN related informations.What did you see happen?
No VCS build information is printed.
What did you expect to see?
Considering the above output of
svn info
and the specific outputs ofI expected to see an output similar to this:
$ ./example vcs: svn vcs.revision: 5 vcs.time: 2025-04-19T10:22:27.784965Z vcs.modified: false
Reading
src/cmd/go/internal/vcs/vcs.go
reveales thatvcsSvn
currently doesn't set aStatus
function to retrieve this information likevcsBzr
,vcsFossil
,vcsGit
andvcsHg
do.A prototype for such a function could be:
I tested this prototype with my example program and it produced the expected output above.
The text was updated successfully, but these errors were encountered: