-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Rust: extract source files of dependencies #19506
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
dd5c487
Rust: extract source files of depdendencies
aibaars f05bed6
Rust: remove module data from Crate elements
aibaars 980cebe
Rust: fix QL code after removing Crate::getModule()
aibaars 0bb0a70
Rust: add upgrade/downgrade scripts
aibaars 8996f9e
Rust: Follow-up work to make path resolution and type inference tests…
hvitved 1269a2e
Rust: fix extractor-tests
aibaars 456a4b2
Rust: Make `dataflow/modeled` pass by not using `#[derive(Clone)]`
hvitved 44a4045
Rust: fixes
aibaars 643059e
Rust: fix type-interence file paths
aibaars 67846f1
fixup TestUtils
aibaars 3761099
Rust: drop Param::pat when extracting libraries
aibaars 5ee7658
Rust: update DataFlowStep.expected
aibaars 457632e
Rust: update UncontrolledAllocationSize.expected
aibaars e90ab7b
Rust: fix diagnostics tests
aibaars 76da2e4
Rust: drop crate_graph/modules.ql test
aibaars 81f0e42
Rust: improve ExtractionConsistency.ql
aibaars f093c49
Rust: normalize file paths for PathResolutionConsistency.ql
aibaars 9ee0d2e
Rust: Exclude flow summary nodes from `DataFlowStep.ql`
hvitved c69aa22
Rust: restrict to library files
aibaars 1eaa491
Rust: update integration tests
aibaars 2a93b2a
Rust: integration-tests: update output
aibaars fa1a21b
Rust: reduce log-level of diagnostics when extracting library files
aibaars a6cd60f
Rust: address comments
aibaars 28be208
Rust: drop too noisy log statements
aibaars 76737cb
Rust: Follow-up changes after rebase
hvitved 7e5f652
Rust: disable ResolvePaths when extracting library source files
aibaars a4788fd
Rust: update expected output
aibaars df99e06
Rust: temporarily disable attribute macro expansion in library mode
aibaars b62d52e
Rust: prevent source files from being extracted in both source and li…
aibaars 23b4e50
Rust: update expected output
aibaars c8ff69a
Rust: Fix bad join
hvitved 5b28ff1
Merge branch 'main' into aibaars/rust-extract-libs
aibaars File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Rust: address comments
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot shake the feeling this is a bit a roundabout way of doing it: what I mean, is reconstructing the context around the AstNode by visiting the parent, when the emission was requested by emitting the parent already.
I wonder if we shouldn't do this by generating a new exclusion point where the emission of the body takes place. What about having this in the template for ast node emission:
(and adding
is_body: field.name == "body",
to theFieldType::Optional(ty) => ExtractorNodeFieldInfo
creation). This will cover all possible bodies, and avoid their emission at the sources without working up the AST. For example:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, the above does not also skip pat, but something could be done there at generation level as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's what I mean: #19559 shifts the logic from climbing up the AST in the base extractor to generating the property skipping at field emission level, with the logic in the ast-generator instead.