Skip to content
This repository was archived by the owner on Mar 29, 2026. It is now read-only.

enhancement: add support for Dart and Rust package version checking#24

Open
putao520 wants to merge 2 commits into
sammcj:mainfrom
putao520:main
Open

enhancement: add support for Dart and Rust package version checking#24
putao520 wants to merge 2 commits into
sammcj:mainfrom
putao520:main

Conversation

@putao520
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings May 10, 2025 08:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Enhancement to add support for Dart and Rust package version checking to the MCP server.

  • Added new tools and handlers for Rust (via Cargo.toml) and Dart (via pubspec.yaml) package version checking
  • Updated server initialization to register the new Rust and Dart tools
  • Expanded documentation and README to cover usage examples and response formats for Rust and Dart support

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/server/server_rust.go Introduces a new Rust tool using a dedicated handler
pkg/server/server_dart.go Introduces a new Dart tool using a dedicated handler
pkg/server/server.go Updates server initialization to add new tool registrations
internal/handlers/rust.go Implements Rust dependency processing and version retrieval
internal/handlers/dart.go Implements Dart dependency processing and version retrieval
docs/rust.md Provides usage and response examples for Rust checking
docs/dart.md Provides usage and response examples for Dart checking
README.md Updates overview to include Rust and Dart support
Comments suppressed due to low confidence (2)

internal/handlers/rust.go:133

  • Consider adding unit tests for GetLatestVersion to cover edge cases such as missing or malformed 'dependencies' input.
func (h *RustHandler) GetLatestVersion(ctx context.Context, args map[string]interface{}) (*mcp.CallToolResult, error) {

internal/handlers/dart.go:134

  • Consider adding unit tests for GetLatestVersion to validate handling of both dependency formats and special cases (e.g., SDK, path, git dependencies).
func (h *DartHandler) GetLatestVersion(ctx context.Context, args map[string]interface{}) (*mcp.CallToolResult, error) {

Comment thread internal/handlers/dart.go
var dependencies []DartDependency

// Log the raw dependencies for debugging
h.logger.WithField("dependencies", fmt.Sprintf("%+v", depsRaw)).Debug("Raw dependencies")
Copy link

Copilot AI May 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The dependency parsing logic in this handler closely mirrors that in the Rust handler; consider refactoring shared patterns into a common function to reduce duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants