Re: [go-nuts] go tool dist: FAILED: not a Git repo; must put a VERSION file in $GOROOT

2023-11-08 Thread twp...@gmail.com
Reported to Fedora at https://bugzilla.redhat.com/show_bug.cgi?id=2248782 On Thursday, November 9, 2023 at 1:00:55 AM UTC+1 twp...@gmail.com wrote: > For info, this is broken in Fedora 39, released a day or two ago: > > $ docker pull fedora:latest > $ docker run -it fedora:latest /bin/bash >

Re: [go-nuts] go tool dist: FAILED: not a Git repo; must put a VERSION file in $GOROOT

2023-11-08 Thread twp...@gmail.com
For info, this is broken in Fedora 39, released a day or two ago: $ docker pull fedora:latest $ docker run -it fedora:latest /bin/bash [root@01330dfaac82 /]# dnf update && dnf install -y golang ... [root@01330dfaac82 /]# go version go version go1.21.3 linux/amd64 [root@01330dfaac82 /]# go tool

[go-nuts] Re: Why golang's garbage collector didn't free obj when an finalizer is associate with it?

2023-11-08 Thread Jan
That makes sense that if you have only one finalizer in the cycle, the ordering could be respected, thanks for pointing it out! Now I still don't understand your explanation. The fact that the cycles can be arbitrarily deep is the same for normal GC, and it works without an issue. But I don't

Re: [go-nuts] ldflags -X

2023-11-08 Thread Stephen Illingworth
Yes. I agree that it's correct given the general rules. On Wednesday, 8 November 2023 at 15:42:25 UTC Jan Mercl wrote: > On Wed, Nov 8, 2023 at 4:01 PM Stephen Illingworth > wrote: > > > I would have expected the "main.A" string to require the same form. But > either way, that's the correct

Re: [go-nuts] ldflags -X

2023-11-08 Thread Jan Mercl
On Wed, Nov 8, 2023 at 4:01 PM Stephen Illingworth wrote: > I would have expected the "main.A" string to require the same form. But > either way, that's the correct solution. It is the correct form. Package main cannot be imported and has a special import path. Though I don't know where it is

Re: [go-nuts] ldflags -X

2023-11-08 Thread Stephen Illingworth
I would have expected the "main.A" string to require the same form. But either way, that's the correct solution. Thanks. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send

Re: [go-nuts] ldflags -X

2023-11-08 Thread Jan Mercl
On Wed, Nov 8, 2023 at 1:35 PM Stephen Illingworth < stephen.illingwo...@gmail.com> wrote: > > Hello, > > I'm trying to use the -X ldflag to set a string at compile time. I can do this successfully if the string is in the main package but it does not work if the string is in a subpackage. > > For

[go-nuts] ldflags -X

2023-11-08 Thread Stephen Illingworth
Hello, I'm trying to use the -X ldflag to set a string at compile time. I can do this successfully if the string is in the main package but it does not work if the string is in a subpackage. For illustration purposes, I have prepared a simple test project

[go-nuts] Re: Interface in factory pattern and binary size increasing

2023-11-08 Thread Peter Galbavy
Check the size of dependencies; >From >https://stackoverflow.com/questions/70764915/how-to-check-the-size-of-packages-linked-into-my-go-code > the very last answer suggests: go tool nm -size -sort size EXECUTABLE Which has helped me locate unexpected lumps of imports. You can also build with