Skip to content

fix(templated_uri): re-export macro support traits via __private#476

Merged
martintmk merged 6 commits into
mainfrom
fix/templated-uri-reexport-data-privacy
Jun 5, 2026
Merged

fix(templated_uri): re-export macro support traits via __private#476
martintmk merged 6 commits into
mainfrom
fix/templated-uri-reexport-data-privacy

Conversation

@martintmk
Copy link
Copy Markdown
Member

@martintmk martintmk commented Jun 4, 2026

Macro-generated code now references RedactedDisplay and Redactor through templated_uri::__private instead of data_privacy directly, so downstream crates using the templated macro no longer need a direct data_privacy dependency.

This also moves the hidden http re-export into templated_uri::__private, and updates macro-generated PathAndQuery references accordingly.

Macro-generated code now references RedactedDisplay and Redactor via the templated_uri re-export instead of data_privacy directly, so downstream crates using the templated macro no longer need a direct data_privacy dependency. This mirrors the existing http re-export.
@martintmk martintmk marked this pull request as ready for review June 4, 2026 18:58
Copilot AI review requested due to automatic review settings June 4, 2026 18:58
Copy link
Copy Markdown
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 adjusts templated_uri’s public surface to re-export the data_privacy traits that the templated proc-macro expansion relies on, so downstream crates using #[templated] don’t need to depend on data_privacy directly (mirroring the existing http re-export pattern).

Changes:

  • Re-export data_privacy::{RedactedDisplay, Redactor} from templated_uri (doc-hidden) for macro-generated code.
  • Update macro implementation to reference ::templated_uri::{RedactedDisplay, Redactor} rather than ::data_privacy::{...}.
  • Refresh macro expansion snapshots and align documentation imports accordingly.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/templated_uri/src/lib.rs Re-exports RedactedDisplay/Redactor (doc-hidden) to support macro-generated code without downstream data_privacy deps.
crates/templated_uri/src/_documentation/recipes.rs Drops direct import of RedactedDisplay from data_privacy in the docs module context.
crates/templated_uri_macros_impl/src/struct_template.rs Updates generated impls/UFCS calls to use ::templated_uri::{RedactedDisplay, Redactor}.
crates/templated_uri_macros_impl/src/enum_template.rs Updates generated impls to use ::templated_uri::{RedactedDisplay, Redactor}.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__templated_uri_impl.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__templated_unredacted_uri_impl.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__template_enum_impl.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__query_param_is_kv_expansion.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__optional_reference_field_codegen.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__optional_field_with_unredacted_codegen.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__optional_field_codegen.snap Snapshot update reflecting new ::templated_uri trait paths.
crates/templated_uri_macros_impl/src/snapshots/templated_uri_macros_impl__tests__field_level_unredacted.snap Snapshot update reflecting new ::templated_uri trait paths.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (877def3) to head (31d9414).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #476   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         335      335           
  Lines       25586    25586           
=======================================
  Hits        25586    25586           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread crates/templated_uri/src/lib.rs Outdated
Comment thread crates/templated_uri/src/lib.rs Outdated
Copilot AI review requested due to automatic review settings June 5, 2026 08:53
@martintmk martintmk review requested due to automatic review settings June 5, 2026 08:53
Copilot AI review requested due to automatic review settings June 5, 2026 09:01
Copy link
Copy Markdown
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

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Comment thread crates/templated_uri/src/lib.rs
Comment thread crates/templated_uri/src/_documentation/recipes.rs
Copilot AI changed the title fix(templated_uri): re-export data_privacy traits fix(templated_uri): re-export macro support traits via __private Jun 5, 2026
Copilot AI review requested due to automatic review settings June 5, 2026 09:46
Copy link
Copy Markdown
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

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Comment thread crates/templated_uri/src/lib.rs
@martintmk martintmk enabled auto-merge (squash) June 5, 2026 10:05
@martintmk martintmk merged commit 80bbf15 into main Jun 5, 2026
32 checks passed
@martintmk martintmk deleted the fix/templated-uri-reexport-data-privacy branch June 5, 2026 11:06
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.

7 participants