memsize icon indicating copy to clipboard operation
memsize copied to clipboard

Add compatibility with Go 1.23

Open yorickdowne opened this issue 1 year ago • 8 comments

Projects that include memsize tend to fail with link: github.com/fjl/memsize: invalid reference to runtime.stopTheWorld

Compilation with Go 1.22 works

yorickdowne avatar Aug 14 '24 12:08 yorickdowne

I tried... https://github.com/golang/go/issues/68167

fjl avatar Aug 14 '24 17:08 fjl

Projects which are forks of go-ethereum can apply this patch to remove memsize: https://github.com/ethereum/go-ethereum/commit/e4675771eda550e7eeb63a8884816982c1980644

fjl avatar Aug 14 '24 17:08 fjl

Thank you!

yorickdowne avatar Aug 14 '24 18:08 yorickdowne

I will leave this open for now. Perhaps a solution can be found.

fjl avatar Aug 14 '24 18:08 fjl

I'm considering to publish a new version that just panics on Go 1.23. That would be for downstream consumers who depend on memsize via another project, but are affected by the issue.

fjl avatar Aug 14 '24 19:08 fjl

I'm considering to publish a new version that just panics on Go 1.23. That would be for downstream consumers who depend on memsize via another project, but are affected by the issue.

Would appreciate it. I had to build something that uses your library as a transient dependency for a demo, and I did the naive thing of installing the latest version of the Go compiler. A message telling me that you're only compatible with < 1.23 (and perhaps linking this issue) would have saved me some panicked searching.

ARitz-Cracker avatar Aug 23 '24 21:08 ARitz-Cracker

I don't really know where to put the message though. In the repo description?

fjl avatar Aug 26 '24 08:08 fjl

I don't really know where to put the message though. In the repo description?

What you've got in #6 seems fine, just add "for more information, see github.com/fjl/ memsize/ issues/ 5" (spaces where added due to GitHub's auto formatting)

ARitz-Cracker avatar Aug 26 '24 13:08 ARitz-Cracker

@fjl, are there any plans on merging #6 or other solutions to this?

cloudlena avatar May 24 '25 12:05 cloudlena