--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/3103aade-0d28-4274-a83e-3d947485f650n%40googlegroups.com.
Consider this a drive by comment, but you might be able to create a version of the nested module that does not have any code in it, and set up a requirement cycle between the nested module and a new parent version.
I think there’s a general approach of creating a requirement cycle for a removed modules within a repo so that any consumer that points to one of the module in the repo automatically gets ratcheted forward to a consistent version of the other module within that same repo.
In the past, I’ve helped some open source projects work through similar issues, including for example you can see the comments I wrote here a while ago to help ugorji/go/codec to deal with ambiguous import errors for many consumers because the same package appeared in two modules (including writing some testscript tests to verify expected behavior):
https://github.com/ugorji/go/issues/299#issuecomment-495465786
https://github.com/ugorji/go/issues/299#issuecomment-495793804
https://github.com/ugorji/go/issues/299#issuecomment-496468760
Caveats include your situation might be different, and also the last time I did this on a real repo with many open consumers was before the introduction of module pruning, which could have changed things, but I haven’t pondered that too much.
In any event, something to consider, and of course you’d want to test to convince yourself if it would work or not for you.
Best regards,
thepudds