Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 module #623

Merged
merged 2 commits into from
Dec 20, 2023
Merged

V2 module #623

merged 2 commits into from
Dec 20, 2023

Conversation

libotony
Copy link
Member

Fixes the following issue:

go get github.com/vechain/thor/[email protected]
go: github.com/vechain/thor/[email protected]: github.com/vechain/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/vechain/thor/v2")

And also the last version listed in https://pkg.go.dev/github.com/vechain/thor is still v1.7.4

Ref golang/go#35732

@qianbin
Copy link
Member

qianbin commented Dec 14, 2023

WTF, it's crazy.

@qianbin
Copy link
Member

qianbin commented Dec 14, 2023

Have you tried replace github.com/vechain/thor => ./ ?

@libotony
Copy link
Member Author

Have you tried replace github.com/vechain/thor => ./ ?

You mean to keep all import path in the source to be github.com/vechain/thor? I don't know if this is a good practice in go.

@libotony
Copy link
Member Author

I made a test locally, to use replace github.com/vechain/thor => ./ you also need to declare you require github.com/vechain/thor so github.com/vechain/thor v1.7.4 will be listed in the dependency. There is also a problem that you can not use v1's internal packages in v2.

package github.com/vechain/thor/v2/muxdb
        muxdb/muxdb.go:20:2: use of internal package github.com/vechain/thor/muxdb/internal/engine not allowed

@libotony
Copy link
Member Author

Conflicts resolved, PTAL @qianbin

@qianbin qianbin merged commit 417b722 into vechain:master Dec 20, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants