Compile Time Code Weaving in Go, Large Systems Debugging/Profiling
summary
Describes a compile-time AST rewriter called go-weave plus an examples repo (loom) that injects code into binaries rather than at runtime, using generated temp files and go/ast. Demonstrated usages: compile-time code weaving to time every QueryRow across a codebase, log panics from every goroutine, add validations or auth checks, and wrap calls before/after execution; it preserves aspect order, can operate recursively from a root directory, and warns about variable shadowing while offering reference tracking to avoid collisions.
AI-written summary · about
chapters (7)
- 0:00Introduction to talk
- 1:52Why Go needs code weaving
- 4:45Aspect-oriented programming basics
- 9:26Use cases for aspect weaving
- 11:15Practical examples of aspects
- 14:48GoWeave and Loom repositories
- 15:57Q&A session
related talks
22mDynamic Go Instrumentation for Production Environments
31mAdvancing Observability With Compile-Time Auto-Instrumentation in Golang
16mTools for working with Go Code
43mDebugging Code Generation in Go
16mLightning Talks
33mThe What's, Why's, and How's of Running WebAssembly in Go
19mService Weaver: A Framework for Writing Distributed Systems
39mIs Go A Good Language to Build Compilers?
