You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
psd: use shared borrowed descriptor and block writers - #3949
Continues storytold/craft-libs#786 and storytold/craft-libs#778 with shared borrowed, iterative descriptor writing and exact-byte lfx2, SoCo, SoLd and TySh payload framing. Keeps app descriptor construction, RGB scaling, text/newline policy, EngineData, outer framing and public signatures unchanged. Preserves current main's EXR export work and removes the now-unused crate-private helper/import.
Updated against storytold/effectcraftmain (13e6e6c6) and pinned craft-psd and craft-svg to storytold/craft-libsmain at 08da5e1486ee640de1d2cccd8fe8dd32b1d3b62c (includes merged storytold/craft-libs#2338).
Improved preservation of Photoshop document data when saving and reopening files, including layer effects, solid colors, smart-object transforms, and text layers.
Better handling of descriptor details such as item ordering, duplicate keys, Unicode text, floating-point values, and optional warp data.
No actionable comments were generated in the recent review.
Walkthrough
The PSD crate now uses borrowed descriptor views and craft-psd helpers to serialize descriptors and layer-block payloads. Tests check exact byte encodings and verify that selected payloads survive PSD write/read round trips.
The pinned craft-psd and craft-svg revisions are updated. Descriptor values map to borrowed views and serialize through craft_psd::descriptor::borrowed::append_descriptor. Tests check wire encodings, reference fields, ordering, and borrowing.
This change moves PSD descriptor and layer-block serialization onto shared helpers, with byte-level tests meant to keep the output format the same. No concrete merge-blocking risk was found. Final hosted validation of the dependency pin was reported as still running, so confirm it passes before merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "psd: use shared borrowed descriptor and block writers" matches the main change. The PSD writer now uses craft_psd's borrowed descriptor views, appender, and tagged-data block helpers in pla…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title "psd: use shared borrowed descriptor and block writers" matches the main change. The PSD writer now uses craft_psd's borrowed descriptor views, appender, and tagged-data block helpers in place of the local recursive writer and binary assembly. The title is short, specific, and names the primary change. The summary and objectives both describe this same change.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 13e6e6c and c5c1f48.
Files ignored due to path filters: 1
Cargo.lock is excluded by !**/*.lock
Files selected for processing: 5
Cargo.toml
crates/psd/src/descriptor.rs
crates/psd/src/tests.rs
crates/psd/src/tests/descriptor_framing.rs
crates/psd/src/write.rs
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Continues storytold/craft-libs#786 and storytold/craft-libs#778 with shared borrowed, iterative descriptor writing and exact-byte lfx2, SoCo, SoLd and TySh payload framing. Keeps app descriptor construction, RGB scaling, text/newline policy, EngineData, outer framing and public signatures unchanged. Preserves current main's EXR export work and removes the now-unused crate-private helper/import.
Updated against
storytold/effectcraftmain(13e6e6c6) and pinnedcraft-psdandcraft-svgtostorytold/craft-libsmainat08da5e1486ee640de1d2cccd8fe8dd32b1d3b62c(includes merged storytold/craft-libs#2338).Validation
Local checks on
c5c1f48f:cargo fmt --check: passedcargo check --workspace --locked: passedcargo clippy -p effectcraft-psd -p effectcraft-svg --all-targets --locked -- -D warnings: passedcargo xtask pdf-deps&cargo xtask lock-patches: passedcargo test --locked -p effectcraft-psd: 102 passed, 0 failedcargo test --locked -p effectcraft-svg -- --test-threads=1: 83 passed, 0 failedSummary by CodeRabbit