Skip to content

Use a method to handle results without sucess data#1602

Closed
alexet wants to merge 3 commits intomainfrom
alexet/fix-old-results
Closed

Use a method to handle results without sucess data#1602
alexet wants to merge 3 commits intomainfrom
alexet/fix-old-results

Conversation

@alexet
Copy link
Copy Markdown

@alexet alexet commented Oct 14, 2022

This fixes a bug when loading old results where we think they weren't successful. This is a bit awkward due to having to create a method as the old getter would no longer work.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@alexet alexet requested a review from a team as a code owner October 14, 2022 11:22
@charisk
Copy link
Copy Markdown
Contributor

charisk commented Oct 14, 2022

I believe that another way to fix this would be to patch the data when reading it from the query history (see https://github.com/github/vscode-codeql/blob/main/extensions/ql-vscode/src/query-serialization.ts#L29). That way we don't have to deal with the complexity further up.

Copy link
Copy Markdown
Contributor

@aeisenberg aeisenberg left a comment

Choose a reason for hiding this comment

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

Minor suggestion and then good to go.

if(this.successful !== undefined) {
return this.successful;
} else {
return this.result.resultType == legacyMessages.QueryResultType.SUCCESS;
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.

===

@aeisenberg
Copy link
Copy Markdown
Contributor

Actually, I like @charis's idea better.

@aeisenberg
Copy link
Copy Markdown
Contributor

Problem is different from the solution here. There was a typo fix that was merged right around the same time as this and changed the serialization code. #1594 I am going to close this PR and work on a different fix.

@aeisenberg aeisenberg closed this Oct 14, 2022
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