Skip to content

Go 1.23 upgrade#3847

Merged
roman-khimov merged 9 commits intomasterfrom
go-1.23
Mar 25, 2025
Merged

Go 1.23 upgrade#3847
roman-khimov merged 9 commits intomasterfrom
go-1.23

Conversation

@AnnaShaleva
Copy link
Member

@AnnaShaleva AnnaShaleva commented Mar 21, 2025

Close #3553.

https://tip.golang.org/wiki/RangefuncExperiment can be tried in some of the storage code

Regarding this: I tried and I'm not sure how can we apply these changes to our storage. We have a pattern like https://go.dev/blog/range-functions in our memcached storage, but it interacts with DB-level Seek functions, so to me it looks like we can't really use range there. We also have a similar pattern in our interop-level storage package (storage iterator), but I don't see how can we improve it given the existing iterator API that is exposed from this package. May be I'm just don't understand something, so I need some help here.

unique can be considered for things like big.NewInt(0)

For things like this we already declare global big.NewInt(0) variable at the package level in most of the packages and reuse this single variable. Dose it worth changing this pattern? To me it looks like the example they give in https://go.dev/blog/unique refers to a bit different usage scenario of unique.

@codecov
Copy link

codecov bot commented Mar 21, 2025

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.59%. Comparing base (3e54c46) to head (41d3ddb).
Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
pkg/core/native/native_neo.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3847      +/-   ##
==========================================
+ Coverage   82.46%   82.59%   +0.13%     
==========================================
  Files         341      341              
  Lines       47740    47876     +136     
==========================================
+ Hits        39368    39545     +177     
+ Misses       6740     6695      -45     
- Partials     1632     1636       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AnnaShaleva AnnaShaleva force-pushed the go-1.23 branch 2 times, most recently from f19e0cb to 3e76d3b Compare March 25, 2025 11:32
A part of #3553.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #3553. Some of the usages are still preserved since there's
a dependent code.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #3553.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
A part of #3553.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva AnnaShaleva marked this pull request as ready for review March 25, 2025 12:11
Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

Dependency updates (SDK RC13 for sure)?

Regarding iter.Seq --- OK, I've not tried that, maybe it doesn't really fit for our use case.

Regarding unique --- looks like I've misinterpreted it originally, but it's hard to tell what can be improved by using it. Verification scripts look promising, but they're []byte.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva AnnaShaleva force-pushed the go-1.23 branch 3 times, most recently from 25251f0 to 7ccd764 Compare March 25, 2025 15:59
@roman-khimov
Copy link
Member

pkg/core/storage/boltdb_store_test.go:45:29 staticcheck SA1019: bbolt.ErrDatabaseReadOnly is deprecated: Use the error variables defined in the bbolt/errors package.

@AnnaShaleva AnnaShaleva force-pushed the go-1.23 branch 2 times, most recently from 48e2e81 to 0e5c72a Compare March 25, 2025 17:00
Everything except golang.org/x/* packages is upgradedto the latest
version. golang.org/x/* packages upgrade introduces toolchain
dependency, hence we'll postpone the update till the next Go version
bump.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva AnnaShaleva force-pushed the go-1.23 branch 2 times, most recently from 50d94ef to a347353 Compare March 25, 2025 17:05
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
@AnnaShaleva
Copy link
Member Author

Tests should be fine now, let's wait for the jobs to finish before the merge.

@roman-khimov roman-khimov merged commit 3f14779 into master Mar 25, 2025
34 checks passed
@roman-khimov roman-khimov deleted the go-1.23 branch March 25, 2025 18:05
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.

Go 1.23 upgrade check list

2 participants