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

C++: Implement compilation_build_mode #18009

Merged
merged 8 commits into from
Nov 22, 2024
Merged

Conversation

calumgrant
Copy link
Contributor

@calumgrant calumgrant commented Nov 18, 2024

Pull Request checklist

All query authors

Internal query authors only

  • [ ] Autofixes generated based on these changes are valid, only needed if this PR makes significant changes to .ql, .qll, or .qhelp files. See the documentation (internal access required).
  • Changes are validated at scale (internal access required).
  • [ ] Adding a new query? Consider also adding the query to autofix.

@github-actions github-actions bot added the C++ label Nov 18, 2024
* 1 = manual
* 2 = auto
*/
#keyset[id, mode]
Copy link
Contributor

Choose a reason for hiding this comment

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

You should be able to do something like the following (at the very least in a comment). That should give you some identifiers to refer to in the extractor instead of having to hardcoded constants.

case @compilation_build_mode.mode of
  1 = @build_mode_none
| 2 = @build_mode_manual
| 3 = @build_mode_auto
;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. I did not realise this works in comments as well!

Comment on lines 1 to 2
description: Implement compilation_build_mode/2
compatibility: backwards
Copy link
Contributor

Choose a reason for hiding this comment

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

This will need to delete the new table.

@@ -78,7 +78,7 @@
</e>
<e>
<k>@using_enum_declaration</k>
<v>1</v>
<v>0</v>
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you didn't run the internal workflow we have to generate additional data from out tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran the generate-db-stats workflow, downloaded the artefact, and merge was apparently successful:

[13:53:32] [DCA info] Normalizing stats by user-provided 'exprs'.
[13:53:32] [DCA info] Using stats from tests '~/Downloads/testsuite_stats.xml'.
[13:53:32] [DCA info] Using static stat files from /Users/calum/projects/codeql-dca/static-stats/cpp.

what am I missing?

Copy link
Contributor

Choose a reason for hiding this comment

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

That's not possible for me to tell from this alone. Let's discuss internally?

@calumgrant calumgrant force-pushed the calumgrant/bmn/record-build-mode branch from 0948649 to 4136f8d Compare November 19, 2024 14:00
@calumgrant calumgrant force-pushed the calumgrant/bmn/record-build-mode branch from 94f21f5 to 5bc9960 Compare November 21, 2024 13:40
@calumgrant calumgrant force-pushed the calumgrant/bmn/record-build-mode branch from 5bc9960 to 0836c3d Compare November 21, 2024 13:45
@calumgrant calumgrant marked this pull request as ready for review November 21, 2024 14:32
@calumgrant calumgrant requested a review from a team as a code owner November 21, 2024 14:32
@calumgrant calumgrant added the no-change-note-required This PR does not need a change note label Nov 21, 2024
@calumgrant calumgrant merged commit ab9a2bd into main Nov 22, 2024
16 of 17 checks passed
@calumgrant calumgrant deleted the calumgrant/bmn/record-build-mode branch November 22, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants