It's a somewhat uneasy feeling to see how the "solution/projects" (in Visual Studio terms) hierarchy keeps getting reinvented in every. single. bloody. ecosystem, even in non-PL ones. Surely there must be a better way to organize things?
It's a somewhat uneasy feeling to see how the "solution/projects" (in Visual Studio terms) hierarchy keeps getting reinvented in every. single. bloody. ecosystem, even in non-PL ones. Surely there must be a better way to organize things?
The modules in a workspace may have entirely different ownership. For instance, let's say you're using a WebRTC library to run a selective forwarding unit as part of your video conferencing app. Maybe you notice a bug in the WebRTC library. You can check out the code for the WebRTC library and add it to your workspace so you can test your application against your local WebRTC library changes.
E.g. if your workspace looks like this:
workspace/
mod1/
mod2/
Then both mod1 and mod2 will pull their dependencies remotely.But if you add a file to workspace/go.work, then local versions of mod1 and mod2 can be used without changing either mod1 or mod2.
As you can see it's quite complicated. The contents of go.work is literally
mod1/
mod2/
Also, the go.work file is meant to be your local workspace. If mod1 and mod2 have dependencies between each other, they should declare them explicitly and pull them in from the remote in most cases. The go.work file is only when you want to work on both modules locally. Meaning you don't check in go.work to your github repository in most cases.I wasn’t aware about “not checking in go.work”. What if you want separate modules to be aware of each other but keep them in the same repo?
Yes and no. It depends. You can use modules. With modules, each sub project lives in a directory under the root project. Maven reactor figures out the build order and all that crazy stuff. It’s the same with sbt and gradle.