From 924da56ce52c765f16184c6954fd80f7793cc307 Mon Sep 17 00:00:00 2001 From: Christoph Otter Date: Tue, 6 Feb 2024 12:49:44 +0100 Subject: [PATCH] Fix version 2.0 module naming --- cmd/demo/main.go | 2 +- go.mod | 9 +-------- ibc_test.go | 4 ++-- internal/api/api_test.go | 2 +- internal/api/callbacks.go | 2 +- internal/api/iterator.go | 2 +- internal/api/iterator_test.go | 4 ++-- internal/api/lib.go | 2 +- internal/api/lib_test.go | 2 +- internal/api/mock_failure.go | 2 +- internal/api/mocks.go | 4 ++-- internal/api/testdb/types.go | 2 +- lib.go | 4 ++-- lib_no_cgo.go | 2 +- lib_no_cgo_test.go | 2 +- lib_test.go | 4 ++-- version_cgo.go | 2 +- 17 files changed, 22 insertions(+), 29 deletions(-) diff --git a/cmd/demo/main.go b/cmd/demo/main.go index 3c7f1085a..58286e782 100644 --- a/cmd/demo/main.go +++ b/cmd/demo/main.go @@ -5,7 +5,7 @@ import ( "math" "os" - wasmvm "github.com/CosmWasm/wasmvm" + wasmvm "github.com/CosmWasm/wasmvm/v2" ) const ( diff --git a/go.mod b/go.mod index d7c042bd4..133700f6a 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/CosmWasm/wasmvm +module github.com/CosmWasm/wasmvm/v2 go 1.21 @@ -15,10 +15,3 @@ require ( gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -retract ( - // see https://github.com/CosmWasm/wasmvm/issues/459 - v1.4.0 - // originally published without the CWA-2023-004 fix - v1.2.5 -) diff --git a/ibc_test.go b/ibc_test.go index 4212bc19e..7c468f008 100644 --- a/ibc_test.go +++ b/ibc_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/CosmWasm/wasmvm/internal/api" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/internal/api" + "github.com/CosmWasm/wasmvm/v2/types" ) const IBC_TEST_CONTRACT = "./testdata/ibc_reflect.wasm" diff --git a/internal/api/api_test.go b/internal/api/api_test.go index cc3f25e5b..0f30eee16 100644 --- a/internal/api/api_test.go +++ b/internal/api/api_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/types" ) func TestValidateAddressFailure(t *testing.T) { diff --git a/internal/api/callbacks.go b/internal/api/callbacks.go index 7292f7b2d..5db7ee817 100644 --- a/internal/api/callbacks.go +++ b/internal/api/callbacks.go @@ -41,7 +41,7 @@ import ( "runtime/debug" "unsafe" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/types" ) // Note: we have to include all exports in the same file (at least since they both import bindings.h), diff --git a/internal/api/iterator.go b/internal/api/iterator.go index a29b1d07b..4dff612c3 100644 --- a/internal/api/iterator.go +++ b/internal/api/iterator.go @@ -4,7 +4,7 @@ import ( "fmt" "sync" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/types" ) // frame stores all Iterators for one contract call diff --git a/internal/api/iterator_test.go b/internal/api/iterator_test.go index bf7a34635..54366a4cc 100644 --- a/internal/api/iterator_test.go +++ b/internal/api/iterator_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/CosmWasm/wasmvm/internal/api/testdb" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/internal/api/testdb" + "github.com/CosmWasm/wasmvm/v2/types" ) type queueData struct { diff --git a/internal/api/lib.go b/internal/api/lib.go index 99a5add35..71b5a19ae 100644 --- a/internal/api/lib.go +++ b/internal/api/lib.go @@ -13,7 +13,7 @@ import ( "golang.org/x/sys/unix" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/types" ) // Value types diff --git a/internal/api/lib_test.go b/internal/api/lib_test.go index 3d8725128..30a2d93a1 100644 --- a/internal/api/lib_test.go +++ b/internal/api/lib_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/types" ) const ( diff --git a/internal/api/mock_failure.go b/internal/api/mock_failure.go index acc80f626..e86a8a983 100644 --- a/internal/api/mock_failure.go +++ b/internal/api/mock_failure.go @@ -3,7 +3,7 @@ package api import ( "fmt" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/types" ) /***** Mock types.GoAPI ****/ diff --git a/internal/api/mocks.go b/internal/api/mocks.go index 84fcd7e65..2a0fb28e6 100644 --- a/internal/api/mocks.go +++ b/internal/api/mocks.go @@ -11,8 +11,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/CosmWasm/wasmvm/internal/api/testdb" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/internal/api/testdb" + "github.com/CosmWasm/wasmvm/v2/types" ) /** helper constructors **/ diff --git a/internal/api/testdb/types.go b/internal/api/testdb/types.go index 08e48dd44..f600fdfa6 100644 --- a/internal/api/testdb/types.go +++ b/internal/api/testdb/types.go @@ -3,7 +3,7 @@ package testdb import ( "errors" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/types" ) var ( diff --git a/lib.go b/lib.go index 60a0498c2..453e1b52c 100644 --- a/lib.go +++ b/lib.go @@ -8,8 +8,8 @@ import ( "encoding/json" "fmt" - "github.com/CosmWasm/wasmvm/internal/api" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/internal/api" + "github.com/CosmWasm/wasmvm/v2/types" ) // VM is the main entry point to this library. diff --git a/lib_no_cgo.go b/lib_no_cgo.go index 776d193b1..176d89f17 100644 --- a/lib_no_cgo.go +++ b/lib_no_cgo.go @@ -7,7 +7,7 @@ import ( "crypto/sha256" "fmt" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/types" ) // Checksum represents a hash of the Wasm bytecode that serves as an ID. Must be generated from this library. diff --git a/lib_no_cgo_test.go b/lib_no_cgo_test.go index 8c2044362..8998df7d7 100644 --- a/lib_no_cgo_test.go +++ b/lib_no_cgo_test.go @@ -3,7 +3,7 @@ package cosmwasm import ( "testing" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/types" "github.com/stretchr/testify/require" ) diff --git a/lib_test.go b/lib_test.go index d21b95fb5..2cbe999d8 100644 --- a/lib_test.go +++ b/lib_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/CosmWasm/wasmvm/internal/api" - "github.com/CosmWasm/wasmvm/types" + "github.com/CosmWasm/wasmvm/v2/internal/api" + "github.com/CosmWasm/wasmvm/v2/types" ) const ( diff --git a/version_cgo.go b/version_cgo.go index 7d024970d..7c727369e 100644 --- a/version_cgo.go +++ b/version_cgo.go @@ -3,7 +3,7 @@ package cosmwasm import ( - "github.com/CosmWasm/wasmvm/internal/api" + "github.com/CosmWasm/wasmvm/v2/internal/api" ) func libwasmvmVersionImpl() (string, error) {