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

chore: remove deprecated io/ioutil methods #1277

Merged
merged 15 commits into from
Nov 8, 2023

Conversation

notJoon
Copy link
Member

@notJoon notJoon commented Oct 21, 2023

Description

Replace depreacated io/ioutil to os methods

@notJoon notJoon requested review from jaekwon, moul and a team as code owners October 21, 2023 19:54
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Oct 21, 2023
@notJoon notJoon changed the title [Chore] Remove depreacated io/ioutil methods Chore: Remove depreacated io/ioutil methods Oct 21, 2023
@notJoon notJoon changed the title Chore: Remove depreacated io/ioutil methods chore: Remove depreacated io/ioutil methods Oct 21, 2023
@codecov
Copy link

codecov bot commented Oct 21, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (338be19) 47.87% compared to head (33daa49) 55.78%.
Report is 26 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1277      +/-   ##
==========================================
+ Coverage   47.87%   55.78%   +7.90%     
==========================================
  Files         372      421      +49     
  Lines       62990    66124    +3134     
==========================================
+ Hits        30158    36885    +6727     
+ Misses      30371    26360    -4011     
- Partials     2461     2879     +418     
Files Coverage Δ
gnovm/pkg/gnolang/nodes.go 52.94% <100.00%> (+17.64%) ⬆️
tm2/pkg/bft/config/toml.go 77.19% <100.00%> (ø)
tm2/pkg/bft/rpc/lib/server/handlers.go 50.09% <100.00%> (ø)
tm2/pkg/db/fsdb.go 66.47% <100.00%> (ø)
gnovm/pkg/gnolang/precompile.go 63.90% <0.00%> (+40.97%) ⬆️
gnovm/pkg/gnomod/gnomod.go 69.65% <50.00%> (ø)
tm2/pkg/amino/genproto/genproto.go 26.03% <0.00%> (+0.15%) ⬆️
gnovm/tests/imports.go 77.27% <0.00%> (-0.49%) ⬇️
tm2/pkg/bft/rpc/lib/client/http_client.go 14.23% <0.00%> (ø)

... and 121 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@thehowl thehowl left a comment

Choose a reason for hiding this comment

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

looks good 👍

there's more ioutil calls throughout the codebase. I think we should also remove the io/ioutil in Gno's stdlibs.

do you want to tackle this here or in a separate PR?

thanks!

@notJoon
Copy link
Member Author

notJoon commented Oct 24, 2023

do you want to tackle this here or in a separate PR?

Thanks! I think it would be better to tackle them in here.

@github-actions github-actions bot added the 📦 🌐 tendermint v2 Issues or PRs tm2 related label Oct 24, 2023
gnovm/stdlibs/io/multi_test.gno Outdated Show resolved Hide resolved
gnovm/stdlibs/io/example_test.gno Outdated Show resolved Hide resolved
gnovm/stdlibs/internal/itoa/itoa.gno Outdated Show resolved Hide resolved
gnovm/stdlibs/io/io_test.gno Outdated Show resolved Hide resolved
gnovm/stdlibs/io/io_test.gno Outdated Show resolved Hide resolved
gnovm/stdlibs/io/io.gno Outdated Show resolved Hide resolved
@thehowl
Copy link
Member

thehowl commented Oct 26, 2023

good job on the PR!

I saw that you removed basically all calls to ioutil like I suggested. I suggest you continue on this, and remove ioutil also from gno files (they all just use ioutil.ReadAll) and from gnovm/tests/imports.go.

thanks!

@notJoon
Copy link
Member Author

notJoon commented Oct 30, 2023

@thehowl Thanks for your suggest! I think now I'm done with the ioutil stuff now. I skipped the documents because it appears to be updated in #1311.

However, I'm still getting tests failing on the action, but when I run it locally, it works fine. I'm not sure what to do about that.

@thehowl thehowl changed the title chore: Remove depreacated io/ioutil methods chore: remove deprecated io/ioutil methods Nov 7, 2023
@thehowl
Copy link
Member

thehowl commented Nov 7, 2023

this looks good, I asked for another review just to be sure but we should be good to go.

@moul moul merged commit 55e88be into gnolang:master Nov 8, 2023
192 checks passed
@notJoon notJoon deleted the remove-depreacate branch November 8, 2023 09:01
moul added a commit to moul/gno that referenced this pull request Nov 14, 2023
## Description

Replace depreacated `io/ioutil` to `os` methods

---------

Co-authored-by: Manfred Touron <[email protected]>
Co-authored-by: Morgan Bazalgette <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: Done
Status: 🔵 Not Needed for Launch
Status: Done
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants