[go-nuts] CGO Struct used as type parameter causes issue in Go 1.20

2023-02-15 Thread Jan
hi all, In a project that requires CGO I wrote a little generic wrapper over my C structs (mostly for debugging): ``` type Wrapper[T any] struct { P *T destructor func(p *T) } ``` And it was working fine. But with go 1.20 I started seeing errors of the type `cannot use incomplete (or unallocat

[go-nuts] Re: Reading .xls file with golang

2023-02-15 Thread Marcello H
or use another library ;-) https://github.com/plandem/xlsx https://github.com/qax-os/excelize -- 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 an email to golang-nuts+unsubscr

Re: [go-nuts] Why is runtime.Gosched needed in this single-threaded, no-goroutines cgo program?

2023-02-15 Thread Ian Lance Taylor
On Wed, Feb 15, 2023 at 2:36 PM Marko Bencun wrote: > > That is a good hint, thanks. However, in the Go code above, there are > no goroutines and everything runs in one thread as far as I can tell, > but the issue appears anyway. There are always goroutines, even if your program doesn't start the

Re: [go-nuts] Why is runtime.Gosched needed in this single-threaded, no-goroutines cgo program?

2023-02-15 Thread 'Marko Bencun' via golang-nuts
That is a good hint, thanks. However, in the Go code above, there are no goroutines and everything runs in one thread as far as I can tell, but the issue appears anyway. On Wed, 15 Feb 2023 at 22:05, Ian Lance Taylor wrote: > > On Wed, Feb 15, 2023 at 8:42 AM 'Marko Bencun' via golang-nuts > wro

Re: [go-nuts] Why is runtime.Gosched needed in this single-threaded, no-goroutines cgo program?

2023-02-15 Thread Ian Lance Taylor
On Wed, Feb 15, 2023 at 8:42 AM 'Marko Bencun' via golang-nuts wrote: > > I am running into a a weird error in C code that only materializes > when calling it from Go using cgo. I hope you could help me understand > this behaviour and why calling runtime.Gosched() seems to resolve the > issue. I w

[go-nuts] Re: [golang-dev] [security] Go 1.20.1 and Go 1.19.6 are released

2023-02-15 Thread 'Roland Shoemaker' via golang-nuts
Hey all, When writing the release note for the net/http and mime/multipart security fix (CVE-2022-41725), we mixed up two earlier reports about a similar issue and credited the incorrect reporter. The credit should go to Arpad Ryszka and Jakob Ackermann. We apologize for this mixup, and want to s

[go-nuts] Why is runtime.Gosched needed in this single-threaded, no-goroutines cgo program?

2023-02-15 Thread 'Marko Bencun' via golang-nuts
Dear Gophers I am running into a a weird error in C code that only materializes when calling it from Go using cgo. I hope you could help me understand this behaviour and why calling runtime.Gosched() seems to resolve the issue. I worry that this may not be the right fix, so I want to understand wh

[go-nuts] Re: Reading .xls file with golang

2023-02-15 Thread Amnon
File an issue at https://github.com/extrame/xls/issues and maybe submit a fix? On Wednesday, 15 February 2023 at 03:22:30 UTC Aadi Sharma wrote: > While reading .xls file with golang using *ReadAllCells *function from > xls package > https://github.com/extrame/xls/blob/v0.0.1/workbook.go#L268