I maintain a number of Go packages for Fedora, including Hugo. I find that the default use of -x and -v when running "go build" makes it difficult to diagnose compile problems. A compile error does not necessarily terminate the Go build process, and with -x and -v the error message is quickly lost in the volume of output from go build.
I have figured out how to run "go build" in mock without the -x and -v flags, but I sometimes have to diagnose the build log from the Fedora build server, and this is very difficult due to the volume of output.
For an example of this, see:
https://kojipkgs.fedoraproject.org//work/tasks/3319/88593319/build.log
I would rather not redefine the default "go build" flags for my packages. Has there been any thought put into dropping -x and -v? Does anyone else have trouble with this? Does anyone benefit from the use of -x and -v? Am I missing an obvious trick?
On Wednesday, June 22, 2022 9:59:37 AM CDT W. Michael Petullo wrote:
I would rather not redefine the default "go build" flags for my packages. Has there been any thought put into dropping -x and -v? Does anyone else have trouble with this? Does anyone benefit from the use of -x and -v? Am I missing an obvious trick?
At least on a per package basis, you can add `%global gobuildflags "%(echo %{gobuildflags} | sed 's|-v -x||')`. I'm not sure if that's really allowed, though. I'll defer to the other go-sig members about the history/rationale for including these flags in the first place and whether we should remove one or both of them.
to find the error during the build phase, search "# " + first letter of your import path
On Wed, Jun 22, 2022 at 4:59 PM W. Michael Petullo mike@flyn.org wrote:
I maintain a number of Go packages for Fedora, including Hugo. I find that the default use of -x and -v when running "go build" makes it difficult to diagnose compile problems. A compile error does not necessarily terminate the Go build process, and with -x and -v the error message is quickly lost in the volume of output from go build.
I have figured out how to run "go build" in mock without the -x and -v flags, but I sometimes have to diagnose the build log from the Fedora build server, and this is very difficult due to the volume of output.
For an example of this, see:
https://kojipkgs.fedoraproject.org//work/tasks/3319/88593319/build.logI would rather not redefine the default "go build" flags for my packages. Has there been any thought put into dropping -x and -v? Does anyone else have trouble with this? Does anyone benefit from the use of -x and -v? Am I missing an obvious trick?
-- Mike
:wq _______________________________________________ golang mailing list -- golang@lists.fedoraproject.org To unsubscribe send an email to golang-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/golang@lists.fedoraproject.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
golang@lists.fedoraproject.org