Skip to content

Conversation

@dodomorandi
Copy link
Contributor

@dodomorandi dodomorandi commented Jun 10, 2025

Just one doubt: should we also provide access to std through $crate::__private? EDIT: ok, used the private module for the std as well.

Fixes #8

/// Gets the actual [`Uuid`].
///
/// [`Uuid`]: ::uuid::Uuid
/// [`Uuid`]: $crate::__private::uuid::Uuid
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be pointing at ::uuid::Uuid given that it's just docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked this, it works flawlessly -- probably rustdoc is able to check that it should point to the original crate instead of the private module.

This is a screenshot of the doc of a dummy crate that only imports benzina (and it does not declare uuid in the deps)
Screenshot

@paolobarbolini
Copy link
Member

This will need to be rebased on top of main before it can be merged.

@dodomorandi dodomorandi force-pushed the fix-crate-paths branch 2 times, most recently from 24d0c43 to 6a59f8d Compare June 11, 2025 13:23
In this way the macro works even if one of the crates is renamed to
something else in the project that is using benzina.
We discovered that the derive macros of diesel tries to use the `diesel`
crate name, which could have been omitted or renamed. Manually
implementing the traits we can use our private path.
@paolobarbolini paolobarbolini merged commit 131a73d into M4SS-Code:main Jun 11, 2025
8 checks passed
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.

Use private modules to access external crates

2 participants