This release makes several key improvements to the PDF generation functionality:
- Refactor WebViewPool using Dependencies framework and a proper Swift actor
to better handle concurrency and resource sharing - Fix the task processing in PDF generation to properly run tasks concurrently
instead of waiting for each one to complete - Add proper error handling and resource cleanup in WebView operations
- Improve test reliability with better cleanup and verification
- Add documentation about WebKit process assertion warnings in README
These changes fix issues with concurrent PDF processing where tests would hang
or fail when generating multiple PDFs simultaneously. The actor-based approach
provides better isolation and safer state management for the WebView pool.
Technical details:
- Added swift-dependencies package for dependency injection
- Created WebViewPoolActor with proper isolation and continuation handling
- Fixed resource leaks by ensuring WebView release in error cases
- Added explanation for WebKit assertion warnings in non-UI contexts
Full Changelog: 0.3.0...0.4.0