From 1ae5f2750a7755c2c4eaa3750278f5756b17c4c7 Mon Sep 17 00:00:00 2001 From: Amit Upadhyay Date: Fri, 15 Nov 2024 11:23:47 +0530 Subject: [PATCH] moving fastn-jdebug trait out --- Cargo.lock | 6 +++++- Cargo.toml | 7 ++++--- fastn-jdebug/Cargo.toml | 12 ++++++++++++ fastn-jdebug/src/lib.rs | 3 +++ v0.5/Cargo.lock | 4 ++-- v0.5/fastn-section/src/lib.rs | 4 ---- 6 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 fastn-jdebug/Cargo.toml create mode 100644 fastn-jdebug/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 3dcdc8166..4e2e12f24 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1546,6 +1546,10 @@ dependencies = [ "thiserror", ] +[[package]] +name = "fastn-jdebug" +version = "0.1.0" + [[package]] name = "fastn-js" version = "0.1.0" @@ -1599,7 +1603,7 @@ dependencies = [ [[package]] name = "fastn-type" -version = "0.1.0" +version = "0.1.1" dependencies = [ "serde", ] diff --git a/Cargo.toml b/Cargo.toml index 2f6e8fb43..d9714808f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,20 +6,21 @@ members = [ "fastn-ds", "fastn-expr", "fastn-issues", + "fastn-jdebug", "fastn-js", "fastn-lang", "fastn-package", + "fastn-type", "fastn-update", "fastn-utils", + "fbt", + "fbt_lib", "foo", "ftd", "ftd-ast", "ftd-p1", "ftd-tc", - "fbt", - "fbt_lib", "t", - "fastn-type", # "fastn-wasm", # "fastn-runtime", ] diff --git a/fastn-jdebug/Cargo.toml b/fastn-jdebug/Cargo.toml new file mode 100644 index 000000000..6741d789f --- /dev/null +++ b/fastn-jdebug/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "fastn-jdebug" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +description.workspace = true +license = "BSD-3-Clause" +repository.workspace = true +homepage.workspace = true + +[dependencies] +serde_json = "1" \ No newline at end of file diff --git a/fastn-jdebug/src/lib.rs b/fastn-jdebug/src/lib.rs new file mode 100644 index 000000000..73f78314b --- /dev/null +++ b/fastn-jdebug/src/lib.rs @@ -0,0 +1,3 @@ +pub trait JDebug { + fn debug(&self, source: &str) -> serde_json::Value; +} diff --git a/v0.5/Cargo.lock b/v0.5/Cargo.lock index 97770e735..14a815bce 100644 --- a/v0.5/Cargo.lock +++ b/v0.5/Cargo.lock @@ -112,9 +112,9 @@ version = "0.1.0" [[package]] name = "fastn-type" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1494ecd11081fa81a57265457a27262fb640e70cf84acf2c551a8e8a2d69c1c1" +checksum = "9883bbd7d5d180775a060a91fe8ef54be033146d55318e4e8ab6099d4a58072e" dependencies = [ "serde", ] diff --git a/v0.5/fastn-section/src/lib.rs b/v0.5/fastn-section/src/lib.rs index 04f1fd677..d95e39a52 100644 --- a/v0.5/fastn-section/src/lib.rs +++ b/v0.5/fastn-section/src/lib.rs @@ -17,10 +17,6 @@ pub use error::Error; pub use fastn_section::warning::Warning; pub use scanner::{Scannable, Scanner}; -pub trait JDebug { - fn debug(&self, source: &str) -> serde_json::Value; -} - pub enum Diagnostic { Error(Error), Warning(Warning),