← Back to list

Day 40 of 45 Days of Well-Architected 2

Added go-to-definition support and optimised the extension package. Navigation features make a huge difference to developer experience —…

Fitz 🦀 · 2026-01-31 12:56 · 0 claps · 1.4 min read
#cloudformation #well-architected #vscode #rust-programming-language #aws
Open on Medium ↗
Wiki topics: CRY · Crypto & Web3 💻 · Programming ☁️ · DevOps & Cloud 🏛️ · Architecture

Day 40 of 45 Days of Well-Architected 2

Added go-to-definition support and optimised the extension package. Navigation features make a huge difference to developer experience — being able to jump from a reference to its definition is table stakes for any serious IDE tool.

Key accomplishments: • Go-to-definition — F12 or Ctrl+Click on !Ref/!GetAtt jumps to resource, parameter, or condition definition • Parser-aware navigation — Leverages existing YAML/JSON parsers for accurate position resolution • Handles CloudFormation patterns — Works with dot notation (!GetAtt Resource.Attribute), intrinsic functions, and tagged nodes • JavaScript bundling — Reduced from 166 separate JS files to 1 bundled file (347KB) • Binary optimisation — Compressed LSP server from 8.3MB to 3.1MB (63% reduction) via release profile tuning • Total package size — Extension now 1.6MB (down from 3.4MB, 52% reduction)

𝐓𝐡𝐞 𝐛𝐢𝐠 𝐥𝐞𝐚𝐫𝐧𝐢𝐧𝐠: Parser position tracking is always tricky. YAML tagged nodes (like !Ref) lose accurate position information in saphyr, requiring special handling to extract the inner string value directly. The solution was simpler than expected — rather than complex range checking, just extract the word at the cursor and look it up in the symbol table. Sometimes the straightforward approach wins.

Go-to-definition is one of those features that feels magical when it works. Click on name anywhere in your template — in a Ref, a GetAtt, even nested inside a Sub variable — and instantly jump to where it’s defined. In my testing with the AWS Toolkit it seems to struggle with this (for example inside !If [Name, value1, value2])

Next: time to show value proposition, bringing intent and explainability into our architecture with WA2. The goal being to demonstrate the core idea enough that people can say if its actually valuable (or get feedback on what would be)

VSCode extension: https://marketplace.visualstudio.com/items?itemName=FigmentEngineLtd.wa2 Github repo: https://github.com/unremarkable-technology/wa2-vscode-extension


메타데이터
post_id
8b5aee8bc0ca
slug
day-40-of-45-days-of-well-architected-2-8b5aee8bc0ca
url
https://medium.com/@fitzxyz/day-40-of-45-days-of-well-architected-2-8b5aee8bc0ca
canonical_url
https://medium.com/@fitzxyz/day-40-of-45-days-of-well-architected-2-8b5aee8bc0ca
author_url
https://medium.com/@fitzxyz
status
ok
fetched_at
2026-06-13 16:00:06