Skip to content

feat: Add full Kotlin language support#8

Closed
mduenas wants to merge 9 commits into
colbymchenry:mainfrom
mduenas:feature/full-kotlin-support
Closed

feat: Add full Kotlin language support#8
mduenas wants to merge 9 commits into
colbymchenry:mainfrom
mduenas:feature/full-kotlin-support

Conversation

@mduenas

@mduenas mduenas commented Jan 30, 2026

Copy link
Copy Markdown

Summary

  • Upgrades Kotlin from "Basic support" to "Full support"
  • Adds extraction for: object declarations, companion objects, interfaces, enums, properties, type aliases
  • Adds inheritance/implementation tracking (extends/implements edges)
  • Improves getChildByField() with fallback for tree-sitter grammars without field definitions
  • Adds 15+ comprehensive Kotlin tests

Test plan

  • All 55 extraction tests pass (including 15+ new Kotlin tests)
  • All 211 total tests pass with no regressions
  • Tests cover: data classes, sealed classes, object declarations, companion objects, interfaces, enums, extension functions, properties, type aliases, inheritance, visibility modifiers, abstract classes, function calls

🤖 Generated with Claude Code

mduenas and others added 9 commits January 30, 2026 10:21
This PR upgrades Kotlin from "Basic support" to "Full support" by adding:

- Object declarations (singletons) extraction
- Companion object extraction
- Data classes, sealed classes, abstract classes detection
- Interface extraction (properly distinguishes from classes)
- Enum extraction with enum members
- Properties (val/var) extraction
- Type alias extraction
- Inheritance/implementation extraction (extends/implements edges)
- Enhanced function body parsing for call tracking

Also improves getChildByField() to fall back to node type matching,
which fixes issues with tree-sitter grammars that don't define
field names (like tree-sitter-kotlin).

Added 15+ new comprehensive Kotlin tests covering all constructs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add HTTP/JSON-RPC transport to MCP server enabling integration with
GitHub Copilot and other HTTP-based MCP clients. The stdio transport
remains the default for Claude Code.

- Extract ITransport interface for pluggable transport mechanisms
- Add HttpTransport class with CORS support and graceful error handling
- Refactor MCPServer to accept transport configuration
- Add CLI flags: --http, --port, --host

Usage: codegraph serve --mcp --http --port 3000

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Installer now asks which AI assistant the user plans to use:
- Claude Code (stdio transport, default)
- GitHub Copilot (HTTP transport)
- Both

Shows appropriate configuration instructions and next steps for each option.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot uses stdio transport like Claude Code, not HTTP. Updated
installer and CLI to show correct mcp-config.json format:

  {
    "mcpServers": {
      "codegraph": {
        "type": "stdio",
        "command": "codegraph",
        "args": ["serve", "--mcp"],
        "tools": ["*"]
      }
    }
  }

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove tree-sitter-liquid (uses regex extraction, not tree-sitter)
- Add overrides for tree-sitter to suppress peer dependency warnings

Fixes install failures due to node-gyp-build issues with GitHub deps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When GitHub Copilot is selected, installer now writes CodeGraph
tool usage instructions to .github/copilot-instructions.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The DEFAULT_CONFIG.include was missing *.kt, *.kts, and *.swift
patterns, causing these files to be skipped during indexing even
though the grammars were properly configured.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Batch fetch node info upfront instead of per-reference queries
- Add progress reporting during resolution phase
- Add --skip-resolve flag to skip resolution for faster indexing
- Resolution now shows actual progress instead of stuck at 0%

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant