chore: init tracing logs and fix criterion black_box
Some checks failed
CI / Lint (bash) (push) Has been cancelled
CI / Lint (markdown) (push) Has been cancelled
CI / Lint (nickel) (push) Has been cancelled
CI / Lint (nushell) (push) Has been cancelled
CI / Lint (rust) (push) Has been cancelled
CI / Benchmark (push) Has been cancelled
CI / Security Audit (push) Has been cancelled
CI / License Compliance (push) Has been cancelled
CI / Code Coverage (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Build (macos-latest) (push) Has been cancelled
CI / Build (ubuntu-latest) (push) Has been cancelled
CI / Build (windows-latest) (push) Has been cancelled

This commit is contained in:
Jesús Pérez 2025-12-28 20:16:19 +00:00
parent 38f07ded1d
commit 5b0dbd30fd
Signed by: jesus
GPG Key ID: 9F243E355E0BC939
9 changed files with 40 additions and 7 deletions

View File

@ -24,6 +24,7 @@ async-trait.workspace = true
tera = { workspace = true, optional = true }
tempfile.workspace = true
dirs.workspace = true # For config path resolution
tracing.workspace = true # Logging framework
# i18n (optional)
fluent = { workspace = true, optional = true }
@ -50,7 +51,6 @@ axum = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
tower = { workspace = true, optional = true }
tower-http = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }
tracing-subscriber = { workspace = true, optional = true }
futures = { workspace = true, optional = true }
@ -76,7 +76,7 @@ criterion.workspace = true
default = ["cli", "i18n", "templates"]
cli = ["inquire", "dialoguer", "rpassword"]
tui = ["ratatui", "crossterm", "atty"]
web = ["axum", "tokio", "tower", "tower-http", "tracing", "tracing-subscriber", "futures"]
web = ["axum", "tokio", "tower", "tower-http", "tracing-subscriber", "futures"]
i18n = ["fluent", "fluent-bundle", "unic-langid", "sys-locale"]
templates = ["tera"]
nushell = ["nu-protocol", "nu-plugin"]

View File

@ -1,4 +1,5 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use criterion::{criterion_group, criterion_main, Criterion};
use std::hint::black_box;
use typedialog_core::form_parser::parse_toml;
use typedialog_core::nickel::MetadataParser;

View File

@ -100,13 +100,18 @@ impl ContractParser {
) {
// Could be string, array, object, number, true, false, null
// Skip parsing as validator call
eprintln!(
"[DEBUG] Skipping literal for field '{}': '{}'",
field_name, right_side
tracing::debug!(
field = %field_name,
value = %right_side,
"Skipping literal field (not a validator call)"
);
continue;
}
eprintln!("[DEBUG] Parsing field '{}': '{}'", field_name, right_side);
tracing::debug!(
field = %field_name,
expression = %right_side,
"Parsing field with validator"
);
// Extract module.function pairs from right side
if let Some(dot_pos) = right_side.find('.') {

View File

@ -24,6 +24,7 @@ tokio = { workspace = true, features = ["rt-multi-thread"] }
serde_json = { workspace = true }
toml = { workspace = true }
unic-langid = { workspace = true }
tracing-subscriber = { workspace = true }
[lints]
workspace = true

View File

@ -149,6 +149,14 @@ enum Commands {
#[tokio::main]
async fn main() -> Result<()> {
// Initialize tracing subscriber with env filter (respects RUST_LOG)
tracing_subscriber::fmt()
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
)
.init();
let args = Args::parse();
// Load configuration with CLI override

View File

@ -24,6 +24,7 @@ tokio = { workspace = true, features = ["rt-multi-thread"] }
serde_json = { workspace = true }
toml = { workspace = true }
unic-langid = { workspace = true }
tracing-subscriber = { workspace = true }
[lints]
workspace = true

View File

@ -211,6 +211,14 @@ fn extract_nickel_defaults(
#[tokio::main]
async fn main() -> Result<()> {
// Initialize tracing subscriber with env filter (respects RUST_LOG)
tracing_subscriber::fmt()
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
)
.init();
let args = Args::parse();
// Load configuration with CLI override

View File

@ -24,6 +24,7 @@ tokio = { workspace = true, features = ["rt-multi-thread"] }
serde_json = { workspace = true }
toml = { workspace = true }
unic-langid = { workspace = true }
tracing-subscriber = { workspace = true }
[lints]
workspace = true

View File

@ -300,6 +300,14 @@ enum Commands {
#[tokio::main]
async fn main() -> Result<()> {
// Initialize tracing subscriber with env filter (respects RUST_LOG)
tracing_subscriber::fmt()
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
)
.init();
let cli = Cli::parse();
// Load configuration with CLI override