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

Go workspace support #55

Open
robzienert opened this issue Feb 27, 2024 · 1 comment
Open

Go workspace support #55

robzienert opened this issue Feb 27, 2024 · 1 comment

Comments

@robzienert
Copy link

Hello! My team maintains a monorepo library for a large collection of modules, and use Go module workspaces for it. I'm on the hunt for a compatibility checker and go-apidiff is the best of what I've found so far. However, it doesn't work at all with a workspace. Are you open to a contribution that would provide this capability (to either scan a whole project module-by-module, or selectively scan a particular module)? Happy to do the work, but want to check if this is something you want.

@joelanford
Copy link
Owner

Hi @robzienert!

I haven't personally used go workspaces, so I'm not really sure what the intersection of this project and workspaces are. But I'm happy to be educated!

Are you thinking of being able to run this in the context of a go workspace, where it have some awareness of the modules in the workspace and then runs the diff on one or more modules in isolation? If so, it seems like you could get by with a fairly light wrapper that calls go list -m -f '{{.Dir}}' (to get the directories of each module) and then runs go-apidiff in one (or each).

But looking at the workspaces documentation, I also see that the go.work file can contain a different go and toolchain, and it can also contain replace modules. So that makes me think that the actual workspace configuration can make a difference when running the diff.

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

No branches or pull requests

2 participants