From f60e1b9b8d291ac2ca4f110a3288befd087549c1 Mon Sep 17 00:00:00 2001 From: Mike Manfredi Date: Thu, 3 Oct 2024 16:09:19 +0000 Subject: [PATCH] updating chicken-scratch nodes --- .../rust-service/reference/chicken-scratch.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/psidk/src/development/services/rust-service/reference/chicken-scratch.md b/doc/psidk/src/development/services/rust-service/reference/chicken-scratch.md index 20cbbce45..8d96e77b1 100644 --- a/doc/psidk/src/development/services/rust-service/reference/chicken-scratch.md +++ b/doc/psidk/src/development/services/rust-service/reference/chicken-scratch.md @@ -10,8 +10,7 @@ Note: some doc updates are done here simply because we're more intersted in capt ## Potential Tasks -1. add tests for psibase_macros -2. fix hygiene of psibase_macros.service_impl (details below in Bugs section) +[x] 1. add tests for psibase_macros 2. fix hygiene of psibase_macros.service_impl (details below in Bugs section) ## Doc Updates @@ -87,12 +86,12 @@ Then define only the table itself in the `service` mod: ## Bugs -`service` macro's hygiene could use some cleanup. +[x] `service` macro's hygiene could use some cleanup. + +[x] 1. `anyhow` must be imported for the macro to be happy (need to clarify under what circumstances this is the case to fix it properly) -1. `anyhow` must be imported for the macro to be happy (need to clarify under what circumstances this is the case to fix it properly) 2. `Table` must be imported for the macro to be happy (need to figure out which table def exactly require it. Maybe just be when record = "" is specified in the `table` macro). - `Table` is a Trait that implements things like ::new(). Getting a reference to a table won't work without bringing the Trait into scope. We could bring it in scope whenever the named table shows up in an #[action]. We could also have the macro look for any element of the Trait and include `Table` only if it finds it being used. Perhaps there's a way to define tables that naturally pulls it into scope? -3. `asyncgraphql_*` need to be `use`d in some cases. should come along with Query definitions. + `Table` is a Trait that implements things like
::new(). Getting a reference to a table won't work without bringing the Trait into scope. We could bring it in scope whenever the named table shows up in an #[action]. We could also have the macro look for any element of the Trait and include `Table` only if it finds it being used. Perhaps there's a way to define tables that naturally pulls it into scope? 3. `asyncgraphql_*` need to be `use`d in some cases. should come along with Query definitions. ```svgbob +-------------+ +---------+ +---------+