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
Open
enhancement: add support for Dart and Rust package version checking#24putao520 wants to merge 2 commits into
putao520 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
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) {
| var dependencies []DartDependency | ||
|
|
||
| // Log the raw dependencies for debugging | ||
| h.logger.WithField("dependencies", fmt.Sprintf("%+v", depsRaw)).Debug("Raw dependencies") |
There was a problem hiding this comment.
[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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.