Skip to content
New issue

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

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

Already on GitHub? # to your account

Replace deprecated ioutil pkg with os & io #31357

Closed
wants to merge 1 commit into from

Conversation

abhinavnair
Copy link

As of Go 1.16, the same functionality is now provided by package io or
package os, and those implementations should be preferred in new code.

So replacing all usage of ioutil pkg with io & os.

@abhinavnair abhinavnair requested review from a team as code owners July 1, 2022 14:58
@abhinavnair abhinavnair marked this pull request as draft July 1, 2022 15:11
As of Go 1.16, the same functionality is now provided by package io or
package os, and those implementations should be preferred in new code.

So replacing all usage of ioutil pkg with io & os.
@apparentlymart
Copy link
Contributor

Hi @abhinavnair! Thanks for working on this.

For this kind of situation where the recommendations have changed upstream since we originally wrote some code, we prefer to handle the updates gradually whenever we'd be making other changes to each subsystem, rather than making broad, cross-cutting changes like this. A major reason for that is that we often need to backport changes between different feature branches, and that gets more difficult if there are lots of small non-functionality-related differences like these between the content of the different branches.

Because of that, I don't expect that we would merge a change like this focused only on replacing calls to some functions with calls to equivalent functions. Although as you said the old functions are not recommended for new code, we do intend to keep using them in existing code until we are making other changes to these codepaths that have sufficient benefit to justify the cost of it being harder to backport bug fixes into earlier release branches.

While I do appreciate your efforts working on this, I see that you're facing some test failures and I wanted to let you know our position on this before you spend time trying to resolve those, since I don't expect we would be able to merge this even if you do get the tests to pass.

Thanks again!

@abhinavnair
Copy link
Author

Hi @apparentlymart . Thanks for informing me. I understand the reason for the choice and fully support it. I shall close this PR for now. Hope to contribute in a more meaningful way in the future 🙂

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2022
@abhinavnair abhinavnair deleted the replace-ioutil branch August 5, 2022 08:11
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants