diff --git a/languageserver/cmd/languageserver/main_wasm.go b/languageserver/cmd/languageserver/main_wasm.go index 7d22a7fb..e09684ac 100644 --- a/languageserver/cmd/languageserver/main_wasm.go +++ b/languageserver/cmd/languageserver/main_wasm.go @@ -165,7 +165,7 @@ func start(id int) { return "", fmt.Errorf("CLS %d: getAddressCode not defined", id) } - res := getAddressCodeFunc.Invoke(location.Address().String()) + res := getAddressCodeFunc.Invoke(location.Address.String()) if res.IsNull() || res.IsUndefined() { return "", fmt.Errorf("CLS %d: getAddressCode failed: %s", id, res) } @@ -173,7 +173,7 @@ func start(id int) { } stringImportResolver := func(location common.StringLocation) (code string, err error) { - getStringCodeFunc = global.Get(globalFunctionName(id, "getStringCode")) + getStringCodeFunc := global.Get(globalFunctionName(id, "getStringCode")) if getStringCodeFunc.IsNull() || getStringCodeFunc.IsUndefined() { return "", fmt.Errorf("CLS %d: getStringCode not defined", id) } diff --git a/languageserver/go.mod b/languageserver/go.mod index 69684b23..3ae86ff8 100644 --- a/languageserver/go.mod +++ b/languageserver/go.mod @@ -9,7 +9,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 github.com/onflow/cadence v0.42.5 github.com/onflow/cadence-tools/lint v0.14.1 - github.com/onflow/cadence-tools/test v0.14.1 + github.com/onflow/cadence-tools/test v0.14.2 github.com/onflow/flow-cli/flowkit v1.6.1-0.20231110211255-b41f57a8b8c7 github.com/onflow/flow-go-sdk v0.41.16 github.com/sourcegraph/jsonrpc2 v0.1.0 diff --git a/languageserver/go.sum b/languageserver/go.sum index f19aacfb..e3fffafd 100644 --- a/languageserver/go.sum +++ b/languageserver/go.sum @@ -584,8 +584,8 @@ github.com/onflow/cadence v0.42.5 h1:QCilotmJzfRToLd+02o3N62JIioSr8FfN7cujmR/IXQ github.com/onflow/cadence v0.42.5/go.mod h1:raU8va8QRyTa/eUbhej4mbyW2ETePfSaywoo36MddgE= github.com/onflow/cadence-tools/lint v0.14.1 h1:Qkw8+q+ALfB62W7KWHMFh+90gTfJ+NoFulYETMCTkcI= github.com/onflow/cadence-tools/lint v0.14.1/go.mod h1:w1xfiiPpZ35v/F+2+MF/Rily7LcIgE0dm/FMW1vQkpc= -github.com/onflow/cadence-tools/test v0.14.1 h1:QWYslLEwh+gmJHblK6DUyZnpOo6L6U6x/C3AIXab494= -github.com/onflow/cadence-tools/test v0.14.1/go.mod h1:c/kyFSaBso7SW5eki1cFmP0/A+H3y/ctO95zJedcf+Q= +github.com/onflow/cadence-tools/test v0.14.2 h1:804gj5rl9LtW8Tr1PISbsNjkWZnzfww+KihMRjndYKM= +github.com/onflow/cadence-tools/test v0.14.2/go.mod h1:c/kyFSaBso7SW5eki1cFmP0/A+H3y/ctO95zJedcf+Q= github.com/onflow/flow-cli/flowkit v1.6.1-0.20231110211255-b41f57a8b8c7 h1:EI/XTe2E5U23oHzjaLPIm4TKMLD+v2vI5vHjO1BkRyM= github.com/onflow/flow-cli/flowkit v1.6.1-0.20231110211255-b41f57a8b8c7/go.mod h1:tPBuuYss8S8carovC49N1YVPIBheF6KD9Vr6Ocg3VpQ= github.com/onflow/flow-core-contracts/lib/go/contracts v1.2.4-0.20231016154253-a00dbf7c061f h1:S8yIZw9LFXfYD1V5H9BiixihHw3GrXVPrmfplSzYaww= diff --git a/languageserver/server/server.go b/languageserver/server/server.go index 3cd55672..43989e29 100644 --- a/languageserver/server/server.go +++ b/languageserver/server/server.go @@ -50,7 +50,7 @@ import ( "github.com/onflow/cadence-tools/languageserver/protocol" linter "github.com/onflow/cadence-tools/lint" - cdcTests "github.com/onflow/cadence-tools/test" + cdcTests "github.com/onflow/cadence-tools/test/helpers" ) // Document represents an open document on the client. It contains all cached