# Kida 0.2.1 URL: /releases/0.2.1/ Section: releases Tags: release, changelog, partial-eval, dead-code, compiler Date: 2026-02-14 -------------------------------------------------------------------------------- v0.2.1 Released: February 14, 2026 Compiler improvements: dead code elimination for provably constant branches, and filter/pipeline partial evaluation when static_context is provided. Highlights Dead code elimination — Const-only pass removes branches whose conditions are provably constant Filter partial evaluation — Pure filters evaluated at compile time when static_context is available Scoping preserved — Skips inlining when block-scoped nodes (Set, Let, Capture, Export) are present Added Dead Code Elimination A const-only pass removes branches whose conditions are provably constant at compile time: {% if false %} This block is never emitted {% end %} {% if 1+1==2 %} This block is always emitted (condition folded away) {% end %} Runs without static_context — no runtime data needed Skips inlining when the body contains block-scoped nodes (Set, Let, Capture, Export) to preserve scoping semantics Reduces bytecode size and eliminates unreachable branches Filter/Pipeline Partial Evaluation When static_context is provided, the partial evaluator now evaluates Filter and Pipeline nodes for pure filters: {{ site.title | default("Home") }} {{ site.title | upper }} Uses built-in pure filters plus Environment.pure_filters Static expressions become literal strings in bytecode Eliminates per-render dictionary lookups for site-wide constants Upgrade Guide No breaking changes — All existing templates continue to work unchanged Optional optimization — Provide static_context when compiling to enable filter partial evaluation Dead code removal — Templates with {% if false %} or similar will have those branches stripped automatically Links PyPI GitHub Full Changelog -------------------------------------------------------------------------------- Metadata: - Word Count: 236 - Reading Time: 1 minutes