debug: Add some print statments to see the output in the CI

This commit is contained in:
Mahmoud-Emad
2025-08-05 20:05:30 +03:00
parent c81af5e235
commit 29e0efa3d6

View File

@@ -110,19 +110,26 @@ pub fn encode[T](t T, args EncodeArgs) !Params {
// Check if field has skip attribute
mut should_skip := false
for attr in field.attrs {
// Debug output for CI troubleshooting
println('PARAMSPARSER DEBUG: field "${field.name}" has attr: "${attr}"')
// More robust skip detection - handle various formats
attr_lower := attr.to_lower().trim_space()
if attr_lower == 'skip' || attr_lower.starts_with('skip;')
|| attr_lower.starts_with('skip ') || attr_lower.contains(';skip;')
|| attr_lower.contains(' skip ') || attr_lower.ends_with(';skip')
|| attr_lower.ends_with(' skip') {
println('PARAMSPARSER DEBUG: field "${field.name}" should be SKIPPED')
should_skip = true
break
}
}
if !should_skip {
println('PARAMSPARSER DEBUG: processing field "${field.name}"')
}
if !should_skip {
val := t.$(field.name)
println('PARAMSPARSER DEBUG: field "${field.name}" value: ${val}')
field_attrs := attrs_get(field.attrs)
mut key := field.name
if 'alias' in field_attrs {