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

Rust: restrict canonical path calculations #18165

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

redsun82
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Nov 29, 2024
@@ -4,8 +4,8 @@
*/

private import internal.PathImpl
import codeql.rust.elements.AstNode

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.PathSegment
.
@redsun82 redsun82 marked this pull request as draft November 29, 2024 15:00
import codeql.rust.elements.ParenType
import codeql.rust.elements.Pat
import codeql.rust.elements.Path
import codeql.rust.elements.PathAstNode

Check warning

Code scanning / CodeQL

Redundant import Warning

Redundant import, the module is already imported inside
codeql.rust.elements.PathExpr
.
Redundant import, the module is already imported inside
codeql.rust.elements.PathPat
.
Redundant import, the module is already imported inside
codeql.rust.elements.RecordExpr
.
Redundant import, the module is already imported inside
codeql.rust.elements.RecordPat
.
Redundant import, the module is already imported inside
codeql.rust.elements.TupleStructPat
.
@redsun82
Copy link
Contributor Author

redsun82 commented Dec 2, 2024

@hvitved could you lend me a hand here with the dataflow changes? I tried to preserve the implementation while shifting around the path resolution from Path to "stuff with paths" (e.g. PathExpr or RecordExpr and others), but it seems like it's not the case considering the new results in the local data flow tests.

@redsun82
Copy link
Contributor Author

redsun82 commented Dec 2, 2024

Seems like this is helping performance, although not by a great deal: end2end time went down with a median of around -4%, with some faster outliers:
https://github.com/github/codeql-dca-main/blob/data/redsun82/pr-18165-c46f44__nightly__nightly/reports/summaries/time.theme.md#end-to-end-time-per-source

@hvitved
Copy link
Contributor

hvitved commented Dec 4, 2024

@hvitved could you lend me a hand here with the dataflow changes? I tried to preserve the implementation while shifting around the path resolution from Path to "stuff with paths" (e.g. PathExpr or RecordExpr and others), but it seems like it's not the case considering the new results in the local data flow tests.

Aren't the .expected changes merely the result of the improved TupleStructPat.toString implementation? (It would be easier to review, if that change was done as a separate commit).

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.

2 participants