Merge pull request #2977 from rtfeldman/debug_flags

Factor bespoke debug variables into debug_flags crate
This commit is contained in:
Ayaz 2022-04-30 18:16:06 -04:00 committed by GitHub
commit 3197cd97ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 167 additions and 70 deletions

View file

@ -449,15 +449,12 @@ fn write_content<'a>(
);
}
// useful for debugging
if cfg!(debug_assertions)
&& std::env::var("ROC_PRETTY_PRINT_ALIAS_CONTENTS").is_ok()
{
roc_debug_flags::dbg_do!(roc_debug_flags::ROC_PRETTY_PRINT_ALIAS_CONTENTS, {
buf.push_str("[[ but really ");
let content = subs.get_content_without_compacting(*_actual);
write_content(env, ctx, content, subs, buf, parens);
buf.push_str("]]");
}
});
}),
}
}