'Why module gets imported by pseudo-version from multi-module repo?
Some Go projects use multi-module approach, where top directory contains one module and subdir another. For example
- Nomad server https://github.com/hashicorp/nomad
- Nomad API https://github.com/hashicorp/nomad/tree/main/api
When importing the submodule from api directory to my own project, it gets included with pseudo-version such as v0.0.0-20220310213507-4a21dbcfaa6e even though the git repository does have release tags.
Trying to force specific release tag by running go get github.com/hashicorp/nomad/[email protected] will result in error:
go get: module github.com/hashicorp/[email protected] found, but does not contain package github.com/hashicorp/nomad/api
Why doesn't Go pick up release tags in this case?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
