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: cleanup go.mod file require sections #3103

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

Jorropo
Copy link
Contributor

@Jorropo Jorropo commented Jan 15, 2024

This PR does not change any of the dependency, it only reorders the go.mod file into a direct and undirect import section, as go versions do since 1.17.

The reason your go.mod file got so many require sections is because during the 1.16 to 1.17 go.mod styling transition you had different contributors updating the go.mod file with pre 1.17 and post 1.17 releases of go.

See https://go.dev/doc/modules/gomod-ref:

At go 1.17 or higher:

section for a description of what changed.

@github-actions github-actions bot added the external Issues created by non node team members label Jan 15, 2024
This PR does not change any of the dependency, it only reorders the go.mod file into a direct and undirect import section, like go do since 1.17.

The reason your go.mod file got so many require sections is because during the 1.16 to 1.17 go.mod styling transition you had different contributors updating the go.mod file with pre 1.17 and post 1.17 releases of go.

See https://go.dev/doc/modules/gomod-ref:
> At go 1.17 or higher:

section for a description of what changed.
@Jorropo Jorropo force-pushed the clenaup-go-mod-tidy branch from a350a3b to e3e1bb2 Compare January 15, 2024 07:37
@Jorropo
Copy link
Contributor Author

Jorropo commented Jan 15, 2024

Btw the way to fix this bug is to search and replace:

)

require (

with literally nothing, this creates one single big require ( block, then running go mod tidy with a version of go from 1.17 or later will properly sort the dependencies.

@Jorropo
Copy link
Contributor Author

Jorropo commented Jan 15, 2024

Similar celestiaorg/celestia-core#1172

@ramin ramin added the kind:deps Pull requests that update a dependency file label Jan 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (73771ec) 51.08% compared to head (1bb9439) 51.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3103      +/-   ##
==========================================
+ Coverage   51.08%   51.34%   +0.26%     
==========================================
  Files         177      177              
  Lines       11139    11139              
==========================================
+ Hits         5690     5719      +29     
+ Misses       4943     4925      -18     
+ Partials      506      495      -11     

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

@ramin ramin merged commit 4083ea8 into celestiaorg:main Jan 16, 2024
15 of 17 checks passed
@Jorropo Jorropo deleted the clenaup-go-mod-tidy branch January 16, 2024 11:49
renaynay pushed a commit that referenced this pull request Jan 23, 2024
This PR does not change any of the dependency, it only reorders the
go.mod file into a direct and undirect import section, as go versions do
since 1.17.

The reason your go.mod file got so many require sections is because
during the 1.16 to 1.17 go.mod styling transition you had different
contributors updating the go.mod file with pre 1.17 and post 1.17
releases of go.

See https://go.dev/doc/modules/gomod-ref:
> At go 1.17 or higher:

section for a description of what changed.

Co-authored-by: ramin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Issues created by non node team members kind:deps Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants