-
Notifications
You must be signed in to change notification settings - Fork 243
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
feat(rust_indexer): Add support for communicating with the analyzer driver #4985
Merged
Conversation
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
You probably want to setup the git commit hooks (from https://www.kythe.io/contributing/) so you can get the lint warnings earlier. |
jaysachs
reviewed
Jul 16, 2021
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.
So bear with me, I've only spent 30 minutes reading RustByExample.
jaysachs
reviewed
Jul 16, 2021
Since this is a fatal error, shouldn't the indexer simply die, which will be detected by the proxy?
…
On Jul 15, 2021 at 21:42, <Jay Sachs ***@***.***)> wrote:
@jaysachs commented on this pull request.
In kythe/rust/indexer/src/bin/proxy/main.rs (#4985 (comment)):
> + path::{Path, PathBuf}, +}; +use tempdir::TempDir; + +fn main() -> Result<()> { + let mut file_provider = ProxyFileProvider::new(); + let mut kythe_writer = ProxyWriter::new(); + let mut indexer = KytheIndexer::new(&mut kythe_writer); + + // Request and process + loop { + let unit = request_compilation_unit()?; + // Retrieve the save_analysis file + let temp_dir = TempDir::new("rust_indexer").context("Couldn't create temporary directory")?; + let temp_path = PathBuf::new().join(temp_dir.path()); + write_analysis_to_directory(&unit, &temp_path, &mut file_provider)?;
So if this fails & returns (or the TempDir::new) we don't write "done" back to the proxy, and so the conversation will be out of sync.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub (#4985 (review)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/APPKRXLTKTTIOWY23HSZTEDTX62CVANCNFSM5AMPV4DA).
|
jaysachs
reviewed
Jul 19, 2021
jaysachs
reviewed
Jul 19, 2021
jaysachs
approved these changes
Jul 19, 2021
wcalandro
added a commit
to wcalandro/kythe
that referenced
this pull request
Jul 20, 2021
commit 8a6e908 Author: Wyatt Calandro <64923869+wcalandro@users.noreply.github.com> Date: Tue Jul 20 18:18:00 2021 +0000 chore(rust_common): format all Rust files (kythe#4987) commit 7e54281 Author: Wyatt Calandro <64923869+wcalandro@users.noreply.github.com> Date: Tue Jul 20 17:50:39 2021 +0000 feat(rust_indexer): Add support for communicating with the analyzer driver (kythe#4985) * Initial implementation * Fix bugs * Request for analysis is blocking * fix(lint): fix linter issues * fix(rust_indexer): fix linter issues * fix(rust_common): remove duplicate cargo raze BUILD file * fix(rust_indexer): don't panic when failing to write a file * fix(rust_indexer): read the response after sending done * fix(rust_indexer): break out finish_unit function * fix(rust_indexer): refactor finish_unit to send_done commit ae132ac Author: Wyatt Calandro <64923869+wcalandro@users.noreply.github.com> Date: Tue Jul 13 10:57:08 2021 -0700 feat(proxy): Add support for transmitting protos in wire format (kythe#4983) * feat(proxy): Add support for transmitting protos in wire format * Don't explicitly encode/decode wire format to base64 * snake -> camel case commit a091597 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon Jul 12 21:55:44 2021 +0000 build(deps): bump addressable from 2.7.0 to 2.8.0 in /kythe/web/site (kythe#4982) commit 9d690f1 Author: Shahms King <shahms@google.com> Date: Tue Jun 29 12:09:15 2021 -0700 chore: extend build timeout to account for slow PRs (kythe#4980) commit 9149bf1 Author: Shahms King <shahms@google.com> Date: Tue Jun 29 11:35:32 2021 -0700 chore: update LLVM (kythe#4979) commit c289b45 Author: Shahms King <shahms@google.com> Date: Mon Jun 28 13:28:30 2021 -0700 chore: mark jasmine use testonly (kythe#4978) commit 59a94bf Author: Cody Schroeder <schroederc@google.com> Date: Wed Jun 23 14:26:04 2021 -0700 fix(java_extractor): properly filter/normalize Bazel javacopts (kythe#4977) commit 0291fce Author: Justin Buchanan <justinbuchanan@google.com> Date: Wed Jun 23 08:29:41 2021 -0700 feat(java_indexer): place builtins in the compilation unit corpus (kythe#4976) when --use_compilation_corpus_as_default is enabled commit 70e517d Author: Wyatt Calandro <64923869+wcalandro@users.noreply.github.com> Date: Mon Jun 21 10:39:21 2021 -0700 feat(rust_indexer): Get source file contents from the FileProvider (kythe#4974) commit 2f465a0 Author: Sal <salguarnieri@google.com> Date: Fri Jun 18 10:19:59 2021 -0700 chore: Remove flag that should always be true now (kythe#4975) commit 682c6c3 Author: Sal <salguarnieri@google.com> Date: Thu Jun 17 11:12:43 2021 -0700 chore: remove not-yet-supported flag from docs (kythe#4973) commit f36068a Author: Wyatt Calandro <64923869+wcalandro@users.noreply.github.com> Date: Wed Jun 16 19:31:58 2021 -0700 fix(rust_extractor): Remove assert_cmd dependency from integration test (kythe#4972) commit 5b6a53b Author: Sal <salguarnieri@google.com> Date: Wed Jun 16 14:34:28 2021 -0700 chore: Update local website docs (kythe#4971) commit b43e03f Author: Shahms King <shahms@google.com> Date: Wed Jun 16 14:03:00 2021 -0700 feat(site): add a target for serving website locally (kythe#4970) commit 061ccd4 Author: Wyatt Calandro <64923869+wcalandro@users.noreply.github.com> Date: Wed Jun 16 13:16:44 2021 -0700 chore(rust_extractor): Generate and copy extra action proto files (kythe#4969) commit 733a6cf Author: Martin Heberling <martin.heberling.dalies@gmail.com> Date: Wed Jun 16 12:03:03 2021 -0400 fix: Added correct underline syntax (kythe#4967) Co-authored-by: Sal <salguarnieri@google.com> commit 1e19993 Author: zrlk <zrlk@users.noreply.github.com> Date: Tue Jun 15 17:01:50 2021 -0700 fix(rust_indexer): copy all generated proto files (kythe#4968) commit 005af3c Author: Wyatt Calandro <64923869+wcalandro@users.noreply.github.com> Date: Tue Jun 15 10:38:18 2021 -0700 chore(rust): Migrate away from rust_crypto crate (kythe#4966) Replace rust-crypto with sha2 and hex commit 5182be2 Author: Shahms King <shahms@google.com> Date: Mon Jun 14 16:13:05 2021 -0700 chore: address or suppress error prone warnings (kythe#4965) commit 5cc20fe Author: Justin Buchanan <justinbuchanan@google.com> Date: Mon Jun 14 15:54:09 2021 -0700 chore(go): remove kindex support from a few go packages (kythe#4964) commit 19b633d Author: Shahms King <shahms@google.com> Date: Mon Jun 14 12:50:27 2021 -0700 chore: remove long-deprecated and unused Link kind field (kythe#4963) * chore: remove long-deprecated and unused Link kind field * chore: remove unused kind-based printable filter * chore: remove bitwise-or operator for deleted RejectPolicy commit ebe763e Author: Shahms King <shahms@google.com> Date: Mon Jun 14 10:34:54 2021 -0700 chore: silence unactionable warnings in Java and C (kythe#4962) commit aeaf927 Author: Shahms King <shahms@google.com> Date: Mon Jun 14 09:21:49 2021 -0700 chore: reorder GCB steps in presubmit (kythe#4961) commit 0198d46 Author: Justin Buchanan <justinbuchanan@google.com> Date: Fri Jun 11 16:45:49 2021 -0700 feat(java_indexer): add option to put tapps in the CU corpus (kythe#4960) this is intended to match the behavior of the --use_compilation_corpus_as_default option in the c++ and go indexers followup changes will apply this same logic to other types of corpus-less nodes commit 94fb578 Author: Shahms King <shahms@google.com> Date: Fri Jun 11 15:35:02 2021 -0700 chore: update LLVM (kythe#4959) commit a367ca6 Author: Justin Buchanan <justinbuchanan@google.com> Date: Wed Jun 9 16:16:45 2021 -0700 feat(go_indexer): add option to put tapp nodes in the CU corpus (kythe#4951) this is essentially the same as the c++ indexer's --use_compilation_corpus_as_default option, which assigns the compilation unit's corpus to template instantiations, etc. commit 5edce0e Author: Wyatt Calandro <64923869+wcalandro@users.noreply.github.com> Date: Wed Jun 9 12:59:28 2021 -0700 fix(fuschia-extractor): Fix panic format string for Rust 2021 (kythe#4958) commit 75c420a Author: Justin Buchanan <justinbuchanan@google.com> Date: Tue Jun 8 14:12:17 2021 -0700 chore(textproto): use const ref for plugin parameter (kythe#4957)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds support to the Rust indexer to communicate with the analyzer driver. This includes support within the indexer library and a new binary to continuously process compilation units.