-
-
Notifications
You must be signed in to change notification settings - Fork 657
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
update to typed-builder
0.15 (closes #1455)
#1496
Conversation
Okay, this appears to make it impossible for us to update to if field.builder_attr.setter.skip.is_some() {
quote!(let #name = #default;)
} else {
quote!(let #name = ::typed_builder::Optional::into_value(#name, || #default);)
} I'm not aware of any way around this. Do you have any thoughts, @awesomelemonade? |
Doing some research. Likely an issue for typed-builder again. Here are some relevant links: |
Ok figured out a proof of concept patch: For leptos expecting 0.14 typed builder, we can append this to Cargo.toml
https://github.com/awesomelemonade/rust-typed-builder has the patch that would work in this branch. See this commit and this comment |
Looks like this PR is the solution idanarye/rust-typed-builder#111 |
@gbj - before I merge that PR I want to confirm that it works. @awesomelemonade - I understand you already have a version of leptos that points at your fork of Typed Builder with a reversion of the crate split. Can you change that to point at my PR branch instead and confirm that the macro works (once you pass the |
Unfortunately I don't have a fork of leptos ready to test this. I was changing the Cargo.toml to point to my version of typed-builder (mentioned here). I've been real busy with other stuff recently and haven't been working on the leptos project. @gbj do you have time to test this? After changing the code on the leptos side, you should just be able to use the following in Cargo.toml typed-builder = { git = "https://github.com/idanarye/rust-typed-builder", branch = "issue-109-setting-crate_module_path" } You can then confirm you are using 0.15 by confirming that this code compiles (because 0.15 fixes a bug that would make this fail to compile): #[component]
fn InfoGrid<const NUM_ROWS: usize, const NUM_COLS: usize>(
cx: Scope,
data: [[u32; NUM_ROWS]; NUM_COLS],
) -> impl IntoView {
todo!()
} |
Okay, my solution seems to be working. I've released version 0.16 of Typed Builder. |
Restarted this one in #1590. |
closes #1455