Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diff Graph implementation #187

Merged
merged 45 commits into from
Oct 12, 2024
Merged

Diff Graph implementation #187

merged 45 commits into from
Oct 12, 2024

Conversation

tapishr
Copy link
Member

@tapishr tapishr commented Oct 12, 2024

Please check the action items covered in the PR -

  • Build is running
  • Eventing is functional and tested
  • Unit or integration tests added and running
  • Manual QA

Summary by CodeRabbit

  • New Features

    • Introduced functionality for generating and sending diff graph comments for GitHub code reviews.
    • Added support for managing function definitions and calls, enhancing analysis of code changes.
    • Implemented Mermaid flowchart generation for visualizing code diffs.
    • New utility functions for file handling, language detection, and API interaction.
  • Bug Fixes

    • Corrected logging messages for better clarity in error reporting.
  • Documentation

    • Updated module declarations to improve accessibility for external use.
  • Chores

    • Enhanced error handling and logging throughout various modules.

tapishr and others added 30 commits June 22, 2024 11:09
Separated the relevant-reviewers comment from the DiffGraph comment.
Copy link
Contributor

coderabbitai bot commented Oct 12, 2024

Walkthrough

The changes in this pull request involve multiple modifications across various files in the vibi-dpu package. Key updates include enhancements to the Dockerfile, the addition of new modules and functionalities for handling Git operations, function calls, and graph elements. Notable changes include the introduction of new data structures for managing Mermaid diagrams, improved handling of function definitions, and modifications to the relevance processing logic. The versioning of the Cargo.toml file has also been updated, reflecting these extensive changes.

Changes

File Path Change Summary
Dockerfile Added installation of ripgrep and copied ./prompts directory to /app/prompts.
vibi-dpu/Cargo.toml Updated package version to 2.0.0, modified reqwest dependency features, and added walkdir dependency.
vibi-dpu/src/core/mod.rs Added new module declaration for diff_graph.
vibi-dpu/src/core/diff_graph.rs Introduced functionality for generating and sending a diff graph comment to GitHub, including new asynchronous functions.
vibi-dpu/src/core/relevance.rs Updated process_relevance function to include excluded_files parameter and replaced comment_text with relevant_reviewers_comment_text.
vibi-dpu/src/core/review.rs Enhanced process_review and send_hunkmap functions, added new helper functions for file processing, and modified function signatures to include excluded_files.
vibi-dpu/src/core/trigger.rs Streamlined process_trigger function and improved error handling in parse_message_fields.
vibi-dpu/src/db/review.rs Corrected log message in get_review_from_db function.
vibi-dpu/src/graph/elements.rs Introduced data structures for managing graph elements in Mermaid diagrams, including MermaidSubgraph, MermaidNode, and MermaidEdge.
vibi-dpu/src/graph/file_imports.rs Added data structures and functions for handling file imports and interactions with a language model API, including InputSchema and ImportIdentifier.
vibi-dpu/src/graph/function_call.rs Introduced functionality for analyzing function calls, including data structures and asynchronous functions for processing code chunks and files.
vibi-dpu/src/graph/function_line_range.rs Added data structures and functionalities for managing function definitions and their mappings within code files.
vibi-dpu/src/graph/function_name.rs Introduced functionality for identifying function names from code lines, including the FunctionNameIdentifier struct.
vibi-dpu/src/graph/gitops.rs Enhanced Git operations with updates to StatItem struct, added git_checkout_commit function, and modified generate_diff and git_pull functions for improved error handling.
vibi-dpu/src/graph/graph_edges.rs Introduced functions for managing graph edges based on function relationships across files.
vibi-dpu/src/graph/graph_info.rs Added structures to manage function definitions and calls, including DiffGraph and associated methods for generating and processing diffs.
vibi-dpu/src/graph/mermaid_elements.rs Introduced functions for generating flowcharts in Mermaid syntax based on code diffs.
vibi-dpu/src/graph/mod.rs Added new public module declarations for various graph-related functionalities.
vibi-dpu/src/graph/utils.rs Introduced utility functions for API interaction, file handling, and language detection, including call_llm_api and read_file.
vibi-dpu/src/main.rs Modified main function to include additional environment variable checks and updated logic for handling GitHub provider setup.
vibi-dpu/src/utils/gitops.rs Updated StatItem struct to include Clone trait, made filepath public, and added git_checkout_commit function.
vibi-dpu/src/utils/relevance.rs Minor modification to the Relevance struct, removing a newline at the end of the file.
vibi-dpu/src/utils/repo_config.rs Added diff_graph boolean field to RepoConfig struct with a getter method.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ReviewService
    participant GitHub
    participant DiffGraph

    User->>ReviewService: Submit review
    ReviewService->>GitHub: Process review changes
    GitHub->>DiffGraph: Generate diff graph
    DiffGraph-->>GitHub: Return diff graph
    GitHub-->>ReviewService: Send diff graph comment
    ReviewService-->>User: Notify review processed
Loading

🐰 In the garden of code, changes bloom bright,
New modules and functions, a wondrous sight!
With graphs and with edges, we dance and we play,
In the realm of GitHub, we hop all day!
So here's to the changes, both big and small,
A joyful celebration, let’s code and stand tall! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

sonarcloud bot commented Oct 12, 2024

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 54

🧹 Outside diff range and nitpick comments (29)
vibi-dpu/src/graph/mod.rs (1)

1-10: LGTM! Consider improving module organization.

The module declarations look good and follow Rust's conventions. The modules seem to cover various aspects of graph operations, Git interactions, and function analysis, which aligns with the PR objectives.

However, consider the following suggestions for improved organization:

  1. Group related modules: You could group related modules using nested modules. For example:

    pub mod git {
        pub mod gitops;
    }
    
    pub mod graph {
        pub mod elements;
        pub mod mermaid_elements;
        pub mod graph_info;
        pub mod graph_edges;
    }
    
    pub mod function_analysis {
        pub mod function_line_range;
        pub mod function_call;
        pub mod function_name;
    }
    
    pub mod utils;
    pub mod file_imports;
  2. Consider creating a prelude module: If many of these modules are commonly used together, you could create a prelude module to re-export commonly used items:

    pub mod prelude {
        pub use super::graph::*;
        pub use super::function_analysis::*;
        // Add other commonly used items
    }

These suggestions could improve the module's organization and make it easier for users of your library to import the necessary components.

Would you like me to generate documentation comments for these modules to explain their purpose and contents?

vibi-dpu/src/utils/repo_config.rs (2)

6-7: LGTM! Consider adding documentation for the new field.

The addition of the diff_graph field and the syntax changes look good. They align with the PR objectives and follow Rust's style guidelines.

Consider adding a doc comment for the diff_graph field to explain its purpose and usage. For example:

/// Indicates whether diff graph functionality is enabled.
diff_graph: bool

20-22: LGTM! Consider adding documentation for the new method.

The new getter method for diff_graph is implemented correctly and follows the existing pattern in the struct.

Consider adding a doc comment for the diff_graph() method to explain its purpose and return value. For example:

/// Returns whether diff graph functionality is enabled.
///
/// # Returns
///
/// `true` if diff graph is enabled, `false` otherwise.
pub fn diff_graph(&self) -> bool {
    self.diff_graph
}
vibi-dpu/Cargo.toml (1)

41-41: Address the TODO comment regarding library license checks.

The TODO comment indicates that not all library licenses have been checked. This is a crucial step in ensuring compliance and avoiding potential legal issues.

Please take the following actions:

  1. Review and document the licenses of all dependencies.
  2. Ensure all licenses are compatible with your project's GPL-3.0-or-later license.
  3. Update your project's documentation to include a section on third-party licenses.
  4. Remove the TODO comment once this task is completed.

Consider using a tool like cargo-license to help automate this process:

cargo install cargo-license
cargo license

This will list all dependencies along with their licenses, making the review process easier.

vibi-dpu/src/main.rs (3)

10-10: LGTM: New graph module added.

The addition of the graph module is a good practice for code organization. However, consider adding a brief comment explaining the purpose of this module for better documentation.


Line range hint 18-55: Improve code structure and security in the main function.

The changes in the main function improve flexibility and debuggability. However, consider the following suggestions:

  1. Refactor the nested if-else statements to improve readability.
  2. Remove the debug logging of the GitHub PAT for security reasons.
  3. Consider using a match statement for the provider check instead of if-else.

Here's a suggested refactoring:

async fn main() {
    // ... (previous code remains unchanged)

    let github_pat = match env::var("GITHUB_PAT") {
        Ok(pat) => {
            log::debug!("[main] GITHUB_PAT is set");
            Some(pat)
        },
        Err(_) => {
            log::debug!("[main] GITHUB_PAT env var is not set");
            None
        }
    };

    let provider = env::var("PROVIDER").unwrap_or_else(|_| {
        log::debug!("[main] PROVIDER env var is not set");
        String::new()
    });
    log::debug!("[main] PROVIDER: {}", provider);

    match (github_pat, provider.to_ascii_lowercase().as_str()) {
        (Some(pat), "github") => {
            core::github::setup::setup_self_host_user_repos_github(&pat).await;
        },
        _ => {
            load_auth_from_previous_installation().await;
        }
    }

    // ... (rest of the main function)
}

This refactoring improves readability, removes the security risk of logging the PAT, and uses a match statement for cleaner control flow.


Line range hint 57-62: LGTM: New load_auth_from_previous_installation function.

The function provides a good fallback mechanism for authentication. The use of if let for handling the Option returned by app_access_token is idiomatic Rust.

Consider making the provider more flexible:

async fn load_auth_from_previous_installation(provider: ProviderEnum) {
    if let Some(access_token) = app_access_token(&None).await {
        log::info!("Using Stored Auth...");
        process_repos(&access_token, &provider.to_string()).await;
    }
}

Then update the call in main:

load_auth_from_previous_installation(ProviderEnum::Github).await;

This change allows for easier extension if more providers are added in the future.

vibi-dpu/src/core/diff_graph.rs (1)

15-15: Address the TODO: Implement Bitbucket comment functionality

The TODO comment indicates that adding comments for Bitbucket is pending. Implementing this will extend support to Bitbucket repositories.

Would you like assistance in implementing the Bitbucket comment functionality? I can help provide guidance or open an issue to track this task.

vibi-dpu/src/graph/mermaid_elements.rs (2)

41-60: Remove unnecessary commented-out code for clarity

The commented-out code between lines 41-60 adds clutter and may reduce readability. If this code is no longer needed, consider removing it to keep the codebase clean and maintainable.


28-28: Simplify return statements by omitting the return keyword

In Rust, it is idiomatic to omit the return keyword for the last expression in a function. Consider simplifying the return statements at lines 28 and 64 to enhance code readability.

Apply this diff:

-    return Some(flowchart_str);
+    Some(flowchart_str)
-    return Some(elems_str);
+    Some(elems_str)

Also applies to: 64-64

vibi-dpu/src/core/review.rs (4)

74-74: Avoid unnecessary cloning of repo_config

Cloning repo_config to repo_config_clone may be unnecessary if process_relevance doesn't require ownership or mutation of the entire struct. Consider borrowing repo_config as mutable directly or refactoring process_relevance to accept an immutable reference if possible.


90-99: Enhance clarity by renaming variables

In get_included_and_excluded_files, consider renaming smallfiles to included_files for consistency and better readability, as it pairs with excluded_files and indicates their purpose clearly.

Apply this diff:

 fn get_included_and_excluded_files(review: &Review) -> Option<(Vec<StatItem>, Vec<StatItem>)> {
     let fileopt = get_excluded_files(&review);
     log::debug!("[process_review_changes] fileopt = {:?}", &fileopt);
     if fileopt.is_none() {
         log::error!("[process_review_changes] No files to review for PR {}", review.id());
         return None;
     }
-    let (excluded_files, smallfiles) = fileopt.expect("fileopt is empty");
-    return Some((excluded_files, smallfiles));
+    let (excluded_files, included_files) = fileopt.expect("fileopt is empty");
+    return Some((excluded_files, included_files));
 }

Line range hint 101-117: Add error handling in calculate_hunkmap

The function calculate_hunkmap assumes all operations succeed. To prevent potential panics or undefined behavior, add error handling for operations like generate_diff, process_diffmap, and generate_blame, which may fail or return invalid data.


234-236: Consistent error logging format

Ensure that the error message in create_and_save_github_review_object follows the same format and detail level as other error logs. This enhances log readability and aids in debugging.

vibi-dpu/src/graph/utils.rs (5)

91-94: Check file existence before reading

The function attempts to read the file before checking if it exists. It's more efficient to check for the file's existence first to avoid unnecessary operations.

Apply this diff to reorder the checks:

- let content_res = fs::read_to_string(path);
- if !path.exists() {
+ if !path.exists() {
    log::error!("[read_file] File does not exist: {:?}", &path);
    return None;
- }
- if content_res.is_err() {
+ }
+ let content_res = fs::read_to_string(path);
+ if content_res.is_err() {
    let err = content_res.expect_err("Empty error in content_res");
    log::error!("[read_file] Error in reading content: {:?}", err);
    return None;
}

184-184: Adjust line numbering to start from 1

In the numbered_content function, line numbering starts from 0. Typically, line numbers start from 1 to align with common conventions.

Apply this diff to adjust the line numbering:

- .map(|(index, line)| format!("{} {}", index, line))
+ .map(|(index, line)| format!("{} {}", index + 1, line))

200-200: Correct typo in error message

There's a typographical error in the error message: "deserialze" should be "deserialize".

Apply this diff to correct the typo:

- return Some(rel_path.to_str().expect("Unable to deserialze rel_path").to_string());
+ return Some(rel_path.to_str().expect("Unable to deserialize rel_path").to_string());

243-253: Duplicate entries for "Sass" in the extension map

The extension map has duplicate entries for "Sass" with extensions "scss" and "sass". While this may be intentional to cover different file extensions, ensure that it doesn't cause any unintended behavior.

If intentional, consider adding a comment for clarity:

+ // Both .scss and .sass extensions are used for Sass files

161-162: Remove misleading comment

The comment suggests returning an empty PathBuf, but the function returns None when no match is found. This could confuse future maintainers.

Apply this diff to remove or correct the comment:

- // Return an empty PathBuf or handle the case where no match is found
+ // Return None if no matching path is found
vibi-dpu/src/core/relevance.rs (1)

212-218: Add a newline after the colon for better readability

In the message indicating the ignored files, adding a newline after the colon improves readability by separating the introductory text from the list.

Apply this diff:

-comment += "Ignoring following files due to large size: ";
+comment += "Ignoring following files due to large size:\n";

This change will ensure that the list of files starts on a new line, making the output cleaner and easier to read.

vibi-dpu/src/graph/function_call.rs (2)

234-238: Correct the log message to reflect the function name

In the new() function of FunctionCallIdentifier, the error message incorrectly references [function_calls_in_chunk]. It should reference [FunctionCallIdentifier/new] or a similar identifier to accurately reflect the function where the error occurred.

Apply this diff to fix the log message:

 if system_prompt_opt.is_none() {
-    log::error!("[function_calls_in_chunk] Unable to read prompt_function_calls");
+    log::error!("[FunctionCallIdentifier/new] Unable to read prompt_function_calls");
     return None;
 }

64-64: Fix typo in error message: "Uncuaght" should be "Uncaught"

There's a typo in the error message on line 64. The word "Uncuaght" should be corrected to "Uncaught".

Apply this diff to fix the typo:

 let func_call_chunk: FunctionCallChunk = deserialized_response.expect("Uncuaght error in deserialized_response");
+// Corrected spelling of "Uncaught"
vibi-dpu/src/graph/elements.rs (1)

346-370: Add unit tests for the 'add_edge' method to ensure correctness

The add_edge method is central to building the graph elements. Adding unit tests will help verify its behavior under various scenarios and catch potential bugs early.

Would you like assistance in generating unit tests for this method?

vibi-dpu/src/graph/file_imports.rs (1)

365-365: Correct the logging message to reflect the actual function name

The log message on line 365 incorrectly references [get_import_lines]. It should be [get_import_path_file] to accurately reflect the current function and aid in debugging.

Apply this diff to fix the logging message:

-log::error!("[get_import_lines] Unable to read file: {:?}, error: {:?}", file_path, e);
+log::error!("[get_import_path_file] Unable to read file: {:?}, error: {:?}", file_path, e);
vibi-dpu/src/graph/function_line_range.rs (3)

248-259: Remove commented-out code to enhance readability

The code between lines 248 and 259 is commented out. Leaving large sections of commented code can clutter the codebase and reduce readability. If this code is no longer needed, consider removing it. If it needs to be retained for future reference, provide a comment explaining why it's commented out.


475-477: Remove unused commented-out code

The code between lines 475 and 477 is commented out and appears to be unused. Removing dead code helps keep the codebase clean and maintainable.


126-195: Add unit tests for critical functions

Functions like FunctionDefIdentifier::new and function_defs_in_file are central to the application's functionality but do not have accompanying unit tests. Adding tests can help ensure correctness and catch regressions in future changes.

Would you like assistance in writing unit tests for these functions?

vibi-dpu/src/utils/gitops.rs (1)

Line range hint 519-525: Incorrect formatting of access_token in Bitbucket clone URL

In the create_clone_url function, while constructing the clone URL for Bitbucket repositories, the access_token is enclosed within extra curly braces, which may lead to an incorrect URL format.

Line 523~:

.replace("git@", format!("https://x-token-auth:{{{access_token}}}@").as_str())

The format! macro interprets {{ and }} as literal { and }, resulting in the access_token being wrapped in braces in the output URL. This could cause authentication issues when cloning the repository.

Suggested fix:

Remove the extra curly braces around {access_token} to correctly format the URL:

- .replace("git@", format!("https://x-token-auth:{{{access_token}}}@").as_str())
+ .replace("git@", format!("https://x-token-auth:{access_token}@").as_str())
vibi-dpu/src/graph/graph_edges.rs (1)

12-190: Remove or document the large block of commented-out code

The incoming_edges function contains a substantial block of commented-out code (lines 12 to 190). If this code is no longer needed, consider removing it to improve readability. If it is intended for future use or reference, please add comments explaining its purpose.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 613a037 and 0ba7fc5.

📒 Files selected for processing (23)
  • Dockerfile (2 hunks)
  • vibi-dpu/Cargo.toml (3 hunks)
  • vibi-dpu/src/core/diff_graph.rs (1 hunks)
  • vibi-dpu/src/core/mod.rs (1 hunks)
  • vibi-dpu/src/core/relevance.rs (4 hunks)
  • vibi-dpu/src/core/review.rs (6 hunks)
  • vibi-dpu/src/core/trigger.rs (1 hunks)
  • vibi-dpu/src/db/review.rs (1 hunks)
  • vibi-dpu/src/graph/elements.rs (1 hunks)
  • vibi-dpu/src/graph/file_imports.rs (1 hunks)
  • vibi-dpu/src/graph/function_call.rs (1 hunks)
  • vibi-dpu/src/graph/function_line_range.rs (1 hunks)
  • vibi-dpu/src/graph/function_name.rs (1 hunks)
  • vibi-dpu/src/graph/gitops.rs (1 hunks)
  • vibi-dpu/src/graph/graph_edges.rs (1 hunks)
  • vibi-dpu/src/graph/graph_info.rs (1 hunks)
  • vibi-dpu/src/graph/mermaid_elements.rs (1 hunks)
  • vibi-dpu/src/graph/mod.rs (1 hunks)
  • vibi-dpu/src/graph/utils.rs (1 hunks)
  • vibi-dpu/src/main.rs (1 hunks)
  • vibi-dpu/src/utils/gitops.rs (4 hunks)
  • vibi-dpu/src/utils/relevance.rs (1 hunks)
  • vibi-dpu/src/utils/repo_config.rs (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • vibi-dpu/src/db/review.rs
  • vibi-dpu/src/utils/relevance.rs
🧰 Additional context used
🔇 Additional comments (14)
vibi-dpu/src/core/mod.rs (1)

8-8: LGTM! New module declaration added correctly.

The addition of the diff_graph module is consistent with the PR objectives for implementing a Diff Graph. The module is correctly declared as public, allowing it to be accessed from outside the core module.

To ensure the new module is properly implemented, please run the following script:

This script will help verify:

  1. The existence of the diff_graph.rs file in the correct location.
  2. That the diff_graph module contains some basic Rust constructs (functions, structs, enums, or traits).
  3. Usage of the diff_graph module in other parts of the codebase.
✅ Verification successful

Verified: diff_graph module added successfully.

The diff_graph module exists in the correct location and contains the necessary implementation. There are no issues detected with this addition.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and basic structure of the diff_graph module

# Test 1: Check if the diff_graph.rs file exists
echo "Checking for diff_graph.rs file..."
fd --type f "diff_graph.rs" src/core

# Test 2: Verify that the diff_graph module is not empty
echo "Checking contents of diff_graph.rs..."
rg --type rust "fn|struct|enum|trait" src/core/diff_graph.rs

# Test 3: Look for usage of the diff_graph module in other files
echo "Checking for usage of diff_graph module..."
rg --type rust "use (crate::)?core::diff_graph" src

Length of output: 615


Script:

#!/bin/bash
# Description: Verify the existence and basic structure of the diff_graph module with corrected path

# Test 1: Check if the diff_graph.rs file exists
echo "Checking for diff_graph.rs file in vibi-dpu/src/core..."
fd --type f "diff_graph.rs" vibi-dpu/src/core

# Test 2: Verify that the diff_graph module is not empty
echo "Checking contents of vibi-dpu/src/core/diff_graph.rs..."
rg --type rust "fn|struct|enum|trait" vibi-dpu/src/core/diff_graph.rs

# Test 3: Look for usage of the diff_graph module in other files
echo "Checking for usage of diff_graph module in the codebase..."
rg --type rust "use (crate::)?vibi_dpu::core::diff_graph" vibi-dpu/src

Length of output: 933

vibi-dpu/src/utils/repo_config.rs (2)

28-29: LGTM! Default implementation looks good.

The changes to the default() method are correct and well-implemented:

  • Initializing diff_graph to false by default is a good choice, suggesting it's an opt-in feature.
  • The syntax is correct, including the trailing comma after auto_assign.

Line range hint 1-32: Overall, the changes look good and are well-implemented.

The addition of the diff_graph field and its associated getter method are consistent with the PR objectives. The implementation follows Rust best practices and maintains the existing code structure. Consider adding documentation comments for the new field and method to improve code clarity and maintainability.

vibi-dpu/Cargo.toml (2)

3-3: Verify the major version bump and provide a changelog.

The package version has been updated from 1.0.0 to 2.0.0, which indicates a major release with potential breaking changes.

Please confirm:

  1. Is this major version bump intentional?
  2. Are there breaking changes that justify this bump?
  3. Has a changelog been prepared to document the significant changes in this version?

If a changelog hasn't been prepared yet, please consider adding one to help users understand the major changes and any migration steps required.


40-40: Verify usage and license compatibility of the new walkdir dependency.

The addition of the walkdir dependency is likely related to new functionality for traversing directory structures, possibly for Git operations or file system tasks.

Please ensure the following:

  1. Verify the usage of walkdir in the codebase:

  2. Confirm that the Unlicense/MIT license of walkdir is compatible with your project's GPL-3.0-or-later license. While they are generally compatible, it's good practice to explicitly verify this.

  3. Update the project's documentation or README to mention this new dependency and its purpose in the project.

If walkdir is not currently used, consider removing it to keep the dependencies minimal, or add a TODO comment to implement its functionality in the future.

Dockerfile (1)

7-7: Addition of 'ripgrep' package: Approved

The inclusion of 'ripgrep' alongside 'ca-certificates' and 'git' is a good addition. Ripgrep is a fast, efficient tool for searching text, which can be beneficial for various operations within the container.

vibi-dpu/src/core/trigger.rs (1)

51-51: Approve change with suggestions for verification and documentation.

The modification simplifies the process_trigger function by consolidating the review processing logic into a single call to process_review_changes. This is a good improvement in terms of code organization and readability.

However, please ensure the following:

  1. Verify that error handling in the updated process_review_changes function is comprehensive, especially considering it now encompasses the functionality previously handled by send_hunkmap.

  2. Update the documentation for process_review_changes to reflect its new parameters and expanded responsibilities if this hasn't been done already.

To verify the changes in process_review_changes, please run the following script:

vibi-dpu/src/graph/function_name.rs (2)

73-75: Avoid unnecessary cloning of String when caching

Cloning String instances can be expensive. Since you own the String, consider using references or cloning only when necessary.

[performance]

Apply this diff to optimize cloning:

 // In function_name_in_line
 if let Some(cached_func_name) = self.cached_output.get(code_line) {
-    return Some(FunctionNameOutput{ function_name: cached_func_name.to_string(), notes: None })
+    return Some(FunctionNameOutput{ function_name: cached_func_name.clone(), notes: None })
 }

 // When inserting into the cache
- self.cached_output.insert(code_line.to_string(), func_calls.get_function_name().to_string());
+ self.cached_output.insert(code_line.to_string(), func_calls.get_function_name().clone());

Alternatively, adjust the types to use references if possible.

Also applies to: 100-101


86-86: Ensure the final prompt is correctly formatted

Double-check that the prompt sent to the LLM API matches the expected format. The \nOutput - may need to be adjusted depending on the API's requirements.

Confirm that the LLM API expects the prompt in this format. If not, adjust accordingly.

vibi-dpu/src/graph/gitops.rs (1)

214-218: Verify the correctness of end line calculations in hunk parsing.

The calculation of current_del_end and current_add_end uses start + len - 1. Ensure that subtracting one from start + len accurately reflects the end line number, as off-by-one errors can occur if len is zero or if the ranges are misinterpreted.

Run the following script to check for potential off-by-one errors:

vibi-dpu/src/graph/utils.rs (2)

81-82: Ensure consistency in response trimming

The check for starting with "{" and not ending with "}" may not effectively handle all cases. Additionally, appending "}" without ensuring the JSON structure is correct might lead to parsing issues.

Consider reviewing the logic for trimming and fixing the final response. Ensure that the JSON response is well-formed before processing.


70-70: ⚠️ Potential issue

Handle parsing errors without panicking

Using expect can cause a panic if an error occurs. Instead, handle the error gracefully to improve the robustness of the application.

Apply this diff to handle parsing errors:

- let parsed_chunk = parsed_chunk_res.expect("Uncaught error in parsed_chunk_res");
+ let parsed_chunk = match parsed_chunk_res {
+     Ok(value) => value,
+     Err(e) => {
+         log::error!("[call_llm_api] Error parsing chunk: {:?}", e);
+         continue;
+     }
+ };

Likely invalid or redundant comment.

vibi-dpu/src/core/relevance.rs (1)

7-7: Verify all calls to process_relevance include the new excluded_files parameter

Since you've added the new parameter excluded_files to the process_relevance function signature, ensure that all calls to this function throughout the codebase are updated accordingly to prevent compilation errors.

Run the following script to find all calls to process_relevance:

✅ Verification successful

All calls to process_relevance include the new excluded_files parameter.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find all calls to `process_relevance` in the codebase.

rg --type rust 'process_relevance\('

Length of output: 263

vibi-dpu/src/graph/graph_edges.rs (1)

192-193: ⚠️ Potential issue

Correct the log message to reflect the current function

In the incoming_edges function, the log message incorrectly references [outgoing_edges] instead of [incoming_edges]. Please update the log message for accuracy and consistency.

Apply this diff to correct the log message:

- log::debug!("[outgoing_edges] Unable to create func def identifier");
+ log::debug!("[incoming_edges] Unable to create func def identifier");

Likely invalid or redundant comment.

@@ -21,7 +21,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
base64ct = "1.5.3"
sha256 = "1.1.1"
reqwest = { version = "0.11", features = ["json", "blocking"] }
reqwest = { version = "0.11", features = ["json", "blocking", "stream"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

The "stream" feature added to reqwest is not utilized in the codebase.

Consider removing this feature to maintain minimal and efficient dependencies.

🔗 Analysis chain

Verify usage of the new reqwest "stream" feature.

The addition of the "stream" feature to the reqwest dependency is a good improvement that can enable more efficient handling of large HTTP responses.

To ensure this new feature is being utilized, please run the following script to check for its usage in the codebase:

If the feature is not currently used, consider removing it to keep the dependencies minimal, or add a TODO comment to implement streaming in the future.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for usage of reqwest streaming functionality

# Test: Search for common streaming methods from reqwest
rg --type rust 'reqwest::.*Client.*stream' || echo "No direct usage of reqwest streaming found."

Length of output: 141

@@ -45,7 +45,7 @@ ENV PROVIDER=$PROVIDER
COPY ./vibi-dpu/target/debug/vibi-dpu /app/vibi-dpu
COPY ./pubsub-sa.json /app/pubsub-sa.json
COPY ./repo-profiler.pem /app/repo-profiler.pem

COPY ./prompts /app/prompts
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Issue Detected with prompts Directory

The prompts directory does not exist in the repository, which will cause the Docker build to fail when attempting to copy it.

  • Dockerfile (Line 48)
    COPY ./prompts /app/prompts
    
🔗 Analysis chain

New step to copy 'prompts' directory: Approved

The addition of this step to copy the ./prompts directory into the container at /app/prompts suggests that the application now utilizes prompt files. This is likely related to new functionality, possibly involving AI or templating features.

To ensure the prompts directory exists and contains necessary files, let's run a verification script:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence and contents of the prompts directory

# Check if the prompts directory exists
if [ -d "./prompts" ]; then
    echo "prompts directory exists."
    # List contents of the prompts directory
    echo "Contents of prompts directory:"
    ls -la ./prompts
else
    echo "Error: prompts directory does not exist."
fi

Length of output: 113

use crate::core::github;
use crate::utils::gitops::StatItem;

pub async fn send_diff_graph(review: &Review, excluded_files: &Vec<StatItem>, small_files: &Vec<StatItem>, access_token: &str) {
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Use slices &[StatItem] instead of &Vec<StatItem> for function parameters

In Rust, it's more idiomatic to accept slices (&[T]) rather than references to vectors (&Vec<T>). This allows for more flexible function signatures and can accept both slices and vectors without unnecessary constraints.

Apply this diff to update the function signatures:

-pub async fn send_diff_graph(review: &Review, excluded_files: &Vec<StatItem>, small_files: &Vec<StatItem>, access_token: &str) {
+pub async fn send_diff_graph(review: &Review, excluded_files: &[StatItem], small_files: &[StatItem], access_token: &str) {
-async fn diff_graph_comment_text(excluded_files: &Vec<StatItem>, small_files: &Vec<StatItem>, review: &Review) -> String {
+async fn diff_graph_comment_text(excluded_files: &[StatItem], small_files: &[StatItem], review: &Review) -> String {
-async fn mermaid_comment(diff_files: &Vec<StatItem>, review: &Review) -> Option<String> {
+async fn mermaid_comment(diff_files: &[StatItem], review: &Review) -> Option<String> {

Also applies to: 18-18, 33-33

Comment on lines +33 to +39
async fn mermaid_comment(diff_files: &Vec<StatItem>, review: &Review) -> Option<String> {
let flowchart_str_opt = generate_mermaid_flowchart(diff_files, review).await;
if flowchart_str_opt.is_none() {
log::error!("[mermaid_comment] Unable to generate flowchart for review: {}", review.id());
return None;
}
let flowchart_str = flowchart_str_opt.expect("Empty flowchart_str_opt");
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Simplify mermaid_comment function using if let

You can streamline the handling of flowchart_str_opt by using if let Some(...) instead of separately checking for None and then unwrapping with expect.

Apply this diff to refactor the function:

 async fn mermaid_comment(diff_files: &[StatItem], review: &Review) -> Option<String> {
-    let flowchart_str_opt = generate_mermaid_flowchart(diff_files, review).await;
-    if flowchart_str_opt.is_none() {
+    if let Some(flowchart_str) = generate_mermaid_flowchart(diff_files, review).await {
+        let mermaid_comment = format!(
+            "### Call Stack Diff\n```mermaid\n{}\n```",
+            flowchart_str,
+        );
+        Some(mermaid_comment)
+    } else {
         log::error!("[mermaid_comment] Unable to generate flowchart for review: {}", review.id());
-        return None;
-    }
-    let flowchart_str = flowchart_str_opt.expect("Empty flowchart_str_opt");
-    let mermaid_comment = format!(
-        "### Call Stack Diff\n```mermaid\n{}\n```",
-        flowchart_str,
-    );
-    return Some(mermaid_comment);
+        None
+    }
 }

pub async fn send_diff_graph(review: &Review, excluded_files: &Vec<StatItem>, small_files: &Vec<StatItem>, access_token: &str) {
let comment = diff_graph_comment_text(excluded_files, small_files, review).await;
// add comment for GitHub
if review.provider().to_string() == ProviderEnum::Github.to_string() {
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Simplify enum comparison by matching enum variants directly

Instead of converting enums to strings for comparison, you can compare enums directly. This makes the code more idiomatic and efficient.

Apply this diff to simplify the comparison:

-if review.provider().to_string() == ProviderEnum::Github.to_string() {
+if review.provider() == &ProviderEnum::Github {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if review.provider().to_string() == ProviderEnum::Github.to_string() {
if review.provider() == &ProviderEnum::Github {

Comment on lines +383 to +458
async fn process_func_defs(review: &Review, funcdef_identifier: &mut FunctionDefIdentifier,
diff_graph: &DiffGraph, func_call_identifier: &mut FunctionCallIdentifier,
graph_elems: &mut MermaidGraphElements, edge_color: &str)
{
for (dest_filename, dest_file_hunks) in diff_graph.hunk_diff_map().file_line_map() {
let dest_lang_opt = detect_language(&dest_filename);
if dest_lang_opt.is_none() {
log::error!("[process_func_defs] Unable to detect language: {}", dest_filename);
continue;
}
let dest_lang = dest_lang_opt.expect("Empty dest_lang_opt");
let func_defs;
if edge_color == "red" {
func_defs = dest_file_hunks.deleted_hunks();
} else {
func_defs = dest_file_hunks.added_hunks();
}
for dest_func in func_defs {
if let Some(dest_func_name) = dest_func.function_name() {
if let Some(dest_funcdef_line) = dest_func.line_number() {
if let Some(possible_filepaths) =
function_calls_search(review, dest_func_name, &dest_lang)
{
if possible_filepaths.is_empty() {
log::debug!("[process_func_defs] No files detected having function call");
continue;
}
for possible_filepath in possible_filepaths {
if possible_filepath == *dest_filename {
continue;
}
let lang_opt = detect_language(&possible_filepath);
if lang_opt.is_none() {
log::debug!("[process_func_defs] Unable to determine language: {}", &possible_filepath);
continue;
}
let lang = lang_opt.expect("Empty lang_opt");
if lang != dest_lang {
log::debug!("[process_func_defs] Different languages: {}, {}", &lang, &dest_lang);
continue;
}
let possible_path = Path::new(&possible_filepath);
let possible_pathbuf = possible_path.to_path_buf();
// get func call
if let Some(func_calls) = func_call_identifier.functions_in_file(&possible_pathbuf, &lang).await {
// get func def
for func_call in func_calls.function_calls() {
if let Some(src_func_def) = get_function_def_for_func_call(
&possible_pathbuf, func_call.line_number().to_owned() as usize
).await {
if let Some(source_filename) = absolute_to_relative_path(&possible_filepath, review) {
// add edge
let mut dest_file_rel = dest_filename.to_string();
if let Some(dest_file_relative_path) = absolute_to_relative_path(&dest_filename, review) {
dest_file_rel = dest_file_relative_path;
}
graph_elems.add_edge(edge_color,
func_call.line_number().to_owned() as usize,
src_func_def.name(),
dest_func_name,
&source_filename,
&dest_file_rel,
"",
edge_color,
src_func_def.line_start(),
dest_funcdef_line);
}
}
}
}
}
}
}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider refactoring process_func_defs for maintainability

The process_func_defs function is lengthy and contains nested loops and conditionals. Refactoring it into smaller functions can improve readability and make the codebase easier to maintain.

Potential refactoring steps:

  • Create helper functions for handling different languages.
  • Extract the logic for processing possible file paths into a separate function.
  • Modularize the edge creation logic.

This would enhance the structure of the code and facilitate easier debugging and testing.

Comment on lines +6 to +458
src_func_name,
dest_func_call.function_name(),
&source_file_name,
&possible_file_rel,
edge_color,
"",
src_func_line_number,
&dest_func_def_line);
}
}
}
}
}
}
}
}
}
}
}
}
}
// get import and path
}

async fn process_func_defs(review: &Review, funcdef_identifier: &mut FunctionDefIdentifier,
diff_graph: &DiffGraph, func_call_identifier: &mut FunctionCallIdentifier,
graph_elems: &mut MermaidGraphElements, edge_color: &str)
{
for (dest_filename, dest_file_hunks) in diff_graph.hunk_diff_map().file_line_map() {
let dest_lang_opt = detect_language(&dest_filename);
if dest_lang_opt.is_none() {
log::error!("[process_func_defs] Unable to detect language: {}", dest_filename);
continue;
}
let dest_lang = dest_lang_opt.expect("Empty dest_lang_opt");
let func_defs;
if edge_color == "red" {
func_defs = dest_file_hunks.deleted_hunks();
} else {
func_defs = dest_file_hunks.added_hunks();
}
for dest_func in func_defs {
if let Some(dest_func_name) = dest_func.function_name() {
if let Some(dest_funcdef_line) = dest_func.line_number() {
if let Some(possible_filepaths) =
function_calls_search(review, dest_func_name, &dest_lang)
{
if possible_filepaths.is_empty() {
log::debug!("[process_func_defs] No files detected having function call");
continue;
}
for possible_filepath in possible_filepaths {
if possible_filepath == *dest_filename {
continue;
}
let lang_opt = detect_language(&possible_filepath);
if lang_opt.is_none() {
log::debug!("[process_func_defs] Unable to determine language: {}", &possible_filepath);
continue;
}
let lang = lang_opt.expect("Empty lang_opt");
if lang != dest_lang {
log::debug!("[process_func_defs] Different languages: {}, {}", &lang, &dest_lang);
continue;
}
let possible_path = Path::new(&possible_filepath);
let possible_pathbuf = possible_path.to_path_buf();
// get func call
if let Some(func_calls) = func_call_identifier.functions_in_file(&possible_pathbuf, &lang).await {
// get func def
for func_call in func_calls.function_calls() {
if let Some(src_func_def) = get_function_def_for_func_call(
&possible_pathbuf, func_call.line_number().to_owned() as usize
).await {
if let Some(source_filename) = absolute_to_relative_path(&possible_filepath, review) {
// add edge
let mut dest_file_rel = dest_filename.to_string();
if let Some(dest_file_relative_path) = absolute_to_relative_path(&dest_filename, review) {
dest_file_rel = dest_file_relative_path;
}
graph_elems.add_edge(edge_color,
func_call.line_number().to_owned() as usize,
src_func_def.name(),
dest_func_name,
&source_filename,
&dest_file_rel,
"",
edge_color,
src_func_def.line_start(),
dest_funcdef_line);
}
}
}
}
}
}
}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add unit and integration tests for new functionalities

The new functions introduced in this file lack accompanying unit or integration tests. Implementing tests will help ensure the correctness of these functions and prevent future regressions.

Would you like assistance in generating test cases or setting up a testing framework for these functions?

Comment on lines +238 to +239
if func_call_identifier_opt.is_none() {
log::error!("[incoming_edges] Unable to create new FunctionCallIdentifier");
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Update log message to match the function context

In the outgoing_edges function, the log message references [incoming_edges] instead of [outgoing_edges]. This may cause confusion when debugging. Please correct the log message.

Apply this diff to fix the log message:

- log::error!("[incoming_edges] Unable to create new FunctionCallIdentifier");
+ log::error!("[outgoing_edges] Unable to create new FunctionCallIdentifier");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if func_call_identifier_opt.is_none() {
log::error!("[incoming_edges] Unable to create new FunctionCallIdentifier");
if func_call_identifier_opt.is_none() {
log::error!("[outgoing_edges] Unable to create new FunctionCallIdentifier");

Comment on lines +191 to +196
let func_def_identifier_opt = FunctionDefIdentifier::new();
if func_def_identifier_opt.is_none() {
log::debug!("[outgoing_edges] Unable to create func def identifier");
return;
}
let mut funcdef_identifier = func_def_identifier_opt.expect("Empty func_def_identifier_opt");
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Ensure consistent variable naming for func_def_identifier

There is inconsistent naming between func_def_identifier_opt and funcdef_identifier. For clarity and maintainability, consider using a consistent naming convention throughout the code.

Apply this diff to use func_def_identifier consistently:

- let mut funcdef_identifier = func_def_identifier_opt.expect("Empty func_def_identifier_opt");
+ let mut func_def_identifier = func_def_identifier_opt.expect("Empty func_def_identifier_opt");

And update subsequent references to funcdef_identifier accordingly.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
let func_def_identifier_opt = FunctionDefIdentifier::new();
if func_def_identifier_opt.is_none() {
log::debug!("[outgoing_edges] Unable to create func def identifier");
return;
}
let mut funcdef_identifier = func_def_identifier_opt.expect("Empty func_def_identifier_opt");
let func_def_identifier_opt = FunctionDefIdentifier::new();
if func_def_identifier_opt.is_none() {
log::debug!("[outgoing_edges] Unable to create func def identifier");
return;
}
let mut func_def_identifier = func_def_identifier_opt.expect("Empty func_def_identifier_opt");

Comment on lines +244 to +254
if import_identifier_opt.is_none() {
log::debug!("[outgoing_edges] Unable to create import identifier");
return;
}
let mut import_identifier = import_identifier_opt.expect("Empty import_identifier_opt");
let func_def_identifier_opt = FunctionDefIdentifier::new();
if func_def_identifier_opt.is_none() {
log::debug!("[outgoing_edges] Unable to create func def identifier");
return;
}
let mut funcdef_identifier = func_def_identifier_opt.expect("Empty func_def_identifier_opt");
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Maintain consistent variable naming for func_def_identifier

Similar to the earlier comment, ensure that the variable naming is consistent between func_def_identifier_opt and funcdef_identifier in the outgoing_edges function.

Apply this diff to maintain consistency:

- let mut funcdef_identifier = func_def_identifier_opt.expect("Empty func_def_identifier_opt");
+ let mut func_def_identifier = func_def_identifier_opt.expect("Empty func_def_identifier_opt");

And update all instances of funcdef_identifier to func_def_identifier in this context.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if import_identifier_opt.is_none() {
log::debug!("[outgoing_edges] Unable to create import identifier");
return;
}
let mut import_identifier = import_identifier_opt.expect("Empty import_identifier_opt");
let func_def_identifier_opt = FunctionDefIdentifier::new();
if func_def_identifier_opt.is_none() {
log::debug!("[outgoing_edges] Unable to create func def identifier");
return;
}
let mut funcdef_identifier = func_def_identifier_opt.expect("Empty func_def_identifier_opt");
if import_identifier_opt.is_none() {
log::debug!("[outgoing_edges] Unable to create import identifier");
return;
}
let mut import_identifier = import_identifier_opt.expect("Empty import_identifier_opt");
let func_def_identifier_opt = FunctionDefIdentifier::new();
if func_def_identifier_opt.is_none() {
log::debug!("[outgoing_edges] Unable to create func def identifier");
return;
}
let mut func_def_identifier = func_def_identifier_opt.expect("Empty func_def_identifier_opt");

@tapishr tapishr merged commit 0660db6 into main Oct 12, 2024
2 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.

2 participants