Module and package import layout on 13 yo project

Hello,

I have been trying to use this project : github . com / hrautila/cvx [new users can’t post more than 2 links]

It depends on two modules from the same repo hrautila/linalg and hrautila/matrix.

I get :

no matching versions for query “latest”

(I know what the tag @latest means , yet I am puzzled it doesn’t fallback to a pseudo version)

  • I have read the go wiki on writing go modules, publishing, etc… and read go.dev/ref/mod#resolve-pkg-mod and more to no avail.

  • I also tried to name the module as something that I thought would be local but got :

go: finding module for package example.com/matrix
go: example . com/linalg/blas imports
example . com/matrix: cannot find module providing package example . com/matrix: unrecognized import path “example . com/matrix”: reading https : //example . com/matrix?go-get=1: 404 Not Found

I thought that placing and registering the module in a workspace : go work use cvx/ would prevent from fetching the URL. Again, not what I expected.

I think I am missing something important. Could someone explain me what is the problem ? (somehow, I guess that exposing the problem will be dual to the solution).

thanks for your insight :slight_smile:

Most likely the problem is that these are very old projects that don’t have the go.mod file. I guess the simplest solution would be to just manually vendor them into your project and go mod init each of them appropriately.

Make sure that it’s ok to use GPL-licensed code in your project.