Add Go VS Code extension by default, DRY the extensions list - #191
Merged
Conversation
…ross templates Enables golang.go by default in all three templates and pre-installs gopls via Homebrew alongside the existing go/golangci-lint so the extension doesn't need to fetch it on first use. The vscode_extensions variable was identical in all three template.tf files. Extracted it into shared/vscode-extensions.tf, vendored into each template directory the same way modules/claude-remote-control already is (coder templates push and CI only ever see one template directory, so a relative ../shared reference wouldn't survive. make push-template-* / validate / test-templates now depend on a new sync-shared target so the vendoring happens automatically. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> EOF )
|
…edocs An inline gh pr create --body heredoc containing an apostrophe broke shell quoting earlier in this session. Document git commit -F / gh pr create --body-file as the standard instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Coder pins the submitted value of any root-level Terraform `variable` the first time a template is pushed, and reuses that pinned value on later pushes instead of re-reading the .tf file's default unless --variable is passed again. vscode_extensions was a `variable`, so adding golang.go to its default had no effect on real builds: verified on staging that a workspace built from the updated template still rejected "golang.go" as an invalid option, even with the parameter value passed explicitly. Switch shared/vscode-extensions.tf from a `variable` to a `locals` block (recomputed fresh every plan, nothing for Coder to pin) and update the var.vscode_extensions references to local.vscode_extensions in all three templates. Verified by pushing freeform as an inactive staging version and creating a disposable workspace pinned to it: golang.go was accepted and installed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
golang.goVS Code extension by default in all three templates, and pre-installgoplsvia Homebrew (alongside the existinggo/golangci-lint) so it's ready without the extension fetching it on first use.vscode_extensionsvariable was byte-for-byte identical acrossdrupal-core,drupal-contrib, andfreeform. Extracted it intoshared/vscode-extensions.tf, vendored into each template directory the same waymodules/claude-remote-controlalready is —coder templates pushand CI'sterraform validate/testonly ever see a single template directory, so a relative../sharedreference wouldn't survive.sync-sharedMakefile target (wrapssync-claude-module+ newsync-vscode-extensions) thatmake validate,make test-templates, and everymake push-template-*/push-all-templatestarget now depend on, so vendoring happens automatically — no manual step.CLAUDE.md, including why the vendored copies must stay committed (CI validates each template directory standalone, with nomakestep).Test plan
terraform fmt -check -recursivemake validate(init + validate for all three templates)make test-templates(terraform testfor all three templates, all passing).gofile in VS Code for Web and confirmgoplsis found without a prompt to auto-install🤖 Generated with Claude Code