From e047f8b1a35f910bb0d48b23c8207f9815fa126b Mon Sep 17 00:00:00 2001 From: Amit Upadhyay Date: Sun, 8 Dec 2024 20:24:19 +0530 Subject: [PATCH] so that we dont have to reparse same documents --- v0.5/Cargo.lock | 2 ++ v0.5/fastn-package/src/reader.rs | 7 +++++-- v0.5/fastn-router/Cargo.toml | 3 ++- v0.5/fastn-router/src/reader.rs | 8 +++++--- v0.5/fastn/Cargo.toml | 1 + v0.5/fastn/src/commands/render.rs | 2 +- v0.5/fastn/src/lib.rs | 4 ++-- 7 files changed, 18 insertions(+), 9 deletions(-) diff --git a/v0.5/Cargo.lock b/v0.5/Cargo.lock index d0a7d0a49..62a269a49 100644 --- a/v0.5/Cargo.lock +++ b/v0.5/Cargo.lock @@ -162,6 +162,7 @@ dependencies = [ "fastn-package", "fastn-router", "fastn-runtime", + "fastn-section", "fastn-unresolved", "http-body-util", "hyper", @@ -234,6 +235,7 @@ name = "fastn-router" version = "0.1.0" dependencies = [ "fastn-continuation", + "fastn-section", "serde_json", ] diff --git a/v0.5/fastn-package/src/reader.rs b/v0.5/fastn-package/src/reader.rs index e3d771400..3fd11c35d 100644 --- a/v0.5/fastn-package/src/reader.rs +++ b/v0.5/fastn-package/src/reader.rs @@ -17,9 +17,12 @@ impl fastn_continuation::Continuation for State { type Output = fastn_package::Package; type Needed = Vec; // File name - type Found = Vec<(String, Option)>; + type Found = Vec<(String, Option)>; - fn continue_after(self, _n: Vec<(String, Option)>) -> fastn_continuation::Result { + fn continue_after( + self, + _n: Vec<(String, Option)>, + ) -> fastn_continuation::Result { todo!() } } diff --git a/v0.5/fastn-router/Cargo.toml b/v0.5/fastn-router/Cargo.toml index 850fa730b..3628e7b59 100644 --- a/v0.5/fastn-router/Cargo.toml +++ b/v0.5/fastn-router/Cargo.toml @@ -10,4 +10,5 @@ homepage.workspace = true [dependencies] serde_json.workspace = true -fastn-continuation.workspace = true \ No newline at end of file +fastn-continuation.workspace = true +fastn-section.workspace = true \ No newline at end of file diff --git a/v0.5/fastn-router/src/reader.rs b/v0.5/fastn-router/src/reader.rs index dd66bac27..ec3fcb734 100644 --- a/v0.5/fastn-router/src/reader.rs +++ b/v0.5/fastn-router/src/reader.rs @@ -10,10 +10,12 @@ impl fastn_router::Router { impl fastn_continuation::Continuation for State { type Output = fastn_router::Router; type Needed = Vec; - // File name - type Found = Vec<(String, Option)>; + type Found = Vec<(String, Option)>; - fn continue_after(self, _n: Self::Found) -> fastn_continuation::Result { + fn continue_after( + self, + _n: Vec<(String, Option)>, + ) -> fastn_continuation::Result { todo!() } } diff --git a/v0.5/fastn/Cargo.toml b/v0.5/fastn/Cargo.toml index ce74a88f2..7e057b3f9 100644 --- a/v0.5/fastn/Cargo.toml +++ b/v0.5/fastn/Cargo.toml @@ -11,6 +11,7 @@ homepage.workspace = true [dependencies] fastn-compiler.workspace = true fastn-package.workspace = true +fastn-section.workspace = true fastn-continuation.workspace = true fastn-router.workspace = true fastn-runtime.workspace = true diff --git a/v0.5/fastn/src/commands/render.rs b/v0.5/fastn/src/commands/render.rs index 0f3f65138..08478162a 100644 --- a/v0.5/fastn/src/commands/render.rs +++ b/v0.5/fastn/src/commands/render.rs @@ -19,7 +19,7 @@ impl fastn::commands::Render { impl fastn_continuation::Provider for &fastn::commands::Render { type Needed = Vec; - type Found = Vec<(String, Option)>; + type Found = Vec<(String, Option)>; fn provide(&self, _needed: Self::Needed) -> Self::Found { todo!() diff --git a/v0.5/fastn/src/lib.rs b/v0.5/fastn/src/lib.rs index 1a2ef886c..f1c8d4032 100644 --- a/v0.5/fastn/src/lib.rs +++ b/v0.5/fastn/src/lib.rs @@ -22,10 +22,10 @@ pub enum OutputRequested { Data, } -pub fn full_filler(_i: Vec) -> Vec<(String, Option)> { +pub fn full_filler(_i: Vec) -> Vec<(String, Option)> { todo!() } -pub async fn full_filler_async(_i: Vec) -> Vec<(String, Option)> { +pub async fn full_filler_async(_i: Vec) -> Vec<(String, Option)> { todo!() }