-
Notifications
You must be signed in to change notification settings - Fork 349
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: update to v2 go mod #3217
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only looked at the first 3 files in the diff but it looks like a lot of links were modified that shouldn't have been modified
Should have reverted all the replaces to non go/proto files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One non-blocking question: how do we verify the proto Go package strings are correct?
[blocking] I think test/e2e/node.go broke during merge resolution
@@ -1,7 +1,7 @@ | |||
syntax = "proto3"; | |||
package celestia.core.v1.da; | |||
|
|||
option go_package = "github.com/celestiaorg/celestia-app/proto/celestia/core/v1/da"; | |||
option go_package = "github.com/celestiaorg/celestia-app/v2/proto/celestia/core/v1/da"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[no change needed] is there a way to sanity check that that this name is correct? I guess I'm asking if any of the proto
CI checks would fail if this line pointed to an incorrect Go package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'm not sure if the path is really used. I just know that for buf
it needs to be set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reverting all the GH issue links. I just scanned the diff from the last review and it looks good to me. I wonder if there's any manual testing we can do before / after this merges to verify everything was ported over to v2 correctly.
The Go compiler gives us confidence that the import statements are correct. Manual review gives us confidence the GH issues are still correct. My only concern is around the Protobuf definitions so I'm 🤞 hoping that the proto-*
CI jobs would fail if we broke something.
proto/celestia/blob/v1/event.proto
Outdated
package celestia.blob.v1; | ||
|
||
option go_package = "github.com/celestiaorg/celestia-app/v2/x/blob/types"; | ||
option go_package = "github.com/celestiaorg/celestia-app/x/blob/types"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question] when do we bump the version number v1
in package celestia.blob.v1
?
You can add an optional package specifier to a .proto file to prevent name clashes between protocol message types.
In Go, the package directive is ignored, and the generated .pb.go file is in the package named after the corresponding go_proto_library Bazel rule. For open source projects, you must provide either a go_package option or set the Bazel -M flag.
Ref: https://protobuf.dev/programming-guides/proto3/#packages
It seems like the package
statement is optional so I wonder if we should consider removing them to avoid confusion especially if they're not doing anything. Can definitely be a separate issue to investigate.
They actually were failing before hand as being breaking. I have a hunch however that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Markdown link check is failing on:
|
We should make sure that our use of go mods matches our git versioning numbers i.e. v2.0.0 needs to be for a v2 module
Closes #3174