Closed comstud closed 2 months ago
Not tested yet.
I don’t think go opts into the language changes without the go mod file version requirement being enforced which then means users have to upgrade too…
That's the idea here. This forces users to upgrade so we can continue to develop without worrying about this going forward (if we find the need we need to copy the for loop variable -- we won't need to remember anymore). Also gain some memory performance, MAYBE. But if you're not ready to force users, that's fine. This PR can sit for a bit if you want. I've not even tested it yet.
I am fine with enforcing latest golang, as we know it's very easy to update. Although I thought there would be more changes required
I think we will wait for golbat for a bit, fletchling will require 1.22 and we will build dragonite with 1.22
hmm now as all tools use go 1.22 maybe it's time to update this as well? :) with proper announcement it should be safe, as go can be updated on the fly
Agree, should merge - can announce this at the same time as nests being formally removed (which was indicated to be on 1st June)
Sounds great 😃
This bumps golang requirement to 1.22.
1.22.1 is out now and while it doesn't appear that we have any workaround for 'for loop variable scope' in Golbat (unless my search failed me)...it would be nice to not have to worry about it going forward.
There's also a new sql.Null generic. And also 'for i := range' to range from 0 to -1.
Supposedly memory performance is improved, also.