-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support re-export of derive_builder #274
Comments
I think I'm reading that |
Yes, it does. |
It seems that the common solution for this is to expose a #[derive(Builder)]
#[builder(crate = "parol_runtime::derive_builder")] That's how |
Yeah, it seems nice. |
Okay, that seems doable though some help on tests will be appreciated. |
This allows setting the crate root for re-export scenarios. All hardcoded usage of `::derive_builder` in generated code has now been replaced by a `crate_root` variable, which contains the path to use. For backwards compatibility, this defaults to `::derive_builder`. Fixes #274
This allows setting the crate root for re-export scenarios. All hardcoded usage of `::derive_builder` in generated code has now been replaced by a `crate_root` variable, which contains the path to use. For backwards compatibility, this defaults to `::derive_builder`. Fixes #274
This allows setting the crate root for re-export scenarios. All hardcoded usage of `::derive_builder` in generated code has now been replaced by a `crate_root` variable, which contains the path to use. For backwards compatibility, this defaults to `::derive_builder`. Fixes #274
This allows setting the crate root for re-export scenarios. All hardcoded usage of `::derive_builder` in generated code has now been replaced by a `crate_root` variable, which contains the path to use. For backwards compatibility, this defaults to `::derive_builder`. Fixes #274
This is published as part of 0.12.0 |
Background
parol generates code that has several external crates, including derive_builder. And, parol_runtime re-exports the crates for ease of use.
Problem
I know
derive_builder
doesn't support crate renaming, but it also seems not to support re-exporting.So we need a user-confusing workaround in
lib.rs
ormain.rs
as below:Solution
Replace `::derive_builder" with "derive_builder" in generated code.
It may break projects in Rust 2015 edition, and we may need a feature toggle for this behavior.
The text was updated successfully, but these errors were encountered: