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

Migrate from the deprecated io/ioutil package #942

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

reugn
Copy link
Contributor

@reugn reugn commented Jan 14, 2023

Motivation

The io/ioutil package has been deprecated in go1.16, see the release notes. This PR replaces the existing io/ioutil calls with their new definitions in the io and os packages.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes / no)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)

Documentation

  • Does this pull request introduce a new feature? (yes / no)

Copy link
Member

@nodece nodece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, we should always use the supported version from the golang team.

Copy link
Contributor

@pgier pgier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although I wonder if we should cut one more release before breaking compatibility with golang 1.15

@nodece
Copy link
Member

nodece commented Feb 6, 2023

We can use a build flag to be compatible with the different versions.

@pgier
Copy link
Contributor

pgier commented Feb 7, 2023

@nodece That's certainly possible, but in my opinion not worth the extra maintenance effort. It would mean that any bug fixes and new features would also need to be tested against the older versions. At some point we should just tell users to upgrade their Go version, especially since golang itself only maintains the two most recent versions.

My suggestion is to just cut one more release and update the docs to indicate that is the last version which works on go 1.15.

@nodece nodece merged commit fa4662c into apache:master Feb 7, 2023
@RobertIndie RobertIndie added this to the v0.10.0 milestone Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants