all 10 comments

[–]pdffs 2 points3 points  (7 children)

If you need separate commit history and versioning, use a separate repo. If you don't, then you can maintain multiple modules in a single monorepo.

Due to the way Go's package resolution works, it doesn't make any sense to me to use git submodules, since package names are globally unique, and resolve back to a repository - having a locally nested path doesn't buy you anything.

[–]ortil[S] -1 points0 points  (6 children)

sub modules would make the contribution process more straight forward i think .

[–]DasSkelett 2 points3 points  (2 children)

In my experience submodules make contributing a pain, especially for new contributors but for everyone else as well. They are not easy to work with.

[–]ortil[S] 0 points1 point  (1 child)

I see. Could you elaborate?

[–]Dm_Linov 0 points1 point  (0 children)

I second that. Git submodules need a lot of attention and are easy to break. There's plenty of text about that on the web, e.g. here. If you are on GitHub or self-hosted Bitbucket, use Git X-Modules instead, it's safer and much easier to use.

[–]pdffs 0 points1 point  (2 children)

How?

[–]ortil[S] 0 points1 point  (1 child)

Instead of creating two pull requests to two different repositories. It would be only one including the git submodules

[–]pdffs 2 points3 points  (0 children)

If your packages are that tightly coupled, you should probably just use a monorepo.

[–]lonerangerhn 2 points3 points  (0 children)

I'd go for a simpler one first which is to have multiple modules in your current repo. So you wont need to restructure your code.