Skip to content

Merge SUGGESTIONS.md into TODO.md; silence 300+ unconditional DEBUG prints#88

Open
Copilot wants to merge 2 commits intomainfrom
copilot/merge-suggestions-into-todo
Open

Merge SUGGESTIONS.md into TODO.md; silence 300+ unconditional DEBUG prints#88
Copilot wants to merge 2 commits intomainfrom
copilot/merge-suggestions-into-todo

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 22, 2026

Merges SUGGESTIONS.md into TODO.md (then deletes it), and implements Sprint 1.1/1.2: gating all codegen/semantic DEBUG output behind a runtime flag and removing the global VERBOSE compile definition that was enabling parser traces for every build.

SUGGESTIONS.md → TODO.md

  • Added §10 Consistency & Polish with all sprint items (DEBUG silencing, doc consolidation, Vec/String/borrow consistency)
  • Added Architecture Notes section (immutable AST separation, IR opt phase, parser error recovery)
  • Extended 1.0 Release Criteria with: silent-by-default, ownership tests, FFI tests, complete string methods
  • Fixed duplicate §10 numbering (Async bumped to §11)

Silence DEBUG output

semantic.hpp now declares a shared runtime flag and convenience macro:

namespace vyn { extern bool g_debug_codegen; }  // false by default
#define VDBG(stmt) do { if (vyn::g_debug_codegen) { stmt; } } while(0)
  • --verbose CLI flag added to main.cpp to enable at runtime
  • All 300+ std::cout/cerr << "DEBUG:" prints across 15 files in src/vre/ wrapped with VDBG() or if (vyn::g_debug_codegen) (multi-statement blocks handled explicitly)
  • Removed add_compile_definitions(VERBOSE) from CMakeLists.txt — this was the root cause of [PEEK]/[CONSUME]/[EXPECT] parser traces appearing in every normal run
  • Wrapped the remaining unguarded [ModuleParser] traces in module_parser.cpp with #ifdef VERBOSE; fixed \\\\n escape literals while there

Normal run is now silent. --verbose restores full debug output for development.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…l VERBOSE define

Co-authored-by: rickenator <7795976+rickenator@users.noreply.github.com>
Copilot AI changed the title [WIP] Merge suggestions from SUGGESTIONS.md into TODO.md Merge SUGGESTIONS.md into TODO.md; silence 300+ unconditional DEBUG prints Feb 22, 2026
Copilot AI requested a review from rickenator February 22, 2026 23:42
@rickenator rickenator marked this pull request as ready for review February 23, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants