Skip to content

Commit

Permalink
Merge pull request #283 from onflow/ianthpun/flowkit-update
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent authored Feb 14, 2024
2 parents 2f4fd6a + 3fb779a commit ad5932e
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 90 deletions.
29 changes: 16 additions & 13 deletions languageserver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,23 @@ require (
github.com/google/uuid v1.5.0
github.com/mattn/go-isatty v0.0.20
github.com/mitchellh/mapstructure v1.5.0
github.com/onflow/cadence v1.0.0-M4
github.com/onflow/cadence-tools/lint v1.0.0-M1
github.com/onflow/cadence-tools/test v1.0.0-M1
github.com/onflow/flow-cli/flowkit v1.11.1-0.20240130210637-a22f7c578d37
github.com/onflow/flow-go-sdk v1.0.0-M1
github.com/onflow/cadence v1.0.0-M7
github.com/onflow/cadence-tools/lint v1.0.0-M4
github.com/onflow/cadence-tools/test v1.0.0-M3
github.com/onflow/flow-go-sdk v1.0.0-M4
github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.2.0.20240214213743-ee40994a815f
github.com/sourcegraph/jsonrpc2 v0.1.0
github.com/spf13/afero v1.10.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc
)

require (
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7 // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.2-0.20240206003101-928bf99024d7 // indirect
)

require (
cloud.google.com/go/compute v1.23.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
Expand Down Expand Up @@ -116,7 +121,7 @@ require (
github.com/logrusorgru/aurora/v4 v4.0.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
Expand All @@ -132,13 +137,11 @@ require (
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f // indirect
github.com/onflow/crypto v0.25.0 // indirect
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d // indirect
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d // indirect
github.com/onflow/flow-emulator v1.0.0-M1 // indirect
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01 // indirect
github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f // indirect
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad // indirect
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 // indirect
github.com/onflow/flow-emulator v1.0.0-M5 // indirect
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240205224107-320aa3cf09e0 // indirect
github.com/onflow/flow-go v0.33.2-0.20240214203221-b11eeaa896bd // indirect
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240205233530-86ee8c352fa6 // indirect
github.com/onflow/flow/protobuf/go/flow v0.3.7 // indirect
github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
Expand Down
50 changes: 26 additions & 24 deletions languageserver/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1745,8 +1745,9 @@ github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp
github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI=
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
Expand Down Expand Up @@ -1834,33 +1835,34 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f h1:Z8/PgTqOgOg02MTRpTBYO2k16FE6z4wEOtaC2WBR9Xo=
github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM=
github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8=
github.com/onflow/cadence v1.0.0-M4 h1:/nt3j7vpYDxuI0ghIgAJrb2R01ijvJYZLAkKt+zbpTY=
github.com/onflow/cadence v1.0.0-M4/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8=
github.com/onflow/cadence-tools/lint v1.0.0-M1 h1:M92+hX+pr28fR4f117WP69qRG80oL3RCVoYC6o68Bzk=
github.com/onflow/cadence-tools/lint v1.0.0-M1/go.mod h1:M2cmhrWu4sG2J8WjLL69njk2ITo1Wne5tBzG2m+en0g=
github.com/onflow/cadence-tools/test v1.0.0-M1 h1:l+hCgUR/13rHkF1j8TumhhpWn4tmNA8ra50iCCdS5Ao=
github.com/onflow/cadence-tools/test v1.0.0-M1/go.mod h1:xRfnM0BUo3YvGwFme2G7z1Q58UOsb0V/FvJW7VhERao=
github.com/onflow/cadence v1.0.0-M7 h1:hb4LK9lUbFdnDdfU8oqJGSVJtmkOzxwKomhmDcP/Faw=
github.com/onflow/cadence v1.0.0-M7/go.mod h1:a4mccDU90hmuxCLUFzs9J/ANG/rYbFa36h4Z0bBAqNU=
github.com/onflow/cadence-tools/lint v1.0.0-M4 h1:XeBX+/2TKbe04nyMjUbSD9aHcF5+H6UOAgsuLTmo1DA=
github.com/onflow/cadence-tools/lint v1.0.0-M4/go.mod h1:vgKOF14/NwWktjsRKHlWEz8z/3uQu5nuqDzQOm+u2qY=
github.com/onflow/cadence-tools/test v1.0.0-M3 h1:ZbKoMhXsvafJIOO/MVE7lV5INXfq2IL0Z+W2MsJnKwY=
github.com/onflow/cadence-tools/test v1.0.0-M3/go.mod h1:Yk6OyiRMNseM6C13FpNUxTJ7GekYZMzdX5D2B10y4N8=
github.com/onflow/crypto v0.25.0 h1:BeWbLsh3ZD13Ej+Uky6kg1PL1ZIVBDVX+2MVBNwqddg=
github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI=
github.com/onflow/flow-cli/flowkit v1.11.1-0.20240130210637-a22f7c578d37 h1:WTg5PAhuvVRd3izYGtqSElnFd65jjit99zih5kPMb0I=
github.com/onflow/flow-cli/flowkit v1.11.1-0.20240130210637-a22f7c578d37/go.mod h1:aJ850vu0mX9HIr/KTTlGfeLxSZ+sn4Knc6Njp5vIeIA=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d h1:Afcfk/9jAQZ1v5PLGdP68FG/0yPPM60fn9Eq8ChBGS0=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d/go.mod h1:Ts/HN+N0RaYJ6oPCqR1JPaMVFiVaMdKTSUH4OdSjjs0=
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d h1:IQJpP3VLLjT4R8ItBpr+Mmp0IOnC/8iBcM0/67JNB9c=
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d/go.mod h1:MZ2j5YVTQiSE0B99zuaYhxvGG5GcvimWpQK1Fw/1QBg=
github.com/onflow/flow-emulator v1.0.0-M1 h1:0hBEmvm73F+5HhN5ugkOP3UyN+Ea9yGWflEmoeGzgdw=
github.com/onflow/flow-emulator v1.0.0-M1/go.mod h1:JFJCeQVyhCQVD2Tq4QhctIXK6j5U6aU15yoEwMJt5AQ=
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01 h1:8iKk5RuFvhe7NQyAO3c+xiVvv38RB/yopHdWxp4AbL8=
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A=
github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f h1:F1y95CpteZn0i4v0FDGjKiqI13Xlir3hX4x0C1xMRoc=
github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f/go.mod h1:9q+c+fuTpc/emueM/2bI/Ih2jw3V+9WS3Eu+pWBuLW0=
github.com/onflow/flow-go-sdk v1.0.0-M1 h1:mke/ebYwNRRWPZqcwCV56Alx0A8psew43ZbSEUQ4TL8=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7 h1:OI/4F2NK/X/4x3dTUFFDGtuOsSa9pX+jjBeSEcBrY/M=
github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.2-0.20240206003101-928bf99024d7/go.mod h1:GK+Ik1K3L3v8xmHmRQv5yxJz81lYhdYSNm0PQ63Xrws=
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.2-0.20240206003101-928bf99024d7 h1:WAx8ftVz1BeXiKvQ9gLKEf1J3NBWK26Pbczd0iH4C6I=
github.com/onflow/flow-core-contracts/lib/go/templates v0.15.2-0.20240206003101-928bf99024d7/go.mod h1:MZ2j5YVTQiSE0B99zuaYhxvGG5GcvimWpQK1Fw/1QBg=
github.com/onflow/flow-emulator v1.0.0-M5 h1:yPx6je/ahdYvd4b80bMXJ0AT4k2eogEGsQCOI+83V2I=
github.com/onflow/flow-emulator v1.0.0-M5/go.mod h1:CBp/YrgR2PeOdqhQMbfAiznGayNoJuFQTfLV9EJFtEc=
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240205224107-320aa3cf09e0 h1:u6/YcUvO8jU0f3Evb/6agzXqeOo+VbL2a3mmj/5ifRs=
github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240205224107-320aa3cf09e0/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A=
github.com/onflow/flow-go v0.33.2-0.20240214203221-b11eeaa896bd h1:x9eOt5rdDSr00aKwoyUWyJ4m8WlUwgYoV94oSEWPhiM=
github.com/onflow/flow-go v0.33.2-0.20240214203221-b11eeaa896bd/go.mod h1:45DIkRx5a+qiV83fpJ+fra9WtRiF4bTqd7XMxahRdnc=
github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo=
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad h1:I6LD9BOsilGbiqhGjP86FIIXJe0YdUz75d/oWdHFzDI=
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE=
github.com/onflow/flow-go-sdk v1.0.0-M4 h1:dGtgZvaIfBR5/9I9nm5nLm69V5pLcSz9vXmzCb1lyzM=
github.com/onflow/flow-go-sdk v1.0.0-M4/go.mod h1:HIGOKJVR47QNs81sPHmZDVcLr+syNkmbgEMLQGDmmEo=
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240205233530-86ee8c352fa6 h1:/2vvjKkWG/3cKP3IpgiGNqXi0yskn4GmNTjmeCwMoz8=
github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240205233530-86ee8c352fa6/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE=
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 h1:+rT+UsfTR39JZO8ht2+4fkaWfHw74SCj1fyz1lWuX8A=
github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
github.com/onflow/flow/protobuf/go/flow v0.3.7 h1:+6sBdlE/u4ZMTVB9U1lA6Xn2Bd48lOOX96Bv9dNubsk=
github.com/onflow/flow/protobuf/go/flow v0.3.7/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk=
github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.2.0.20240214213743-ee40994a815f h1:GjStQGlfhxbZiOZy8vFRSNUrNoD1u3Q8f5mhfyZ1vhc=
github.com/onflow/flowkit/v2 v2.0.0-stable-cadence-alpha.2.0.20240214213743-ee40994a815f/go.mod h1:Ck+iZGJYerviTQ3SyqoUNLNXdRUJiI5iMxfM9YugtK0=
github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba h1:rIehuhO6bj4FkwE4VzwEjX7MoAlOhUJENBJLqDqVxAo=
github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU=
github.com/onflow/wal v0.0.0-20230529184820-bc9f8244608d h1:gAEqYPn3DS83rHIKEpsajnppVD1+zwuYPFyeDVFaQvg=
Expand Down
7 changes: 3 additions & 4 deletions languageserver/integration/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ import (
"fmt"
"net/url"

"github.com/onflow/flow-cli/flowkit/arguments"

"github.com/onflow/flow-go-sdk"
"github.com/onflow/flowkit/v2/arguments"

"github.com/onflow/cadence-tools/languageserver/server"
)
Expand All @@ -42,7 +41,7 @@ const (

type commands struct {
client flowClient
state flowState
state flowState
}

func (c *commands) getAll() []server.Command {
Expand All @@ -51,7 +50,7 @@ func (c *commands) getAll() []server.Command {
Name: CommandReloadConfig,
Handler: c.reloadConfig,
}}

// Commands only available when client is enabled
if c.client != nil {
commands = append(commands, []server.Command{
Expand Down
2 changes: 1 addition & 1 deletion languageserver/integration/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,4 @@ func Test_ReloadConfig(t *testing.T) {
assert.Equal(t, nil, resp)
state.AssertCalled(t, "Reload")
})
}
}
3 changes: 0 additions & 3 deletions languageserver/integration/diagnostics.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
//
// For example, this function will return diagnostics for declarations that are
// syntactically and semantically valid, but unsupported by the extension.
//
func diagnostics(
_ protocol.DocumentURI,
_ int32,
Expand All @@ -48,7 +47,6 @@ func diagnostics(

// transactionDeclarationCountDiagnostics reports diagnostics
// if there are more than 1 transaction declarations, as deployment will fail
//
func transactionDeclarationCountDiagnostics(checker *sema.Checker) []protocol.Diagnostic {
var diagnostics []protocol.Diagnostic

Expand Down Expand Up @@ -76,7 +74,6 @@ func transactionDeclarationCountDiagnostics(checker *sema.Checker) []protocol.Di

// compositeOrInterfaceDeclarationCountDiagnostics reports diagnostics
// if there are more than one composite or interface declaration, as deployment will fail
//
func compositeOrInterfaceDeclarationCountDiagnostics(checker *sema.Checker) []protocol.Diagnostic {
var diagnostics []protocol.Diagnostic

Expand Down
17 changes: 8 additions & 9 deletions languageserver/integration/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ import (
"os"
"path/filepath"

"github.com/onflow/flow-cli/flowkit/accounts"
"github.com/onflow/flow-cli/flowkit/transactions"

"github.com/onflow/cadence"
"github.com/onflow/flow-cli/flowkit"
"github.com/onflow/flow-cli/flowkit/config"
"github.com/onflow/flow-cli/flowkit/gateway"
"github.com/onflow/flow-cli/flowkit/output"
"github.com/onflow/flow-go-sdk"
"github.com/onflow/flow-go-sdk/crypto"
"github.com/onflow/flowkit/v2"
"github.com/onflow/flowkit/v2/accounts"
"github.com/onflow/flowkit/v2/config"
"github.com/onflow/flowkit/v2/gateway"
"github.com/onflow/flowkit/v2/output"
"github.com/onflow/flowkit/v2/transactions"
)

//go:generate go run github.com/vektra/mockery/cmd/mockery --name flowClient --filename mock_flow_test.go --inpkg
Expand Down Expand Up @@ -233,7 +232,7 @@ func (f *flowkitClient) DeployContract(
// Changes in https://github.com/onflow/flow-cli/pull/1247 add contracts
// to the state when AddContract is called, but this causes an error to
// be thrown here because LS-managed accounts are not in the state.
//
//
// This code adds the account to the state before deploying the contract
f.state.getState().Accounts().AddOrUpdate(signer)

Expand Down Expand Up @@ -390,7 +389,7 @@ func (f *flowkitClient) createSigner(address flow.Address) (*accounts.Account, e
return &accounts.Account{
Address: address,
Key: accountKey,
Name: fmt.Sprintf("%s [LS]", account.Name),
Name: fmt.Sprintf("%s [LS]", account.Name),
}, nil
}

Expand Down
28 changes: 14 additions & 14 deletions languageserver/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/onflow/cadence/runtime/sema"

"github.com/onflow/flow-cli/flowkit"
"github.com/onflow/flowkit/v2"
"github.com/spf13/afero"

"github.com/onflow/cadence-tools/languageserver/protocol"
Expand All @@ -36,16 +36,16 @@ func NewFlowIntegration(s *server.Server, enableFlowClient bool) (*FlowIntegrati
state := newFlowkitState(loader)

integration := &FlowIntegration{
entryPointInfo: map[protocol.DocumentURI]*entryPointInfo{},
contractInfo: map[protocol.DocumentURI]*contractInfo{},
enableFlowClient: enableFlowClient,
loader: loader,
state: state,
entryPointInfo: map[protocol.DocumentURI]*entryPointInfo{},
contractInfo: map[protocol.DocumentURI]*contractInfo{},
enableFlowClient: enableFlowClient,
loader: loader,
state: state,
}

resolve := resolvers{
loader: loader,
state: state,
state: state,
}

options := []server.Option{
Expand Down Expand Up @@ -81,13 +81,13 @@ func NewFlowIntegration(s *server.Server, enableFlowClient bool) (*FlowIntegrati
}

type FlowIntegration struct {
entryPointInfo map[protocol.DocumentURI]*entryPointInfo
contractInfo map[protocol.DocumentURI]*contractInfo
entryPointInfo map[protocol.DocumentURI]*entryPointInfo
contractInfo map[protocol.DocumentURI]*contractInfo

enableFlowClient bool
client flowClient
state *flowkitState
loader flowkit.ReaderWriter
enableFlowClient bool
client flowClient
state *flowkitState
loader flowkit.ReaderWriter
}

func (i *FlowIntegration) initialize(initializationOptions any) error {
Expand Down Expand Up @@ -117,7 +117,7 @@ func (i *FlowIntegration) initialize(initializationOptions any) error {
}

// If client is enabled, initialize the client
if (i.enableFlowClient) {
if i.enableFlowClient {
numberOfAccountsString, ok := optsMap["numberOfAccounts"].(string)
if !ok || numberOfAccountsString == "" {
return errors.New("initialization options: invalid account number value, should be passed as a string")
Expand Down
2 changes: 1 addition & 1 deletion languageserver/integration/mock_state_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions languageserver/integration/resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (

"github.com/onflow/cadence/runtime/common"
"github.com/onflow/cadence/runtime/sema"
"github.com/onflow/flow-cli/flowkit"
"github.com/onflow/flow-cli/flowkit/config"
"github.com/onflow/flow-go-sdk"
"github.com/onflow/flowkit/v2"
"github.com/onflow/flowkit/v2/config"
)

type resolvers struct {
Expand Down
4 changes: 2 additions & 2 deletions languageserver/integration/resolvers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func Test_SimpleImport(t *testing.T) {
mock := &mockFlowState{}
resolver := resolvers{
loader: af,
state: mock,
state: mock,
}

mock.On("GetCodeByName", "Test").Return(code, nil)
Expand All @@ -131,4 +131,4 @@ func Test_SimpleImport(t *testing.T) {
assert.EqualError(t, err, "couldn't find the contract by import identifier: Foo")
assert.Empty(t, resolved)
})
}
}
Loading

0 comments on commit ad5932e

Please sign in to comment.