Add Scala language support to Knowledge Graph
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
Currently, GitLab Knowledge Graph supports Ruby, Python, Java, Kotlin, and TypeScript/JavaScript for code indexing and analysis. However, Scala is not supported, which prevents customers with Scala-based applications from leveraging Knowledge Graph capabilities for:
- Code structure analysis and navigation
- Dependency relationship mapping
- Cross-repository queries and impact analysis
- AI-powered code understanding through Duo features
This gap is particularly impactful for enterprise customers who use Scala in their technology stack, especially those working with:
- Apache Spark applications
- Akka-based microservices
- Play Framework web applications
- Financial services platforms (where Scala is widely adopted)
Intended users
- Enterprise developers working with Scala codebases who want to understand code relationships and dependencies
- Platform engineers managing multi-language environments that include Scala applications
- Technical architects who need cross-repository impact analysis for Scala services
- New team members onboarding to Scala projects who need better code navigation and understanding
User experience goal
Users should be able to:
- Index Scala projects automatically through Knowledge Graph
- Query Scala code structures (classes, objects, traits, methods, functions) using natural language
- Understand dependencies between Scala modules and external libraries
- Navigate relationships between Scala code and other supported languages in polyglot repositories
- Leverage Duo Chat with Knowledge Graph context for Scala-specific questions like:
- "Which classes extend this trait?"
- "What are the dependencies for this Scala module?"
- "How is this Akka actor used across the codebase?"
- "What would be impacted if I modify this case class?"
Benefits
For Customers
- Complete language coverage for JVM-based polyglot applications
- Better code understanding for complex Scala functional programming patterns
- Improved onboarding for new developers joining Scala teams
- Enhanced impact analysis for refactoring large Scala codebases
For GitLab
- Competitive advantage in enterprise markets where Scala is prevalent
- Increased Duo adoption among Scala development teams
- Platform completeness for JVM ecosystem (Java, Kotlin, Scala)
- Customer retention for organizations with mixed technology stacks
Success criteria
- Scala projects can be successfully indexed by Knowledge Graph
- Users can query Scala code structures through Duo Chat with Knowledge Graph context
- Dependency relationships are correctly identified for sbt-based projects
- Cross-language queries work between Scala and other supported languages
- Performance is comparable to other supported languages
Documentation requirements
- Update Knowledge Graph language support documentation
- Add Scala-specific examples to MCP tools documentation
- Include sbt project setup instructions
- Document any Scala-specific limitations or considerations
Future considerations
- Scala 3 support: Ensure compatibility with both Scala 2.x and Scala 3.x syntax
- Metals integration: Potential integration with the Scala Language Server
- Worksheet support: Consider support for
.scScala worksheet files - Macro analysis: Advanced support for Scala macro definitions and usage
Edited by 🤖 GitLab Bot 🤖