DR-009: Multi-Language Support Strategy
Status
- [x] Accepted
- [ ] Proposed
- [ ] Rejected
- [ ] Deprecated
- [ ] Superseded
Date: 2024-11-25
Context
Repository needs Go (CLI/libraries), TypeScript (VSCode), PowerShell (Windows), Shell (Linux/macOS), Python (tools) with unified contracts and CI/CD.
Problem: How to support multiple languages while maintaining consistency?
Decision
Multi-language component types with language-specific builders and unified module contracts.
Supported Languages:
- Go: CLI tools, libraries, MCP servers (
go/eac/,go/r2r/) - TypeScript: VSCode extension (
typescript/vscode-ext-commit/) - PowerShell: Windows scripts, installers (
scripts/pwsh/) - Shell: Linux/macOS scripts, installers (
scripts/sh/) - Python: Specialized tooling, diagram processing (
containers/drawio-cli/*.py)
Cross-Platform Strategy:
- PowerShell + Shell for portability
- Same functionality, platform-specific implementation
- Examples:
r2r-installer,implicit-r2r-cli
Component Types:
go: {builder: go, requirements: [go]}
typescript: {builder: npm, requirements: [npm]}
pwsh: {patterns: {tests: ["**/*.Tests.ps1"]}}
bash: {extensions: [".sh", ".bash"]}
python: {requirements: [python]}
Unified Testing: BDD specifications in Gherkin for cross-language validation
Consequences
Positive: Technology flexibility, cross-platform support, unified contracts, best tool for job, ecosystem benefits
Negative: Build complexity, multiple test frameworks, maintainer knowledge requirements, toolchain diversity
Alternatives Considered
- Go Only: Rejected - not optimal for all tasks (VSCode extensions, Windows scripting, Python tooling)
- JavaScript Everywhere: Rejected - poor for CLI tools, system integration, performance-critical code
- Per-Language Repos: Rejected - coordination overhead, atomic commits difficult, duplication
Related Decisions
Tutorials | How-to Guides | Explanation | Reference
You are here: Reference — information-oriented technical descriptions of the system.