UnownHash / Golbat

The Unlicense
36 stars 19 forks source link

Bump go requiremment to 1.22 #220

Closed comstud closed 2 months ago

comstud commented 6 months ago

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.

comstud commented 6 months ago

Not tested yet.

jfberry commented 6 months ago

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…

comstud commented 6 months ago

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.

Fabio1988 commented 6 months ago

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

jfberry commented 6 months ago

I think we will wait for golbat for a bit, fletchling will require 1.22 and we will build dragonite with 1.22

Fabio1988 commented 2 months ago

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

jfberry commented 2 months ago

Agree, should merge - can announce this at the same time as nests being formally removed (which was indicated to be on 1st June)

Fabio1988 commented 2 months ago

Sounds great 😃