Skip to content

Conversation

@jerrykingxyz
Copy link
Contributor

@jerrykingxyz jerrykingxyz commented Dec 25, 2025

Summary

Rspack_cacheable merge SerializeError and DeserializeError into Error enum. It helps to encapsulate some utility methods used in the serialization and deserialization processes.

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 25, 2025 06:17
@netlify
Copy link

netlify bot commented Dec 25, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit fbf3ec9
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/694cd6e77be9c90008a5d939
😎 Deploy Preview https://deploy-preview-12556--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added release: refactor team The issue/pr is created by the member of Rspack. labels Dec 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the rspack_cacheable crate by merging the separate SerializeError and DeserializeError types into a single unified Error type. This simplification reduces code duplication and provides a more consistent error handling interface.

  • Created a new error.rs module with a unified Error enum containing all error variants from both previous error types
  • Updated all trait signatures and implementations to use the new Error type and Result<T> type alias
  • Removed duplicate error type definitions from serialize and deserialize modules

Reviewed changes

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

Show a summary per file
File Description
crates/rspack_cacheable/src/error.rs New module containing the unified Error enum with all variants and a Result type alias
crates/rspack_cacheable/src/lib.rs Updated exports to expose Error and Result instead of SerializeError and DeserializeError
crates/rspack_cacheable/src/serialize.rs Removed SerializeError definition, uses Error from error module
crates/rspack_cacheable/src/deserialize.rs Removed DeserializeError definition, uses Error from error module
crates/rspack_cacheable/src/context.rs Updated method signatures to use unified Error type
crates/rspack_cacheable/src/with/*.rs Updated converter trait signatures to use Result type alias
crates/rspack_cacheable/src/with/as_preset/*.rs Updated preset implementations to use unified Error type
crates/rspack_cacheable/src/dyn/*.rs Updated dynamic trait implementations to use unified Error type
crates/rspack_cacheable_macros/src/*.rs Updated generated code to reference unified Error type
crates/rspack_cacheable_test/tests/with/*.rs Updated test implementations to use new error types (missing Result imports)
crates/rspack_cacheable_test/tests/context.rs Updated test implementations to use new error types (missing Result import)
crates/rspack_cacheable_test/tests/macro/*.rs Updated test implementations to use unified Error type
crates/rspack_regex/src/lib.rs Updated AsStringConverter implementation to use unified Error type
crates/rspack_core/src/module_profile.rs Updated CustomConverter implementation to use unified Error type
crates/rspack_core/src/cache/persistent/occasion/make/module_graph.rs Updated error pattern matching to use unified CacheableError

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

@github-actions
Copy link
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 1 project with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB 0
react-1k 823.4 KB 0
react-5k 2.7 MB 0
rome 984.3 KB 0
ui-components 2.1 MB +474.0 B (0.0%)
📋 Detailed Reports (Click to expand)

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

📌 Baseline Commit: f809e340b7 | PR: #12553

Metric Current Baseline Change
📊 Total Size 2.1 MB 2.1 MB +474.0 B (0.0%)
📄 JavaScript 2.0 MB 2.0 MB +474.0 B (0.0%)
🎨 CSS 83.0 KB 83.0 KB 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: ui-components Bundle Diff

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing fbf3ec9 to chore(deps): update dependency @rslib/core to v0.18.6 (#12553) by renovate[bot]

🎉 Size decreased by 768bytes from 47.91MB to 47.91MB (⬇️0.00%)

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 25, 2025

CodSpeed Performance Report

Merging #12556 will not alter performance

Comparing jerry/cacheable (fbf3ec9) with main (f809e34)

Summary

✅ 16 untouched
⏩ 1 skipped1

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@jerrykingxyz jerrykingxyz merged commit a676671 into main Dec 26, 2025
89 of 91 checks passed
@jerrykingxyz jerrykingxyz deleted the jerry/cacheable branch December 26, 2025 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: refactor team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants