fix(lsp): use HashiCorp releases API for installing terraform-ls by edubxb · Pull Request #14200 · anomalyco/opencode

bun dev debug lsp diagnostics /tmp/instance.tf --print-logs                                                                                                 
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