[go-nuts] attempting to build cmdg on windows

2025-04-20 Thread John O'Regan
Hello All, I'm new to Golang and to the group so apologies in advance for any stupid questions. Please don't flame me! :) I'm attempting to build Thomas Habets' cmdg on my Windows 10 machine. This is as far as I get: - - - - >set "GOOS=windows" >set "GOARCH=386" >cd C:\Users\User\cmdg >go b

Re: [go-nuts] attempting to build cmdg on windows

2025-04-20 Thread Kurtis Rader
In general you only need to set env vars like GOOS and GOARCH if you are cross-compiling. That is, building a program for a different architecture. Don't set env vars unless you understand the purpose of the vars. The compilation errors are because the code relies on a package that is incompatible

Re: [go-nuts] Compiler Hiccup with Map Iteration

2025-04-20 Thread 'Sean Liao' via golang-nuts
see https://go.dev/issue/6703 and https://go.dev/ref/spec#Package_initialization initialization order is based on lexical references rather than a full analysis. - sean On Sun, Apr 20, 2025, 22:40 Wilgnert wrote: > Hey there! So, I was about to file a GitHub issue, but the prompt > suggested ch

[go-nuts] Re: go mod:Force dependency to use newer major version of a module?

2025-04-20 Thread twp...@gmail.com
Thank you David and Joe for you replies. To close this issue for now: the conclusion is that there is no current solution. Regards, Tom On Monday, April 14, 2025 at 3:37:15 PM UTC+2 twp...@gmail.com wrote: > Hello, > > My project uses github.com/google/go-github/v71 and one of its > dependen

[go-nuts] Re: Should os.WriteFile call Sync()?

2025-04-20 Thread twp...@gmail.com
See also: https://github.com/google/renameio On Friday, April 18, 2025 at 1:31:52 PM UTC+2 Brian Candler wrote: > On Thursday, 17 April 2025 at 00:10:08 UTC+1 Karel Bílek wrote: > > I was quite surprised recently that, at least on linux, file.Close() does > not guarantee file.Sync(); in some edg

Re: [go-nuts] Compiler Hiccup with Map Iteration

2025-04-20 Thread Mikk Margus
Oh, whoops, I did not realize the attachments contained examples... I suppose you could delay the commandRegistry assignment to be within `func init()` Attached is an example of this. On 4/20/25 23:55, Wilgnert wrote: Hey there! So, I was about to file a GitHub issue, but the prompt suggested

Re: [go-nuts] Compiler Hiccup with Map Iteration

2025-04-20 Thread Mikk Margus
What is the actual error the compiler is reporting? Are you perhaps trying to iterate over a pointer to a map or something like that? On 4/20/25 23:55, Wilgnert wrote: Hey there! So, I was about to file a GitHub issue, but the prompt suggested checking here first to avoid duplicates. I did a qu

[go-nuts] Compiler Hiccup with Map Iteration

2025-04-20 Thread Wilgnert
Hey there! So, I was about to file a GitHub issue, but the prompt suggested checking here first to avoid duplicates. I did a quick search for "InvalidInitCycle" and "Invalid Init Cycle" in the history and came up empty, so hopefully, this is a fresh report. I'm tinkering with building a littl

[go-nuts] Re: Assembler, ABI0 frame & stack growth

2025-04-20 Thread Wojciech Kaczmarek
piątek, 18 kwietnia 2025 o 23:52:29 UTC+2 Keith Randall napisał(a): Ah, I think I understand what you're getting at. You'll want to read this: https://github.com/golang/go/blob/b44b360dd40a537e953225d70ca96361e2c57600/src/runtime/stack.go#L21 TL;DR the thing the header is checking against isn't