News for hackers. Stuff that matters.
Re:Go 1.21 will (probably) download newer toolchains on dema... by jrockway on Saturday June 24, 2023 @02:27AM (#36456131)
Good idea! Go has always impressed me on how every single new release works perfectly with zero effort on my part. There is no reason I can think of that someone would want to be on an older version of Go.

I understand the objections here. I upgrade software a lot. Upgrade Emacs, your .emacs fails to load. Upgrade Linux, your system fails to boot. That's because they make backwards incompatible changes and release if the unit tests pass. I don't know what Go is doing, but this simply never happens. Every 6 months, you get a performance improvement and new features for free. For free! It's truly amazing. (While I'm here, I'll also point out that PostgreSQL is similar here. Have you ever upgraded and had your app broke? Absolutely not. Every version is a free performance and feature win.)

At the risk of being downvoted, I have to say that if you don't believe this, you've been Stockholm Syndrome'd into your programming language of choice. I work primarily in Go, but occasionally have to do frontend stuff. The pattern that I run into is that if I use the version of Node in Debian, the code doesn't compile. If I go to nodejs.org and download the latest version, it doesn't compile. Only if I install 20000 lines of bash that inspect some files and switches 300 environment variables to put the right version of node.js in my path can I even begin to ... run a script that concatenates 300,000 lines of code and translate it to a version of Javascript that Chrome and Firefox both have? Guys, it's crazy. I love a good user interface, but if I was trapped on a desert island with node.js I would instantly kill myself. No questions asked. Go isn't like that. If your users can handle a CLI, you are one "tar xzvf" way from sanity. It's great.

I digressed, but this is a great choice. The Go team always seems to know how to improve the lives of end users. I appreciate that.

Re:Go 1.21 will (probably) download newer toolchains on dema... by srcreigh on Saturday June 24, 2023 @02:31AM (#36456150)
One workplace I had used GCP. There was a Postgres upgrade and one of our services had a major performance degradation, some people worked for days to mitigate the problem.

Sadly I don’t have the version number or any details as I wasn’t working on the issue. It was sometime in mid 2022.

Re:Go 1.21 will (probably) download newer toolchains on dema... by cdogl on Saturday June 24, 2023 @05:43AM (#36457146)
I may be missing something but don’t see how this is pertinent to Go.
Re:Go 1.21 will (probably) download newer toolchains on dema... by blcArmadillo on Saturday June 24, 2023 @07:44AM (#36457841)
jrockway mentions postgres in their comment:

> (While I'm here, I'll also point out that PostgreSQL is similar here. Have you ever upgraded and had your app broke? Absolutely not. Every version is a free performance and feature win.)

Re:Go 1.21 will (probably) download newer toolchains on dema... by Arbortheus on Saturday June 24, 2023 @08:36AM (#36458187)
I know Google does a fair bit of stuff to package Postgres into their CloudSQL offering as a service. It could have possibly been their mistake.
Re:Go 1.21 will (probably) download newer toolchains on dema... by mappu on Saturday June 24, 2023 @03:38AM (#36456470)
> There is no reason I can think of that someone would want to be on an older version of Go.

New Go toolchains regularly drop support for running the generated binaries on older versions of Windows and macOS. I definitely want to remain in control of this.

Re:Go 1.21 will (probably) download newer toolchains on dema... by dewey on Saturday June 24, 2023 @05:47AM (#36457170)
Which you still can as it’s just a default setting.
Re:Go 1.21 will (probably) download newer toolchains on dema... by JdeBP on Saturday June 24, 2023 @04:00AM (#36456589)
On the contrary, that you do believe this means that you don't have long enough experience in golang. The points where suddenly a seemingly innocent version upgrade becomes a massive real-world problem usually happen years or decades into a tool/language/whatever. golang hasn't existed nearly long enough yet.

"simply never happens" is incorrect. "hasn't happened to me yet" is correct.

Or, put another way: Come back to us when you are on version 3.x, years or decades from now, and then a statement that this never happened to you will actually be significant. (-:

Re:Go 1.21 will (probably) download newer toolchains on dema... by jjallen on Saturday June 24, 2023 @04:44AM (#36456789)
You’re predicting the future which is inherently uncertain. He was talking about the past.
Re:Go 1.21 will (probably) download newer toolchains on dema... by coldtea on Saturday June 24, 2023 @07:02AM (#36457529)
Past results are not the whole story, when you see a new signal like a project "changing toolchains on its own" is a new signal that does point to a huge potential future problem.

It's like someone saying "Mike? He never hurt nobody! He's a total sweatheart!" when in the past weeks we've seen Mike starting stockpiling guns and getting a "KILL EM ALL!" tattoo on his forehead.

OK, perhaps not as dramatic, but changing toolchains behind the users' back, is a red flag for future trouble, even if past behavior was good.

Re:Go 1.21 will (probably) download newer toolchains on dema... by ericpauley on Saturday June 24, 2023 @04:48AM (#36456819)
^Stockholm Syndrome :)

Go is over a decade old. I’ve been using it for 8 or 9 years now and entirely concur with GP. As an example, I have routinely deployed to prod for lower stakes stuff using CI Go versions that didn’t match development. Aside from needing new features this has never caused an issue. I’ve had more issues arise from OS updates than Go toolchain updates.

Re:Go 1.21 will (probably) download newer toolchains on dema... by TheDong on Saturday June 24, 2023 @07:21AM (#36457677)
I've had quite a few issues with go version updates.

I've written up a couple over here: https://news.ycombinator.com/item?id=29763324

There's more than that. What I really want is to be able to update the compiler without also updating the standard library since the compiler has been fairly solid, while the http, tls, and archive stdlib packages have been a constant source of breaking changes and bugs with each update.

I'd rather be able to update my compiler without also having to cross my fingers that they didn't decide to yet again delete support for some part of TLS I'm using that those on high at google have deemed is "insecure", even if it's in a test or over a local network.

Re:Go 1.21 will (probably) download newer toolchains on dema... by agwa on Saturday June 24, 2023 @10:04AM (#36458776)
Beginning Go 1.21, the version in go.mod will control behavior in the standard library, so that you can upgrade the compiler/stdlib and not have your programs break: https://tip.golang.org/doc/godebug
Re:Go 1.21 will (probably) download newer toolchains on dema... by Arbortheus on Saturday June 24, 2023 @08:34AM (#36458167)
Go devs have said there will _never_ be a Go 2 “major” release. They saw the mistakes made by python from 2 to 3 and decided to not do that.

It will be backwards compatible 1.x releases forever.

https://thenewstack.io/how-golang-evolves-without-breaking-p...

Re:Go 1.21 will (probably) download newer toolchains on dema... by pjmlp on Sunday June 25, 2023 @04:53AM (#36466198)
C++, Java and .NET decided otherwise, and I am glad they did, in spite of the adoption pain in some projects.

There is no way to improve language if one keeps being dragged by all of the mistakes from the past.

Incidently Go might be getting its first breaking change with introduction of new builtins and semantics change on loop variables.

Re:Go 1.21 will (probably) download newer toolchains on dema... by cratermoon on Saturday June 24, 2023 @04:44PM (#36462497)
> Come back to us when you are on version 3.x, years

Someone who has long enough experience in Go would know that the Go compatibility promise[1] only applies to Go 1. Go 2 and later are already allowed to break compatibility. I have code I wrote on something like 1.13, if not earlier and it still works fine with 1.20. Sure, there are rare exceptions, but each release documents them.

My question to you, then, is: what exactly did you see in your years of Go experience that broke on a version upgrade?

1 https://go.dev/doc/go1compat#introduction

Re:Go 1.21 will (probably) download newer toolchains on dema... by pjmlp on Sunday June 25, 2023 @05:00AM (#36466223)
Well, the introduction of new built-ins can bring some surprises into existing code that relies on the same names.
Re:Go 1.21 will (probably) download newer toolchains on dema... by james2doyle on Saturday June 24, 2023 @04:11AM (#36456620)
The comment about Node on a desert island made me actually LOL. Thanks for that!

I recently had to update 2 Node (Next.js, static sites) projects from v16 to v18 and it was brutal. Granted it was a big jump but still took over a week to get done. So many dependencies just broke and had to be updated or patched.

Coming from the PHP world, where there is also real effort put into maintaining backwards compatibility, it is really painful. I had sites on version 5.6 that went to version 8 just fine...

Re:Go 1.21 will (probably) download newer toolchains on dema... by heartbreak on Saturday June 24, 2023 @08:57AM (#36458327)
> Granted it was a big jump

Node v16: 20 Apr 2021

Node v18: 19 Apr 2022

Are they shipping a major release every six months?! No wonder it’s such a mess.

Re:Go 1.21 will (probably) download newer toolchains on dema... by james2doyle on Saturday June 24, 2023 @12:08PM (#36459870)
I'm not sure but one of the challenges we had was the changes to NPM package resolution. We had to use the "legacy peer deps" flag to get certain things to work without upgrading tons of packages.

These were both LTS releases so you would hope that is would be easy to upgrade or at least be able to have a reasonable upgrade path

Re:Go 1.21 will (probably) download newer toolchains on dema... by cratermoon on Saturday June 24, 2023 @04:53PM (#36462560)
Not quite. Odd releases EOL with the next release. Even releases are on LTS. https://nodesource.com/blog/understanding-how-node-js-releas...
Re:Go 1.21 will (probably) download newer toolchains on dema... by yjftsjthsd-h on Saturday June 24, 2023 @05:11AM (#36456969)
Some of it is differences in usecase. If it happens on a dev's laptop, that's... okay, it still rubs me the wrong way, but I get it. If it happens that now every CI job reinstalls the compiler, I'm going to be annoyed.
Re:Go 1.21 will (probably) download newer toolchains on dema... by avgcorrection on Saturday June 24, 2023 @05:31AM (#36457085)
> That's because they make backwards incompatible changes and release if the unit tests pass.

> At the risk of being downvoted, I have to say that if you don't believe this, you've been Stockholm Syndrome'd into your programming language of choice.

> but if I was trapped on a desert island with node.js I would instantly kill myself.

Too many bold claims to engage with.

It’s tempting to shoot fish in a barrel but you have to try a little harder. ;)

Re:Go 1.21 will (probably) download newer toolchains on dema... by outime on Saturday June 24, 2023 @06:37AM (#36457410)
This was a really elegant way to decline having a pointless discussion, I like it.
Re:Go 1.21 will (probably) download newer toolchains on dema... by sapiogram on Saturday June 24, 2023 @08:08AM (#36457985)
Idk, I wish they would have actually engaged. No one learns anything new from this reply.
Re:Go 1.21 will (probably) download newer toolchains on dema... by 0xParlay on Saturday June 24, 2023 @11:13AM (#36459372)
> I work primarily in Go, but occasionally have to do frontend stuff

Let's get Socratic. How do you address people on the left side of mount-idiot that is the dunning kruger effect?

> I would instantly kill myself.

Strong opinions for "occasionally have to do frontend stuff".

> At the risk of being downvoted

DAE hate package managers and javascript? Updootz plz!

Re:Go 1.21 will (probably) download newer toolchains on dema... by heyoni on Saturday June 24, 2023 @12:18PM (#36459970)
The Reddit playbook is emerging in hacker news which means there was at least “some small exodus”!
Re:Go 1.21 will (probably) download newer toolchains on dema... by iudqnolq on Saturday June 24, 2023 @11:28AM (#36459502)
In general people often understand better and prefer the tool they use often to the tool they occasionally have to use but never thought it worthwhile to study in depth.
Re:Go 1.21 will (probably) download newer toolchains on dema... by snovv_crash on Saturday June 24, 2023 @08:13AM (#36458028)
More elegant would have been to not reply at all.
Re:Go 1.21 will (probably) download newer toolchains on dema... by avgcorrection on Wednesday June 28, 2023 @06:06PM (#36513293)
We’re both inelegant.
Re:Go 1.21 will (probably) download newer toolchains on dema... by Strom on Saturday June 24, 2023 @08:43AM (#36458229)
> There is no reason I can think of that someone would want to be on an older version of Go.

Go 1.20 is is the last release that will run on any release of Windows 7, 8, Server 2008 and Server 2012, macOS 10.13 High Sierra or 10.14 Mojave.

In addition to these OSes there are also platforms like Google App Engine. Google is notoriously slow at updating the Go runtime. Until January 17, 2023 the latest Go runtime generally available on Google App Engine was Go 1.16, while in the broader ecosystem Go 1.20 was already scheduled to release two weeks later. That's two whole years behind. It sucks, but it is the reality of how Google operates things. They still haven't added support beyond Go 1.15 to the local development server.

Re:Go 1.21 will (probably) download newer toolchains on dema... by c7DJTLrn on Saturday June 24, 2023 @08:56AM (#36458323)
I'm all in on Go and enjoy how the toolchain simplifies things so you can just think about writing code. But I am not a fan of this. I don't want my compiler to execute remote code uninstructed.
Re:Go 1.21 will (probably) download newer toolchains on dema... by pxue on Saturday June 24, 2023 @09:43AM (#36458631)
I run my startup on Go and react. The ease of upgrade process can't be further apart.

We have our entire package.json locked down to the exact patch version because we've had issues where random patch upgrade kills the app, we run our own npm server because we can't trust dependency attacks in the js ecosystem. Just absolute pain.

Ten years of Go, I can count on one hand the times a dependency upgrade broke the build.

Re:Go 1.21 will (probably) download newer toolchains on dema... by 0xParlay on Saturday June 24, 2023 @11:23AM (#36459462)
> we run our own npm server because we can't trust dependency attacks in the js ecosystem

What does this mean? Your deps get locked down with sha1(?) checksum automatically after you install your packages (unless you go out of your way to delete the lock file). Must be a valuable startup you have for someone to attack your build with a hash collision..

Re:Go 1.21 will (probably) download newer toolchains on dema... by pxue on Sunday June 25, 2023 @08:54PM (#36474349)
No it's to mitigate "leftpad" style attack vector.
Re:Go 1.21 will (probably) download newer toolchains on dema... by 0xParlay on Monday June 26, 2023 @09:23AM (#36479378)
Then don't delete your lock-file and the vector doesn't exist?

Rolling your own package management solution because understanding the existing tools is too hard.. That is peak "javascript sucks and I'm going to comment about it" energy lol.

Re:Go 1.21 will (probably) download newer toolchains on dema... by pxue on Wednesday June 28, 2023 @01:49AM (#36502769)
I'm not fully clear what you mean by don't delete lock file when the problem is the open source developer decides to unpublish their npm package
Re:Go 1.21 will (probably) download newer toolchains on dema... by sapiogram on Saturday June 24, 2023 @02:10PM (#36461139)
I think this is more of frontend vs backend thing. I have a similar experience to you with our ~5kloc React frontend, while dependency upgrades for our 50kloc backend have been mostly painless.
Re:Go 1.21 will (probably) download newer toolchains on dema... by Patrickmi on Saturday June 24, 2023 @09:46AM (#36458666)
And this comes at a cost, having tweaking with Go internals and the compiler I wouldn’t say it’s a mess but it’s a real confusion a lot of things (maybe some) have broken some of the go way, if the go team hadn’t decided to the runtime as a package, 8 years would have taken Go to break changes
Re:Go 1.21 will (probably) download newer toolchains on dema... by mechanicker on Saturday June 24, 2023 @09:48AM (#36458682)
We have a service that uses Go http proxy for implementing a reverse proxy.

Upgrading to Go 1.16 introduced an unexplained performance drop. We suspect it is due to how it flushes when the content length is not known (typical for streaming). In earlier versions of Go, the call to flush was less frequent and in other versions, flush was called on every write. As a team, we sunk a lot of time trying to debug this and finally changed some of the application architecture/logic to circumvent these overheads.

Re:Go 1.21 will (probably) download newer toolchains on dema... by paholg on Saturday June 24, 2023 @02:38PM (#36461465)
I don't have extensive experience with Go, but for the bit that I was maintaining a production Go service, I had a Go version update break things at least once.