Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go version upgrade checklist #3242

Open
14 of 29 tasks
Jacalz opened this issue Sep 4, 2022 · 3 comments
Open
14 of 29 tasks

Go version upgrade checklist #3242

Jacalz opened this issue Sep 4, 2022 · 3 comments
Labels
enhancement New feature or request future Features that might take a while to be sheduled meta Organized lists

Comments

@Jacalz
Copy link
Member

Jacalz commented Sep 4, 2022

Description

Before anyone wonders, I just want to clarify that this ticket is not about saying that we should upgrade the minimum Go versions. Our minimum version supported is still following what is in the latest version of Debian and this issue is not trying change that in any way.

The reason for open it is purely to write down what we can and should improve on when we one day upgrade the minimum Go version. This makes sure that we don't miss anything important. If you notice anything that I have missed, especfially when it comes to using better APIs where available, please update the issue or comment accordingly.

Go 1.15 (removes 10.11 El Capitan support)

  • Remove work114.go and remove the build tag for go115 from work.go.
  • Remove any code for 32-bit darwin operating systems (means dropping iPhone 5 support). See iOS: Opening file dialog crashes on 10.3 #2369 and potentially others.
  • Remove any potential code specific to macOS versions before 10.12 Sierra (Sierra is now the minimum).
  • Check usages of timer.Ticker to see if we can make use of the .Reset() method.

Go 1.16

  • Remove the vendor folder now that module support is on by default.
  • Remove documentation related to versions without the new module commands (using install over get).
  • Stop using deprecated io/ioutil functions and use the new ones in io and os instead.
  • Replace filepath.Walk usages with faster filepath.WalkDir.
  • Add adapter for io/fs. Tracked in Adapter from Repository to fs.FS #2680.

Go 1.17 (removes 10.12 Sierra support)

  • Tidy the module with support for pruned module graphs: go mod tidy -go=1.17.
  • Remove any potential code specific to macOS versions before 10.13 High Sierra (High Sierra is now the minimum). See 'Fix' the Sierra build error by adding -tags legacy #2594
  • Use the new math.MaxInt contant in table:
    const noCellMatch = math.MaxInt32 // TODO make this MaxInt once we move to newer Go version

Go 1.18 (removes iOS 11 support, but no model is stuck on iOS 11, see iosref )

  • Look at some of the interface{} and template generated code to see if generics make sense.
  • Look at usages of Index, IndexByte, IndexRune, and SplitN and replace with Cut where it makes sense. Similarly applies to bytes as well.

Go 1.19 (removes FreeBSD 11 support)

  • Switch to new atomic types in places where it makes sense.
  • Look at potentially using new functions Append, Appendf, and Appendln that append formatted data to byte slices.
  • Stop using the execabs package now that it is fixed in the os/exec package.
  • Switch to the unix build tags.
  • Run go fix ./... to clean up old code.
  • Replace interface{} with any.

Go 1.20

Go 1.21 (removes support for Windows < 10 and macOS 10.14 Mojave)

  • Switch to new min and max builtins. Deprecate existing Min and Max APIs.
  • Use slices and maps package to clean up some custom code.
  • Make sure to switch to the new faster sort functions in slices.
  • Use the new clear() builtin for emptying out slices and maps (look at for-loops with delete() in the case of maps).

Go 1.22

  • Remove workarounds for capturing loop variables.
  • Look at using the new AppendDecode and AppendEncode methods in encoding packages.
  • Use the new go/version package for version handling?
  • Use the new slices.Concat function?
    TODO: Complete this section

Go 2.23 (removes support for macOS 10.15 Catalina)

Not even close to release yet...

@Jacalz Jacalz added enhancement New feature or request future Features that might take a while to be sheduled meta Organized lists labels Sep 4, 2022
@Jacalz

This comment was marked as resolved.

@andydotxyz
Copy link
Member

Thanks for this. Maybe it would be good to mark any that might be breaking so it can be factored into release plans?

@Jacalz
Copy link
Member Author

Jacalz commented Sep 9, 2022

Good idea. I have updated the information with removed OS support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future Features that might take a while to be sheduled meta Organized lists
Projects
None yet
Development

No branches or pull requests

2 participants