Skip to content

Conversation

@GabrielePicco
Copy link
Contributor

@GabrielePicco GabrielePicco commented Dec 18, 2025

Summary by CodeRabbit

  • Refactor
    • Restructured error handling configuration to ensure the error module is now available across all build configurations, improving consistency in error availability.

✏️ Tip: You can customize this high-level summary in your review settings.

@GabrielePicco GabrielePicco merged commit 1bcaf4d into main Dec 18, 2025
1 check passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The PR modifies feature-gating for the error module. It unconditionally exports the error module while adding a conditional conversion implementation from DlpError to pinocchio::program_error::ProgramError under the cfg(not(feature = "sdk")) guard.

Changes

Cohort / File(s) Summary
Error module feature-gating
src/lib.rs, src/error.rs
Removed #[cfg(not(feature = "sdk"))] from error module declaration in lib.rs, exposing the error module unconditionally. Added impl From<DlpError> for pinocchio::program_error::ProgramError under #[cfg(not(feature = "sdk"))] in error.rs, returning pinocchio::program_error::ProgramError::Custom(e as u32).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify the feature-gating logic is intentional: why unconditionally export the error module but conditionally gate the ProgramError conversion impl
  • Ensure the change doesn't introduce unintended compilation issues when the "sdk" feature is enabled or disabled
  • Confirm compatibility with existing code that may have relied on the previous conditional export

Possibly related PRs

Suggested reviewers

  • snawaz
  • taco-paco
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch picco/add-errors-to-sdk

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e3e3ac and 4e63aeb.

📒 Files selected for processing (2)
  • src/error.rs (1 hunks)
  • src/lib.rs (0 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants