[go-nuts] Arctic Warfare is now available (powered by Ebitengine)

2024-02-08 Thread Trevor Slocum
Arctic Warfare is now available to play. Battle tanks in the arctic, demolish trees and annihilate snowmen. Play: https://rocketnine.itch.io/arctic-warfare Code: https://code.rocket9labs.com/tslocum/arcticwarfare -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Re: templates not working for me

2024-02-08 Thread Ian Lance Taylor
On Wed, Feb 7, 2024 at 10:11 PM joseph.p...@gmail.com wrote: > > Variable substitution doesn't seem to work in an included template file. Is > that a known limitation? golang-nuts is for general discussion of Go, its tools, and its standard library. It's fine to ask about the Gin web framework

Re: [go-nuts] Re: Changing PWD ruins test caching

2024-02-08 Thread Kevin Burke
You're right. I ended up inserting a shim to replace os/env.go in the standard library, that would dump the stack trace of anything that called os.Getenv("PWD"). It turns out that a popular testing library was doing this - https://github.com/onsi/ginkgo/issues/1355. On Thu, Feb 8, 2024 at 3:19 PM

Re: [go-nuts] Re: 1.22.0 ServeMux HandleFunc infinite loop

2024-02-08 Thread 'Sean Liao' via golang-nuts
I've filed it as https://go.dev/issue/65624 - sean On Thu, Feb 8, 2024 at 6:58 PM Kyle Shannon wrote: > > On 2/8/24 11:30, Jason Phillips wrote: > > Can you create a small self-contained program that reproduces the issue? The > following program returns 404 locally, as I'd expect, but does get

[go-nuts] Re: Go 1.22.0: Alpine: go test with coverage works but returns exit status 1

2024-02-08 Thread Thomas McNulty
While trying to upgrade a go package to 1.22.0 today, I ran into this same issue in my coverage step. From testing different combinations of options for `go test`, it seems that the 'no such file or directory' errors and resulting non-zero exit code occur when go test processes a folder/package

[go-nuts] Re: Go 1.22.0: Alpine: go test with coverage works but returns exit status 1

2024-02-08 Thread Aldemar F
I have the same issue here. Running tests on a linux (ubuntu based). It only happens when a use the flag coverpkg. I have managed to "solve" it on an very bad way, creating an empty test file in packages that don't have tests (removed the files paths) ``` open

[go-nuts] User-visible regression in the x509.Certificate struct from go 1.21.6 to 1.22.0

2024-02-08 Thread Victor Lowther
It looks like adding the x509.OID type and associated fields to the x509.Certificate struct breaks the ability to gob-encode the certificate. The following test program succeeds on go 1.21.6 and fails on 1.22.0: package main import ( "log" "bytes" "encoding/gob"

Re: [go-nuts] Re: 1.22.0 ServeMux HandleFunc infinite loop

2024-02-08 Thread Patricia Decker
Thanks for that! Adding the additional HandleFunc for "/x/" does result in a 200: https://go.dev/play/p/5upNoAhAlPs On Thu, Feb 8, 2024 at 10:59 AM Kyle Shannon wrote: > On 2/8/24 11:30, Jason Phillips wrote: > > Can you create a small self-contained program that reproduces the issue? > The

[go-nuts] Re: Go 1.22.0: Alpine: go test with coverage works but returns exit status 1

2024-02-08 Thread Martin Schallnahs
P.S.: According to the release notes of golang 1.22.0 the "go test -cover" was worked on, so thats why insist to find out if its a bug (and also because it prevents me from upgrading a project to golang 1.22.0 right now). " go test -cover now prints coverage summaries for covered packages that

[go-nuts] Re: Go 1.22.0: Alpine: go test with coverage works but returns exit status 1

2024-02-08 Thread Martin Schallnahs
Hey Brian, dont get me wrong! My usual setup is Continuous Integration Pipeline running in Linux VMs which, in case of my golang projects, start fresh golang docker container images from DockerHub. In case of this problem I used golang:1.22.0-alpine3.19 and golang:1.22.0 (debian basd). For

Re: [go-nuts] Re: 1.22.0 ServeMux HandleFunc infinite loop

2024-02-08 Thread Kyle Shannon
On 2/8/24 11:30, Jason Phillips wrote: Can you create a small self-contained program that reproduces the issue? The following program returns 404 locally, as I'd expect, but does get killed in the Go playground: https://go.dev/play/p/FigBLK8KrAK Perhaps a simpler reproduction that's runnable

[go-nuts] Re: 1.22.0 ServeMux HandleFunc infinite loop

2024-02-08 Thread Jason Phillips
Can you create a small self-contained program that reproduces the issue? The following program returns 404 locally, as I'd expect, but does get killed in the Go playground: https://go.dev/play/p/FigBLK8KrAK Perhaps there's an issue with the Playground networking implementation that's

[go-nuts] Re: Go 1.22.0: Alpine: go test with coverage works but returns exit status 1

2024-02-08 Thread 'Brian Candler' via golang-nuts
$ go test -v ./... -coverprofile=coverage.out -coverpkg=./internal/... -covermode count || echo "flaky:$?" example.com/m: open /tmp/go-build2233205084/b002/covmeta.f6e4431d5ec1fd71f02b3ce4e56eb691a86525173d917007425576a7d9db7c72: no such file or directory C:\dev\git\golang-test-cover>go test

[go-nuts] Re: 1.22.0 ServeMux HandleFunc infinite loop

2024-02-08 Thread Patricia Decker
I haven't played around with it yet, but have you tried to separately register /something/ ? mux := http.NewServeMux() mux.HandleFunc("/something/", func...) mux.HandleFunc("/something/{id}/{$}", func...) On Wednesday, February 7, 2024 at 1:21:00 PM UTC-8 Péter Szarvas wrote: > Hello, > > I

[go-nuts] Re: How to determine system requirements for an application?

2024-02-08 Thread Joao Silva
Hi friend, did you manage to solve it, I was having the same problem as you. Em sexta-feira, 3 de julho de 2020 às 06:59:04 UTC-3, smartaq...@gmail.com escreveu: > Hello, > > If we make an application in golang then how to determine the system > requirements required for its flawless

[go-nuts] Re: Go 1.22.0: Alpine: go test with coverage works but returns exit status 1

2024-02-08 Thread Martin Schallnahs
Hi Brian, thanks for checking out, yes that I wanted also to write you. We need it currently in our CI as some dependency scanner tool does not work with the "go X.Y.Z." syntax, but I tried, and for my problem it did not was the cause. > If a test fails, I would expect it to terminate with an

[go-nuts] Re: Go 1.22.0: Alpine: go test with coverage works but returns exit status 1

2024-02-08 Thread 'Brian Candler' via golang-nuts
I found the solution to the "toolchain not available" problem: put "go 1.22.0" instead of "go 1.22" in go.mod. Clues picked up from #62278 . It's confusing for people who've been using go for a while though, when go.mod used to contain "go X.Y" and it

[go-nuts] Re: Go 1.22.0: Alpine: go test with coverage works but returns exit status 1

2024-02-08 Thread 'Brian Candler' via golang-nuts
Is it a bug or exepected behaviour? If a test fails, I would expect it to terminate with an error (exit code 1 in this case). If I run your reproducer locally (not in Docker) with the modified TestHelloer, it works fine(*) and gives me an exit code of 0: % go test -v ./...