-
Notifications
You must be signed in to change notification settings - Fork 611
Single go.mod file #3640
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
Single go.mod file #3640
Conversation
Signed-off-by: Troy Chiu <y.troychiu@gmail.com>
Well, I am sure that using one go.mod is not the best practice for not downloading unnecessary dependencies. For example, users who use apiserversdk as a library may not need to download grpc gateway at all. However, using one go.mod indeed simplifies many things. |
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.
LGTM. Only have 2 questions:
- Did you run
go mod tidy
? - Are there version conflicts and how did you resolve them?
Yeah you are right from this point of view. Let me update the PR description a bit to be more clear. What I meant not the best practice is "Having multiple go.mod files and using replace in each of them". If in the future, kuberay become a large size package. We can then switch back to multiple go.mod but with go workspace. But at this point, using one go.mod should be easiest. |
|
Not sure I would consider having multiple modules as not a best practice. I think it depends. Just FYI that this change is potentially breaking Go compatibility for any external project that is importing github.com/ray-project/kuberay/ray-operator. Were we aware of this when making this change? |
The benefit of the module in |
Reviewing go modules in v1.3, I tend to agree we had way too many go modules, but I would suggest keeping the one in |
We have taken this into consideration. You can take a look at: #3640 (comment). We decided to unify |
Why are these changes needed?
Having multiple go.mod files and using replace in each of them is hard to manage and not the best practice. We should either use a Go workspace or just keep one go.mod file. Since KubeRay is not a very big project, it makes more sense to have only one go.mod file. That’s why I chose to combine everything into a single go.mod.
This also fixes an issue that was opened some time ago.
Related issue number
Closes #3487
Checks