[duplicate][GSOC 2025] Code Relationship Graph in SourceKit-LSP

Synopsis

This project aims to implement a feature in SourceKit-LSP that generates an interactive graph showing relationships between selected variables, classes, and references in Swift code. This will help developers understand code structure and navigate dependencies more efficiently.

Benefits to the Community

  • Improved Code Understanding – Clear visualization of code relationships.
  • Enhanced Debugging – Easier navigation through complex codebases.
  • Cross-Editor Support – Works with any editor supporting SourceKit-LSP.

Deliverables

Core

  • Graph generation using Graphviz or D3.js.
  • Custom LSP command (e.g., showHierarchy) to trigger graph creation.
  • Integration with SourceKit-LSP and VS Code extension.
  • Handle inheritance, composition, and references.

Optional

  • Interactive graph (expand/collapse nodes).
  • Clickable nodes for direct navigation.

Technical Approach

  1. Extract Relationships – Use SwiftSyntax to parse the AST and identify relationships.
  2. Graph Generation – Create nodes for variables, classes, and methods with edges representing relationships.
  3. LSP Command – Register a new LSP command to trigger graph generation.
  4. Editor Integration – Open the graph in a side panel in VS Code.
  5. Testing – Ensure accuracy, performance, and error handling.

Timeline

Phase Duration Goal
Community Bonding 2 weeks Setup environment, connect with mentors
Phase 1 3 weeks Relationship extraction
Phase 2 2 weeks Graph generation
Phase 3 2 weeks LSP command + editor integration
Final Phase 2 weeks Testing, performance, and documentation

Biographical Info

  • Skills: Swift, C, C++, Python, JavaScript
  • Experience:
    • Built a low-level x86 OS
    • Strong in computer architecture and AST parsing
    • First Time participating in GSOC

Why Me?

My experience in systems programming, computer architecture, and AST parsing makes me a strong candidate. I have led multiple software projects and am confident in delivering a high-quality solution that benefits the Swift community.

This looks like a duplicate post of Code Relationship Graph in SourceKit-LSP ?

I'm going to close this one