Skip to content

Version 0.5.0 release - GET9

Choose a tag to compare

@kokic kokic released this 24 Feb 09:33

Commit range: adda0a4..c7eeb32

Highlights

  • serve now uses a watcher-driven incremental compile path (dirty-set), significantly reducing rebuild scope and file writes.
  • Hot reload is decoupled from kodama.json and now uses an independent kodama.reload marker file.
  • build and serve now share unified output flags, with explicit toggles for kodama.json and kodama.graph.json.
  • Compile and global environment paths continue removing panic-prone flows, with error propagation unified around eyre.
  • Artifact/cache consistency improved: stale slug outputs are cleaned, and disabled outputs are removed.

Behavior changes and migration notes

  • serve no longer emits kodama.json / kodama.graph.json by default; enable them with --indexes and --graph.
  • build and serve both support unified output controls: --indexes / --no-indexes, and --graph / --no-graph.
  • Live reload polling now targets kodama.reload instead of relying on Last-Modified from kodama.json.

Features and improvements

  • Added config hot reload with automatic server process restart in serve.
  • Expanded serve watch coverage to import fragments, themes, and assets directories.
  • Added optional graph/index artifact generation for both build and serve modes.
  • Added assets mirroring plus stale output cleanup.
  • Restored and improved page structure capabilities: parent, transparent backlinks, and font/style fixes.

Performance

  • Optimized render string concatenation paths to avoid repeated reduce-style joins.
  • serve writes only slugs affected by dirty sources instead of rewriting everything.
  • Writer hash path now uses relative paths to reduce unnecessary rewrites.

Stability and error handling

  • Added cyclic embed recursion detection and blocking.
  • Replaced multiple panic paths with recoverable errors (core/build/compiler/typst/environment).
  • Improved metadata and typst parse errors with slug/key context.
  • kodama.reload write is now atomic (temp file + rename) to lower concurrent read/write conflicts.
  • Missing optional watch paths are downgraded to hints with a unified logging style.

Code organization and naming

  • Replaced custom ordered map implementation with indexmap.
  • Renamed ShallowSection to UnresolvedSection for clearer compile-stage semantics.
  • Unified multiple predicate/state names (for example no_cache_enabled, should_ignore_*).
  • Simplified path split implementation to parent().zip(file_name()) by @s-cerevisiae.

Testing and testability

  • Made serve hot reload and watch logic unit-testable with dedicated tests.
  • Added typst HTML body extraction tests for error paths.
  • Added regression tests for new behaviors (output controls, marker writes, logging, and path handling).

Full commit list

  • c7eeb32 refactor(cli): update file paths for typst includes and remove obsolete files
  • 32eccfe fix(section): improve error messages for missing metadata in UnresolvedSection
  • 930b8c6 refactor(compiler): rename ShallowSection to UnresolvedSection
  • 57053ab refactor(naming): improve predicate and cache flag naming consistency
  • ea74c78 style(serve): normalize watch path logs to posix separators
  • ded5a7e fix(serve): make reload marker atomic and clean disabled artifacts
  • 01b777d refactor(cli): unify build/serve output flags with shared controls
  • e69c6a0 refactor(path): simplify split_file_name with parent/file_name zip
  • 42c829a feat(serve): decouple reload marker and disable index outputs by default
  • 1d6f7ad feat(typst): duplicate content for enhanced structure and clarity
  • 70915c7 feat(serve): enhance watch paths to include assets directory feat(kodama): update compatibility checks and improve HTML element rendering
  • 5072628 style(serve): render optional watch hints with dim text
  • 5f2e628 fix(serve): downgrade missing optional import watch paths to hint
  • 28e3e25 feat(compile): add optional graph/index artifact outputs
  • 9c80ab6 fix(compiler): clean stale slug artifacts from cache and output
  • ff60b48 perf(serve): write only slugs affected by dirty sources
  • 5ae98d3 feat(serve): use watcher dirty-set for incremental parse
  • cbd6975 chore: bump version from 0.4.5 to 0.5.0 in Cargo files
  • f861daf fix(compiler): finalize error propagation and remove exit helper
  • 289792e refactor(compiler): enhance error handling with eyre for metadata retrieval
  • 1aeed68 refactor(env): remove panic paths from global environment state
  • bc3b9c8 fix(core): remove panic-prone unwrap/expect in compile path
  • fdda56e fix(tests): update theme path from CSS to HTML in test setup
  • d58c1ae test(serve): make hot-reload logic unit-testable
  • c9f29ac fix(typst): make html parser return recoverable errors
  • 8dd56f4 test(typst): cover html body extraction error cases
  • 835e497 fix(metadata): add slug/key context to parse errors
  • 374a1b7 feat(assets): mirror source and prune stale output files
  • cdf29ed refactor(core): replace custom ordered map with indexmap
  • e75f438 fix(typst): replace panic paths with recoverable errors
  • a050077 feat(serve): hot-reload import fragments and themes
  • 48f299a feat(serve): hot-reload config and restart server process
  • d45a3a3 perf(render): avoid repeated string reduce concatenations
  • 1fe743f fix(build): remove panic paths in compile/write flow
  • 7cc666d fix(core): harden path and editor-url error handling
  • aaef49e fix(serve): debounce watch rebuilds and harden IO
  • 844a348 fix(writer): hash output by relative path
  • 8d9ab7d fix(compiler): detect cyclic embed recursion
  • f53f19a fix: remove redundant font-size declaration for html in responsive styles
  • f15e862 feat: transparent backlinks
  • c4ad796 fix: tolerant some error in serve mode
  • 3f58071 feat: parent comes back
  • c71baad feat: font "inria sans" came back