-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: merge current status of experimental extractor into main #17435
Merged
Merged
Changes from 89 commits
Commits
Show all changes
101 commits
Select commit
Hold shift + click to select a range
0e3c867
Toy rust program listing definitions of a cargo project
9277100
Rust: add some configuration and logging
2a2b79e
Rust: skeleton trap file emission code
f40901f
Rust: archiving + skeleton def translator
590a146
Rust: some basic extraction of function names (with locations!)
04753b2
Rust: tweak `trap_key`
3da6cee
Merge branch 'main' into rust-experiment
4f0fe1c
Rust: bazel packaging
7e1290a
Rust: reuse shared rust trap library
885e89a
Rust: first running tests
b23e482
Merge branch 'main' into rust-experiment
52ef1e3
Add 'version' field to generated Cargo.toml file
aibaars be16954
Rust: add autobuild.sh
aibaars 60b349f
Rust: remove 'take(1)' from crates iterator
aibaars d8eb5d4
Rust: run cargo fmt
aibaars d93330b
Rust: make printAst work
aibaars 6fd469c
Rust: use autodiscovery for sysroot
aibaars 0516505
Rust: update dependencies
aibaars 76c35be
Rust: add Expr, Pat, Stmt to schema
aibaars 46d6bbb
Rust: update generated code
aibaars 679d81a
Rust: extract dummy Function body
aibaars 8ecba44
Rust: add `experimental` bazel target
ce2fdb3
Address comments
aibaars 122e5a7
Rust: remove accidental IDE files
e14b626
Add 'BlockBase' class
aibaars a33c770
Add Label class
aibaars 8c5cc2e
Rust: generate test code from schema docstrings
6111a74
Rust: remove accidental schema annotation
18c423e
Rust: fix formatting of code snippet in docstring
ac9e977
Rust: remove accidental test source file
928f3f1
Rust: remove `<>` from function wrapper
bc6da11
Fix type of Closure::arg_types
aibaars 7511336
Add InlineAsm::expr
aibaars 69b05e8
Add fields for OffsetOf
aibaars e827701
Add subclasses for Array
aibaars 406d03e
Rename IfLet::else_branch to IfLet::else_
aibaars 1a9b232
Add SlicePat::{slice, suffix}
aibaars c8f7358
Rust: codegen: fix generated code
aibaars 3cd8aaf
Rust: simplify rust doc test annotation
7637393
Rust: resolve clippy and rustc warnings
ef34d24
Merge pull request #17390 from github/aibaars/rust-experiment
aibaars d8f37cf
Rust: add codegen pre commit hook
4512e42
Rust: add CI
ee2a8b0
Rust: fix formatting
c979a94
Rust: fix CI codegen check
10a23c0
Merge branch 'rust-experiment' into redsun82/rust-doctest-gen
9d08d24
Merge pull request #17396 from github/redsun82/rust-doctest-gen
redsun82 56e1278
Rust/Codegen: fix generated list files
573b8b9
Merge branch 'rust-experiment' into redsun82/rust-ci
b0ca793
Rust: update generated list file
d6b8dd1
Rust: add dummy integration test
45c9eb1
Merge pull request #17411 from github/redsun82/rust-ci-internal
redsun82 7c43839
Filter out trailing empty strings
aibaars da8750e
Rust: extract each project only once
aibaars 6e6942b
Rust: initial extractor for expressions and patterns
aibaars 6acc107
Prevent a panic on generated labels
aibaars b404764
Rust: schema.py add '| child' markers
aibaars 85e51bf
Rust: PrintAstNode: tolerate elements without toString
aibaars 86215b4
Rename IfLet to IfStmt
aibaars 6f36ea9
Merge branch 'main' into rust-experiment
61592a3
Rust: fix locations
aibaars 20ca880
Revert "Rust: PrintAstNode: tolerate elements without toString"
aibaars 42b1112
Rust: add default Element::toString
aibaars 37afad2
Merge pull request #17410 from github/redsun82/rust-ci
redsun82 38c25f9
Rust: add linting pre-commit hook
437b671
Merge branch 'rust-experiment' into aibaars/rust-experiment
ef06b55
Rust: accept test changes
46bfefc
Address comments
aibaars b2451c6
Improve schema
aibaars 2ae7257
Don't use _ to ignore things so rustc will show warnings for all the …
aibaars a5d1d9e
Make implementation more complete
aibaars 26b9de3
Merge branch 'main' into rust-experiment
1e830da
Add ra_ap_paths dependency
aibaars 8213bbb
Rust: Add a README.md
geoffw0 43e54fb
Use custom target folder
aibaars f37b4ae
Only extract function bodies for local crates,
aibaars bffdf2b
Replace println with log statements
aibaars ac9afea
Rust: Add experimental warning and Bazelisk link.
geoffw0 d9a3711
Update rust/README.md
geoffw0 9c8f614
Merge pull request #17408 from github/aibaars/rust-experiment
redsun82 d6d52a9
Fix definition of trap compression option
aibaars 00bc407
Merge pull request #17427 from github/aibaars/rust-experiment
aibaars d04f020
Rust: skip change note check for now
4f90f5f
Rust: accept test changes
6b0d7bc
Rust: Remove repo warning because we're merging into main real soon n…
geoffw0 7c95bb2
Rust: Update example path.
geoffw0 f8c9d96
Bazel: remove non-working fake `tree-sitter-extractor` workaround
91d5171
Add base setup for control flow graph construction
paldepind 6d972be
Rust: Add a few control flow tree classes
paldepind f464759
Merge pull request #17434 from github/redsun82/rust-experiment
redsun82 304e68d
Merge pull request #17426 from geoffw0/readme
redsun82 2a7533c
Rust: add to `labeler.yml
809d040
Make more classes private and final
paldepind f624a1b
Ruby: fix extractor pack script after workspace root change
aa6726a
Bazel: bump up `rules_rust` version
d8db0e4
Ruby: update new cargo target directory in make and actions
8bf3c42
Merge branch 'main' into rust-experiment
857edb7
Rust: Fix control flow tree for function and block expression
paldepind e4766b6
Rust: make QL test crates workspaces
4398421
Merge branch 'main' into rust-experiment
fea6017
Merge pull request #17415 from paldepind/rust-control-flow-graph
paldepind File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: "Rust" | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "rust/**" | ||
- "misc/bazel/**" | ||
- "misc/codegen/**" | ||
- "shared/**" | ||
- "MODULE.bazel" | ||
- .github/workflows/rust.yml | ||
- .github/actions/** | ||
- codeql-workspace.yml | ||
- "!**/*.md" | ||
- "!**/*.qhelp" | ||
branches: | ||
- rust-experiment | ||
- main | ||
- rc/* | ||
- codeql-cli-* | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
rust-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Format | ||
working-directory: rust/extractor | ||
shell: bash | ||
run: | | ||
cargo fmt --check | ||
- name: Compilation | ||
working-directory: rust/extractor | ||
shell: bash | ||
run: cargo check | ||
- name: Clippy | ||
working-directory: rust/extractor | ||
shell: bash | ||
run: | | ||
cargo clippy --fix | ||
git diff --exit-code | ||
- name: Code generation | ||
shell: bash | ||
run: | | ||
bazel run //rust/codegen | ||
git add . | ||
git diff --exit-code HEAD |
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
Was
.ql
deleted from this on purpose?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.
before,
ql
files were included, now they are excluded always (it's in theqll?
pattern): I found a corner case where this check was not agreeing with ourql
formatter, who was inserting two newlines at the end. So we can leave our formatter deal withql
andqll
files, and no other linter to interfere with that.