Skip to content

Commit

Permalink
Support Expression Extensions (hashicorp#1089)
Browse files Browse the repository at this point in the history
In hashicorp/hcl-lang#134 we now pass the context down to the decoder if using Hover or SemanticTokens.

Updated hcl-lang and terraform-schema references.
  • Loading branch information
jpogran authored Oct 18, 2022
1 parent 21cf207 commit 8143f86
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ require (
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/go-version v1.6.0
github.com/hashicorp/hc-install v0.4.0
github.com/hashicorp/hcl-lang v0.0.0-20220823151539-1fce4f11c137
github.com/hashicorp/hcl-lang v0.0.0-20221014125844-7eceda07a779
github.com/hashicorp/hcl/v2 v2.14.1
github.com/hashicorp/terraform-exec v0.17.3
github.com/hashicorp/terraform-json v0.14.0
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c
github.com/hashicorp/terraform-schema v0.0.0-20221012150949-418ecbd2378f
github.com/hashicorp/terraform-schema v0.0.0-20221018140729-4380e150ec9f
github.com/mh-cbon/go-fmt-fail v0.0.0-20160815164508-67765b3fbcb5
github.com/mitchellh/cli v1.1.4
github.com/mitchellh/go-homedir v1.1.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ github.com/hashicorp/hc-install v0.4.0 h1:cZkRFr1WVa0Ty6x5fTvL1TuO1flul231rWkGH9
github.com/hashicorp/hc-install v0.4.0/go.mod h1:5d155H8EC5ewegao9A4PUTMNPZaq+TbOzkJJZ4vrXeI=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/hcl-lang v0.0.0-20220823151539-1fce4f11c137 h1:PdOsf6eIhzEq6k1h5ZL9DQ87WN8KTBHmdxD8mG8nTC8=
github.com/hashicorp/hcl-lang v0.0.0-20220823151539-1fce4f11c137/go.mod h1:Ev8KD37pqUW9duG1sKiGUnDZTf93cHm0O5ndFEY7Zgw=
github.com/hashicorp/hcl-lang v0.0.0-20221014125844-7eceda07a779 h1:xzrUeFJXnrQ3U7sNrPLdtY8d2kmYr1BqY8X2fCagsl0=
github.com/hashicorp/hcl-lang v0.0.0-20221014125844-7eceda07a779/go.mod h1:olv+pM633vw0rXvyHIPjw62ur/FNqqNV7b5TfSxLY6E=
github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34=
github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0=
github.com/hashicorp/terraform-exec v0.17.3 h1:MX14Kvnka/oWGmIkyuyvL6POx25ZmKrjlaclkx3eErU=
Expand All @@ -226,8 +226,8 @@ github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e
github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM=
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c h1:D8aRO6+mTqHfLsK/BC3j5OAoogv1WLRWzY1AaTo3rBg=
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c/go.mod h1:Wn3Na71knbXc1G8Lh+yu/dQWWJeFQEpDeJMtWMtlmNI=
github.com/hashicorp/terraform-schema v0.0.0-20221012150949-418ecbd2378f h1:WTKUS67a+uv2FNadSKSpbAluQEwEnT3AI/jowfNwuYc=
github.com/hashicorp/terraform-schema v0.0.0-20221012150949-418ecbd2378f/go.mod h1:3rsW13O6EbVKChpSLioPONkF1oqYx+yOe5ztEfBaL8A=
github.com/hashicorp/terraform-schema v0.0.0-20221018140729-4380e150ec9f h1:hGWeRSMdSlO2dRRHirPdarFwi1wny2WCiZ8N5o1XU8c=
github.com/hashicorp/terraform-schema v0.0.0-20221018140729-4380e150ec9f/go.mod h1:ko/oWyhqmI90MRY805bgmTrHheIpZeK/DgV7PXYvelI=
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0=
github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg=
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
Expand Down
2 changes: 1 addition & 1 deletion internal/langserver/handlers/hover.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (svc *service) TextDocumentHover(ctx context.Context, params lsp.TextDocume
}

svc.logger.Printf("Looking for hover data at %q -> %#v", doc.Filename, pos)
hoverData, err := d.HoverAtPos(doc.Filename, pos)
hoverData, err := d.HoverAtPos(ctx, doc.Filename, pos)
svc.logger.Printf("received hover data: %#v", hoverData)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion internal/langserver/handlers/semantic_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (svc *service) TextDocumentSemanticTokensFull(ctx context.Context, params l
return tks, err
}

tokens, err := d.SemanticTokensInFile(doc.Filename)
tokens, err := d.SemanticTokensInFile(ctx, doc.Filename)
if err != nil {
return tks, err
}
Expand Down

0 comments on commit 8143f86

Please sign in to comment.