Skip to content

Conversation

@asgerf
Copy link
Contributor

@asgerf asgerf commented Feb 18, 2025

Fixes #18801

This fixes the bug that was supposed to be fixed in #18550, but that PR only fixed it in the legacy entry-point used by qltest. Meaning it worked in tests but not in production 🤦. This PR uses the same fix in AutoBuild entry point. We should unify the two entry points ASAP but for now this PR just fixes the bug.

Copilot AI review requested due to automatic review settings February 18, 2025 11:47
@asgerf asgerf requested a review from a team as a code owner February 18, 2025 11:47
@asgerf asgerf added the no-change-note-required This PR does not need a change note label Feb 18, 2025
@github-actions github-actions bot added JS and removed no-change-note-required This PR does not need a change note labels Feb 18, 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.

PR Overview

This PR fixes a bug where TypeScript snippets were not being extracted in production due to a missing tsconfig.json, by applying the same fix previously used for qltest to the AutoBuild entry point.

  • Adds extraction logic for TypeScript snippets from state.getSnippets()
  • Ensures that remaining TypeScript files include snippets that haven’t been extracted
  • Maintains the existing file ordering and extraction process

Changes

File Description
javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java Added a loop to iterate over TS snippets and add them to the extraction queue if not already processed

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java:1092

  • Verify that FileType is implemented as an enum; if it is not, consider using .equals() instead of '==' to ensure proper comparison.
&& FileType.forFileExtension(entry.getKey().toFile()) == FileType.TYPESCRIPT) {

javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java:1090

  • [nitpick] Consider renaming 'entry' to a more descriptive name such as 'snippetEntry' to improve code clarity.
for (Map.Entry<Path, FileSnippet> entry : state.getSnippets().entrySet()) {

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

Copy link
Contributor

@erik-krogh erik-krogh left a comment

Choose a reason for hiding this comment

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

👍

We should unify the two entry points

I assume you have that on some list of yours?

@asgerf
Copy link
Contributor Author

asgerf commented Feb 18, 2025

I assume you have that on some list of yours?

I've created an issue for it as I couldn't find one.

@asgerf
Copy link
Contributor Author

asgerf commented Feb 18, 2025

Re-running DCA as performance numbers were unexpected and suspicious

@asgerf
Copy link
Contributor Author

asgerf commented Feb 19, 2025

Evaluation looks good now.

@asgerf asgerf merged commit a5fde9c into github:main Feb 19, 2025
6 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.

CodeQL database creation loses AST information when processing Vue files with <script setup lang="ts">

2 participants