switchupcb / disgo

Create a Discord Bot in Go using this Discord API Wrapper. The next generation of Discord API Consumption.
Apache License 2.0
89 stars 2 forks source link

import: invalid version: module contains a go.mod file, so module path must match major version #48

Closed switchupcb closed 1 year ago

switchupcb commented 1 year ago

Using go get github.com/switchupcb/disgo@v10.0.0 will result in an error go: github.com/switchupcb/disgo@v10.0.0: invalid version: module contains a go.mod file, so module path must match major version ("github.com/switchupcb/disgo/v10").

This is due to a feature in one of these documents.

The fix may involve a few commits due to the fact that the repository needs to be recognized prior to being importable, but there are packages that require the main disgo package to be imported.

switchupcb commented 1 year ago

This issue is caused because the tag uses v10, which indicates that to go get that a major version is being used. However, the import is not go get github.com/switchupcb/disgo@v10.0.0. The main issue is that I tested this with dasgo, and using go get github.com/switchupcb/dasgo/v10@v10 or github.com/switchupcb/dasgo/v10@v10.X fails because of semantics described in https://github.com/golang/go/issues/33010 and https://github.com/golang/go/issues/29731. So now I am deciding between the following choices:

So now I will be implementing that change to dasgo and disgo which involves updating tags.