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

Support for Monorepos #30

Open
oliver-anz opened this issue Oct 22, 2024 · 3 comments
Open

Support for Monorepos #30

oliver-anz opened this issue Oct 22, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@oliver-anz
Copy link

Hey mate, great tool seems very helpful!
Just wondering if there's a way to use modver with monorepos? I'm having some issues.
We have a repo with a number of different modules in subfolders.

Structure looks something like:

.git/
module1/
go.mod
go.sum
module2/
go.mod
go.sum

running modver -git ../.git HEAD~1 HEAD in the folder module1 gives Error in comparing: error(s) loading package ./...: -: pattern ./...: directory prefix . does not contain main module or its selected dependencies

running modver -git .git HEAD~1 HEAD in the root folder gives Error in comparing: error(s) loading package ./...: -: pattern ./...: directory prefix . does not contain main module or its selected dependencies

It appears we can't run modver unless the module is declared in the top level of the repo, is this correct? Is there any workaround, and if not, could it be possible to add support for this?

Thank you!

@oliver-anz
Copy link
Author

Hey @bobg , any updates? Cheers

@bobg bobg added the enhancement New feature or request label Nov 14, 2024
@bobg
Copy link
Owner

bobg commented Nov 14, 2024

Hey, thanks for the kind words, and sorry for the delay.

You're right, that feature is needed in Modver. It may be some weeks before I can get to adding it.

In the meantime, please allow me to recommend my newer tool, Taggo, which incorporates Modver logic, and which can handle multiple Go modules per repository.

@oliver-anz
Copy link
Author

Hey mate, had a look into taggo, but encountered some issues. I think this is because it requires each package be defined as main? Ended up going with go-apidiff.
Thanks though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants