What is Relational Mode?
Relational mode (-r flag) enables deep dependency analysis. Instead of just looking at files in the error stack, Splat:
- Parses the error stack trace
- Identifies all files involved
- Builds a dependency graph of imports/includes
- Recursively follows relationships to Nth degree
- Gathers context from all related files
- Provides fixes with full understanding of your codebase
Relational mode is essential for debugging errors that span multiple modules, especially in large codebases with complex dependencies.
Basic Syntax
-r flag must come before your command.
How It Works
Standard Mode (Without -r)
Files analyzed: Only those in the error stack (typically 1-3 files)
Relational Mode (With -r)
Files analyzed: All files in the dependency tree (can be 10+ files)
Dependency Graph Example
Consider this project structure:Error in app.py
Without -r Flag
app.py and doesn’t know about the Connection class definition in models.py.
With -r Flag
models.py and sees the correct method name.
Real-World Use Cases
Multi-Module Import Errors
Type Mismatch Across Modules
Configuration Issues
Performance Considerations
When to Use -r Flag
When to Use -r Flag
Use relational mode when:
- Error involves multiple files
- Import/dependency issues
- Type mismatches across modules
- Configuration errors
- Complex application logic
- First time debugging unfamiliar code
- Single-file syntax errors
- Simple typos
- Missing brackets/parentheses
- Quick iterations on the same error
Analysis Time
Analysis Time
- Without -r: ~1-2 seconds (1-3 files)
- With -r: ~3-5 seconds (5-20 files)
- Large projects: ~5-10 seconds (20+ files)
Privacy & Gitignore
Privacy & Gitignore
Relational mode respects your
.gitignore:- Skips
node_modules/,venv/,.envfiles - Won’t analyze files in ignored directories
- Keeps sensitive data private
Technical Details
Relational mode uses these algorithms:1. Error Stack Parsing
2. Dependency Graph Building
3. Nth Degree Traversal
Tips for Best Results
Optimize Your Workflow
- Start with -r for new errors - Get full context on first try
- Use standard mode for iterations - Faster when fixing the same issue
- Keep dependencies clean - Smaller graphs = faster analysis
- Check .gitignore - Ensure it excludes dependencies and build artifacts
Next Steps
- See Framework-Specific Examples for framework best practices
- Learn about Environment Variables to customize behavior
- Explore Core Concepts to understand how Splat works