Skip to content

Add the cratespro crate and import the tugraph module.#1440

Merged
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
hongwangliu-nju:main
Sep 12, 2025
Merged

Add the cratespro crate and import the tugraph module.#1440
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
hongwangliu-nju:main

Conversation

@hongwangliu-nju

Copy link
Copy Markdown
Contributor

Migrate the crates in cratespro to extensions/cratespro/common, and add the logic of parsing and importing graph to extensions/cratespro

Signed-off-by: hongwangliu-nju <1649209217@qq.com>
@vercel

vercel Bot commented Sep 11, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
mega Ready Ready Preview Comment Sep 11, 2025 11:13am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates cratespro crate modules to the extensions/cratespro/common directory and adds TuGraph module import logic. The changes consolidate Rust crate analysis and graph database functionality under a unified structure.

Key Changes:

  • Migrates cratespro modules to extensions/cratespro/common for better organization
  • Adds TuGraph graph database integration for crate dependency analysis
  • Implements Kafka-based message processing for repository imports
  • Introduces search functionality with embedding support and PostgreSQL integration

Reviewed Changes

Copilot reviewed 77 out of 77 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
extensions/cratespro/import_tugraph/ New TuGraph import service with Kafka consumer and graph import logic
extensions/cratespro/common/tudriver/ TuGraph client wrapper for graph database operations
extensions/cratespro/common/search/ Search module with AI embedding and full-text search capabilities
extensions/cratespro/common/repo_import/ Repository import logic with version parsing and Kafka handling
extensions/cratespro/common/model/ Data models for TuGraph, GitHub, and repository sync operations
extensions/cratespro/common/database/ Database entity definitions and ORM mappings
extensions/cratespro/common/data_transporter/ API handlers and Redis caching for crate data transport
Comments suppressed due to low confidence (1)

extensions/cratespro/common/data_transporter/src/handler.rs:1

  • Misspelled field name 'decription' should be 'description'. This appears to be a copy of the same typo from crate_info.rs
use std::collections::HashSet;

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

count += 1;
if count == 10000 {
import_driver.context.write_tugraph_import_files().await;
let _ =import_driver.context.import_from_env_vars().await;

Copilot AI Sep 12, 2025

Copy link

Choose a reason for hiding this comment

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

Missing space after '=' in variable assignment. Should be 'let _ = import_driver.context.import_from_env_vars().await;'

Suggested change
let _ =import_driver.context.import_from_env_vars().await;
let _ = import_driver.context.import_from_env_vars().await;

Copilot uses AI. Check for mistakes.

// 处理description,将多行字符串转换为单行,用\n替换换行符
let description = parsed["package"]
.get("decription")

Copilot AI Sep 12, 2025

Copy link

Choose a reason for hiding this comment

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

Misspelled field name 'decription' should be 'description'

Suggested change
.get("decription")
.get("description")

Copilot uses AI. Check for mistakes.
Comment on lines +190 to +192
env::var("NEW_CRATES_DIR").unwrap_or_else(|_| CLONE_CRATES_DIR.to_string());
let split_crates_dir =
env::var("SPLIT_CRATES_DIR").unwrap_or_else(|_| CLONE_CRATES_DIR.to_string());

Copilot AI Sep 12, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Both variables use the same fallback constant CLONE_CRATES_DIR, but split_crates_dir should likely have its own dedicated fallback path to avoid confusion

Copilot uses AI. Check for mistakes.
@benjamin-747
benjamin-747 added this pull request to the merge queue Sep 12, 2025
Merged via the queue into gitmono-dev:main with commit 853b9fd Sep 12, 2025
3 checks passed
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.

3 participants