From 368ddbb7b99dfb939d20f53c35d05b2b4758bd64 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 21 Jul 2025 09:30:24 -0700 Subject: Add utility to trace creation of problematic IRInsts to assist LLM in debugging (#7820) * Initial plan * Add SLANG_DEBUG_IR_BREAK environment variable support Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Apply code formatting to SLANG_DEBUG_IR_BREAK implementation Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Improve stack trace debugging with -rdynamic flag and backtrace_symbols Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Address PR feedback: use PlatformUtil::getEnvironmentVariable, remove -rdynamic flag, and delete fallback branch Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Address PR feedback: simplify env var parsing, move backtrace to PlatformUtil, use #if for SLANG_LINUX_FAMILY Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Address PR feedback: remove unneeded include, make backtrace() more generic by removing uid parameter Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * Fix and clone source tracking. * Add python script to dump traces. * Update instructions. * Batch calls to addr2line * Cleanup claude instructions. * update claude action. * Remove duplicated build instructions from claude.yml workflow Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> * fix build error. * Fix build errors --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: csyonghe <2652293+csyonghe@users.noreply.github.com> Co-authored-by: Yong He Co-authored-by: Gangzheng Tong --- .github/workflows/claude.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index dcc36e760..c2e0fb68e 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -189,19 +189,14 @@ jobs: # Run Claude Code Action with optimized environment variables - name: Execute Claude Code Action # Right now direct prompt to automatic PR Review id: claude-action - uses: anthropics/claude-code-action@v0.0.31 + uses: anthropics/claude-code-action@v0.0.38 with: # Direct Prompt is for testing. We shall use the triggers (on) which shall trigger this part on runtime custom_instructions: | # Build system information: - OS: Ubuntu Linux - - Build commands: - * Configure: `cmake --preset default` - * Build: `cmake --build --preset debug` - * Test: `./build/Release/bin/slang-test ./tests/path/to/test.slang` - * Format code: `./extras/formatting.sh` - Project is pre-built and ready for development tasks - - Run formatting script before committing changes + - See CLAUDE.md for detailed build, test, and formatting instructions # CRITICAL: You have access to the mcp__deepwiki__ask_question tool for deep repository knowledge. @@ -215,14 +210,6 @@ jobs: - Always follow existing code patterns and architectural decisions discovered through deepwiki - Consult the tool when you need context about unfamiliar parts of the codebase - # Debugging backend crashes or invalid downstream code: - - Note that any issues in the generated target code could stem from IR passes or even the front-end type checking - early in the pipeline, and you need to focus on tracking the root cause that breaks the consistency/invariants/assumptions - of the IR instead of putting in band-aid fixes in the later passes or in the emit logic. The philosphy of the compiler is to - keep the target code emission logic as simple and direct as possible, and most of the heavy lifting code transform is done - in the IR passes. - mcp_config: | { "mcpServers": { -- cgit v1.2.3