Skip to content

feat: enhance platform support and error handling in WeasyPrint initi… - #79

Merged
berthertogen merged 4 commits into
mainfrom
feature/copilot-passthrough
Apr 18, 2026
Merged

feat: enhance platform support and error handling in WeasyPrint initi…#79
berthertogen merged 4 commits into
mainfrom
feature/copilot-passthrough

Conversation

@berthertogen

Copy link
Copy Markdown
Owner

…alization

closes #78

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enhances the Weasyprint.Wrapped initialization and execution flow to be safer across platforms and more resilient, aligning with Issue #78’s goals around argument handling, initialization robustness, and platform support.

Changes:

  • Added guarded, more explicit initialization with better error messaging and runtime-binary validation.
  • Reworked CLI argument construction to use structured argument building instead of interpolated strings.
  • Improved integration tests to assert PDF “shape” and avoid writing expected artifacts during test runs; added a missing-asset init test.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Weasyprint.Wrapped/Printer.cs Adds init locking + improved init errors; structured argument building; explicit OS handling and runtime executable discovery helpers.
src/Weasyprint.Wrapped/Exceptions/InitializeException.cs Adds message + inner-exception constructors to support better init error reporting.
src/Weasyprint.Wrapped/Configuration/ConfigurationProvider.cs Throws on unsupported OS rather than defaulting to Linux asset selection.
src/Weasyprint.Wrapped.Tests/Tests/PrinterTests.cs Strengthens assertions (PDF header checks), removes side-effect writes, adds missing-asset init test.
AGENTS.md Adds repo-level operational/documentation map for contributors/agents.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Weasyprint.Wrapped/Printer.cs
Comment thread src/Weasyprint.Wrapped.Tests/Tests/PrinterTests.cs Outdated
Comment thread src/Weasyprint.Wrapped/Printer.cs Outdated
Comment thread src/Weasyprint.Wrapped/Printer.cs
berthertogen and others added 3 commits April 18, 2026 21:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@berthertogen
berthertogen merged commit 652041f into main Apr 18, 2026
6 checks passed
@berthertogen
berthertogen deleted the feature/copilot-passthrough branch April 18, 2026 19:58
@berthertogen
berthertogen restored the feature/copilot-passthrough branch April 18, 2026 19:59
@berthertogen
berthertogen deleted the feature/copilot-passthrough branch April 18, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Highest-Impact Improvements

3 participants