Skip to content

Shared/Python: #21935 follow up#21998

Merged
MathiasVP merged 2 commits into
github:mainfrom
MathiasVP:fix-autogenerated-dbschemes
Jun 17, 2026
Merged

Shared/Python: #21935 follow up#21998
MathiasVP merged 2 commits into
github:mainfrom
MathiasVP:fix-autogenerated-dbschemes

Conversation

@MathiasVP

Copy link
Copy Markdown
Contributor

In #21935 we added support for YAML comment extraction for all languages which support extraction YAML. However, it turns out there some languages generate the dbscheme from other files which I missed in that PR.

This PR fixes up these issues.

Copilot AI review requested due to automatic review settings June 17, 2026 16:06
@MathiasVP MathiasVP requested review from a team as code owners June 17, 2026 16:06

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 follows up on #21935 by ensuring YAML comment extraction is reflected in dbscheme sources that are generated from templates/prefixes, so affected extractors produce schemas consistent with the shared YAML libraries.

Changes:

  • Add the yaml_comments table to the shared tree-sitter extractor dbscheme prefix.
  • Extend @yaml_locatable to include @yaml_comment so comments can be associated with locations.
  • Mirror the same dbscheme updates in the Python extractor dbscheme.template to keep generated dbschemes in sync.
Show a summary per file
File Description
shared/tree-sitter-extractor/src/generator/prefix.dbscheme Adds yaml_comments and updates @yaml_locatable so generated schemas support YAML comment locations.
python/extractor/semmle/dbscheme.template Updates the Python extractor’s schema template to include yaml_comments and make comments locatable.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@nickrolfe nickrolfe 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.

Looks sensible.

@MathiasVP

Copy link
Copy Markdown
Contributor Author

Locally, this appears to fix the problems we were observing. I'll go ahead and merge this so we can see if it fixes the problems on CI

@MathiasVP MathiasVP merged commit 3dd3e2c into github:main Jun 17, 2026
96 of 115 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants