Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aibaars
Copy link
Contributor

@aibaars aibaars commented May 26, 2025

Copilot AI review requested due to automatic review settings May 26, 2025 16:22
@aibaars aibaars requested a review from a team as a code owner May 26, 2025 16:22
@github-actions github-actions bot added the Rust Pull requests that update Rust code label May 26, 2025
Copy link
Contributor

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

Adds a new flag to control whether dependencies are extracted as full source files rather than libraries, and wires it through the extractor’s configuration, main logic, and YAML schema.

  • Introduce extract_dependencies_as_source in Config
  • Update main.rs to switch extraction mode and path resolution based on the new flag
  • Extend codeql-extractor.yml schema with the new option

Reviewed Changes

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

File Description
rust/extractor/src/config.rs Added extract_dependencies_as_source: bool to Config
rust/extractor/src/main.rs Conditionally select SourceKind and ResolvePaths
rust/codeql-extractor.yml Defined extract_dependencies_as_source schema option
Comments suppressed due to low confidence (1)

rust/extractor/src/main.rs:325

  • [nitpick] This info! call can produce very verbose logs on each file; consider removing it or lowering it to debug! if it was added for temporary debugging.
tracing::info!("file: {}", file.display());

Skip path resolution. This is experimental, while we move path resolution from the extractor to the QL library.
type: string
pattern: "^(false|true)$"
extract_dependencies_as_source:
Copy link

Copilot AI May 26, 2025

Choose a reason for hiding this comment

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

The schema defines this option as a string with a boolean pattern, but Config expects a bool. Change type: string to type: boolean and remove the pattern to align with the Rust flag.

Copilot uses AI. Check for mistakes.
Co-authored-by: Simon Friis Vindum <[email protected]>
Copy link
Contributor

@paldepind paldepind left a comment

Choose a reason for hiding this comment

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

Thanks for implementing this 😄

@aibaars aibaars merged commit d018c02 into main May 27, 2025
14 checks passed
@aibaars aibaars deleted the aibaars/lib-as-source branch May 27, 2025 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants