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

[LS] Fix wasm target #243

Merged
merged 1 commit into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions languageserver/cmd/languageserver/main_wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ 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)
}
return res.String(), nil
}

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)
}
Expand Down
2 changes: 1 addition & 1 deletion languageserver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions languageserver/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion languageserver/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading