Multi-module repository and invalid version: unknown revision

1,554 views
Skip to first unread message

Hein Meling

unread,
Mar 29, 2020, 12:00:17 PM3/29/20
to golang-nuts
Hi all,

First off, I've read this, and the other FAQ answers:
https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository

However, I'm not sure how my case fits the scenarios described therein; or maybe I just don't understand how it is related.

Previously, we had only one module: github.com/autograde/aguis

But I discovered to my dismay, that my course's tests, which depended on the github.com/autograde/aguis module only to get the kit package, were pulling in all of aguis's dependencies, instead of just the kit package. Previously, I kept the kit package in a separate repo (as is recommended in the FAQ), but this was also problematic, as it is easy to forget to update both for changes to one that impacts the other. Hence, I decided it would be best to create a separate module for the kit package: github.com/autograde/aguis/kit

The aguis module depends on the kit module, but not the other way around. However, other repos (like my course's tests) do depend on the kit module. 

Currently there are no releases for neither module; So far this has been working fine, until I created the new kit module. It worked for a while, but as we made further commits to the aguis module, we started seeing the messages below when the tests were trying to fetch the kit module:

github.com/autograde/aguis/k...@v0.0.0-20200326190951-c1090b5a8d9a: invalid version: unknown revision c1090b5a8d9a

I've read about similar problems on the issue tracker, but wasn't able to find a solution from those.

Anyone here have any recommendations on what is the best approach to solve this?

PS: I'm also using GOPROXY=direct

Thanks,
:) Hein

Jakob Borg

unread,
Mar 29, 2020, 4:35:15 PM3/29/20
to Hein Meling, golang-nuts
On 29 Mar 2020, at 18:00, Hein Meling <hein....@gmail.com> wrote:

github.com/autograde/aguis/k...@v0.0.0-20200326190951-c1090b5a8d9a: invalid version: unknown revision c1090b5a8d9a

I've read about similar problems on the issue tracker, but wasn't able to find a solution from those.

Anyone here have any recommendations on what is the best approach to solve this?

The repository doesn't contain a commit with that hash. Perhaps it was on a branch that has been deleted, or a branch was rebased. Regardless, if it doesn't exist Go can't find it.

//jb

Hein Meling

unread,
Mar 29, 2020, 4:38:36 PM3/29/20
to golang-nuts
That might actually explain it... Thanks for the tip. After updating the dependency, it is working again.

Thanks,
:) Hein
Reply all
Reply to author
Forward
0 new messages