Skip to content

fix(lsp): use HashiCorp releases API for installing terraform-ls#14200

Merged
rekram1-node merged 1 commit intoanomalyco:devfrom
edubxb:fix-terraform-ls-install
Feb 18, 2026
Merged

fix(lsp): use HashiCorp releases API for installing terraform-ls#14200
rekram1-node merged 1 commit intoanomalyco:devfrom
edubxb:fix-terraform-ls-install

Conversation

@edubxb
Copy link
Contributor

@edubxb edubxb commented Feb 18, 2026

What does this PR do?

Fixes #11756 by using the HashiCorp releases API instead of GitHub.

How did you verify your code works?

I tested the changes in a Linux machine by running:

bun dev debug lsp diagnostics /tmp/instance.tf --print-logs                                                                                                 

Output:

INFO  2026-02-18T21:34:18 +250ms service=default version=local args=["debug","lsp","diagnostics","/tmp/instance.tf","--print-logs"] opencode
INFO  2026-02-18T21:34:18 +0ms service=default directory=/home/edubxb/Area51/floss/opencode/packages/opencode creating instance
INFO  2026-02-18T21:34:18 +1ms service=project directory=/home/edubxb/Area51/floss/opencode/packages/opencode fromDirectory
INFO  2026-02-18T21:34:18 +8ms service=db path=/home/edubxb/.local/share/opencode/opencode.db opening database
INFO  2026-02-18T21:34:18 +4ms service=db count=3 mode=dev applying migrations
INFO  2026-02-18T21:34:18 +21ms service=default directory=/home/edubxb/Area51/floss/opencode/packages/opencode bootstrapping
INFO  2026-02-18T21:34:18 +4ms service=config path=/home/edubxb/.config/opencode/config.json loading
INFO  2026-02-18T21:34:18 +1ms service=config path=/home/edubxb/.config/opencode/opencode.json loading
INFO  2026-02-18T21:34:18 +0ms service=config path=/home/edubxb/.config/opencode/opencode.jsonc loading
DEBUG 2026-02-18T21:34:18 +2ms service=config loading config from /home/edubxb/Area51/floss/opencode/.opencode/opencode.jsonc
INFO  2026-02-18T21:34:18 +0ms service=config path=/home/edubxb/Area51/floss/opencode/.opencode/opencode.jsonc loading
DEBUG 2026-02-18T21:34:18 +5ms service=config loading config from /home/edubxb/Area51/floss/opencode/.opencode/opencode.json
INFO  2026-02-18T21:34:18 +0ms service=config path=/home/edubxb/Area51/floss/opencode/.opencode/opencode.json loading
INFO  2026-02-18T21:34:18 +8ms service=plugin name=CodexAuthPlugin loading internal plugin
INFO  2026-02-18T21:34:18 +1ms service=plugin name=CopilotAuthPlugin loading internal plugin
INFO  2026-02-18T21:34:18 +0ms service=plugin name=gitlabAuthPlugin loading internal plugin
INFO  2026-02-18T21:34:18 +0ms service=plugin path=opencode-anthropic-auth@0.0.13 loading plugin
INFO  2026-02-18T21:34:18 +15ms service=bus type=* subscribing
INFO  2026-02-18T21:34:18 +0ms service=bus type=session.updated subscribing
INFO  2026-02-18T21:34:18 +0ms service=bus type=message.updated subscribing
INFO  2026-02-18T21:34:18 +0ms service=bus type=message.part.updated subscribing
INFO  2026-02-18T21:34:18 +0ms service=bus type=session.diff subscribing
INFO  2026-02-18T21:34:18 +1ms service=format init
INFO  2026-02-18T21:34:18 +0ms service=bus type=file.edited subscribing
INFO  2026-02-18T21:34:18 +0ms service=lsp serverIds=deno, typescript, vue, eslint, oxlint, biome, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, fsharp, sourcekit-lsp, rust, clangd, svelte, astro, jdtls, kotlin-ls, yaml-ls, lua-ls, php intelephense, prisma, dart, ocaml-lsp, bash, terraform, texlab, dockerfile, gleam, clojure-lsp, nixd, tinymist, haskell-language-server, julials enabled LSP servers
INFO  2026-02-18T21:34:18 +0ms service=file.watcher init
INFO  2026-02-18T21:34:18 +2ms service=scheduler id=snapshot.cleanup run
INFO  2026-02-18T21:34:18 +0ms service=scheduler id=tool.truncation.cleanup run
INFO  2026-02-18T21:34:18 +1ms service=bus type=command.executed subscribing
INFO  2026-02-18T21:34:18 +0ms service=file.watcher platform=linux backend=inotify watcher backend
ERROR 2026-02-18T21:34:18 +0ms service=file.watcher error=OPENCODE_LIBC is not defined failed to load watcher binding
INFO  2026-02-18T21:34:18 +1ms service=lsp file=/tmp/instance.tf touching file
INFO  2026-02-18T21:34:18 +2ms service=lsp serverID=terraform spawned lsp server
INFO  2026-02-18T21:34:18 +1ms service=lsp.client serverID=terraform starting client
INFO  2026-02-18T21:34:18 +1ms service=lsp.client serverID=terraform sending initialize
INFO  2026-02-18T21:34:18 +6ms service=vcs branch=fix-terraform-ls-install initialized
INFO  2026-02-18T21:34:18 +0ms service=bus type=file.watcher.updated subscribing
INFO  2026-02-18T21:34:18 +6ms service=lsp.client serverID=terraform initialized
INFO  2026-02-18T21:34:18 +0ms service=bus type=lsp.updated publishing
INFO  2026-02-18T21:34:18 +1ms service=lsp.client serverID=terraform path=/tmp/instance.tf waiting for diagnostics
INFO  2026-02-18T21:34:18 +0ms service=bus type=lsp.client.diagnostics subscribing
INFO  2026-02-18T21:34:18 +0ms service=lsp.client serverID=terraform path=/tmp/instance.tf workspace/didChangeWatchedFiles
INFO  2026-02-18T21:34:18 +0ms service=lsp.client serverID=terraform path=/tmp/instance.tf textDocument/didOpen
INFO  2026-02-18T21:34:18 +28ms service=snapshot prune=7.days cleanup
INFO  2026-02-18T21:34:19 +897ms service=lsp.client serverID=terraform path=/tmp/instance.tf count=2 textDocument/publishDiagnostics
INFO  2026-02-18T21:34:19 +0ms service=bus type=lsp.client.diagnostics publishing
INFO  2026-02-18T21:34:19 +0ms service=lsp.client serverID=terraform path=/tmp count=0 textDocument/publishDiagnostics
INFO  2026-02-18T21:34:19 +0ms service=bus type=lsp.client.diagnostics publishing
INFO  2026-02-18T21:34:19 +150ms service=lsp.client serverID=terraform path=/tmp/instance.tf got diagnostics
INFO  2026-02-18T21:34:19 +0ms service=bus type=lsp.client.diagnostics unsubscribing
INFO  2026-02-18T21:34:19 +1ms service=bus type=lsp.client.diagnostics unsubscribing
{
  "/tmp/instance.tf": [
    {
      "range": {
        "start": {
          "line": 1,
          "character": 18
        },
        "end": {
          "line": 1,
          "character": 26
        }
      },
      "severity": 1,
      "source": "Terraform",
      "message": "No declaration found for \"var.AMIS\""
    },
    {
      "range": {
        "start": {
          "line": 1,
          "character": 27
        },
        "end": {
          "line": 1,
          "character": 41
        }
      },
      "severity": 1,
      "source": "Terraform",
      "message": "No declaration found for \"var.AWS_REGION\""
    }
  ],
  "/tmp": []
}
INFO  2026-02-18T21:34:20 +1002ms service=default directory=/home/edubxb/Area51/floss/opencode/packages/opencode disposing instance
INFO  2026-02-18T21:34:20 +0ms service=state key=/home/edubxb/Area51/floss/opencode/packages/opencode waiting for state disposal to complete
INFO  2026-02-18T21:34:20 +0ms service=lsp.client serverID=terraform shutting down
INFO  2026-02-18T21:34:20 +1ms service=lsp.client serverID=terraform shutdown
INFO  2026-02-18T21:34:20 +0ms service=bus type=file.watcher.updated unsubscribing
INFO  2026-02-18T21:34:20 +0ms service=state key=/home/edubxb/Area51/floss/opencode/packages/opencode state disposal completed

@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@edubxb edubxb force-pushed the fix-terraform-ls-install branch from f01cb2e to bef6343 Compare February 18, 2026 21:40
@edubxb edubxb force-pushed the fix-terraform-ls-install branch from bef6343 to 6fb8d5a Compare February 18, 2026 21:57
@rekram1-node rekram1-node merged commit 87c1637 into anomalyco:dev Feb 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-install of terraform-ls fails due to empty assets

2 participants

Comments