Repository navigation
ruff_charon: rows v2 for Codegraph queries (D-CODEGRAPH-0 slice C, intake half) - #132
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
…TE status; MAY_DISPATCH names the method Slice C (D-CODEGRAPH-0) needs facts today's rows lack: visibility, which impl method implements which trait method, synthetic items, function-pointer uses (otherwise a pointer-only function reads as dead), and whether Charon reported errors for the crate. MAY_DISPATCH now names Trait::method; Kythe output is unchanged (golden test). Rows artifact version 2. New fixture fnref. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X6y3drwKSE2zSgoexheLFX
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
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.
Summary
Slice C (callers, callees, impact and diagnostics, read on the lance-graph side) needs facts that today's rows do not carry. All of them come from Charon's LLBC; nothing is inferred.
PUBLIC f fitem_meta.attr_info.publicIMPLEMENTS f Trait::methodFunDecl.srcTraitImpl/TraitDefaultSYNTHETIC f fIdent/Impl{promoted_const}would otherwise read as a dead functionREFERENCES f gConstantExprKind::FnDef/FnPtroperands (not callees)CRATE c COMPLETE|PARTIAL(store)has_errorsMAY_DISPATCHobjectTrait::method via kindTRAIT_METHOD_NOT_FOUND,REFERENCE_NOT_NAMED).#version 2.MAY_DISPATCHtargets the trait through a newRelation::kythe_target.Charon detail. Charon marks trait-impl methods public, because they take the trait's visibility. The two
Shape::areaimpls therefore havePUBLICrows: 9 in cg_lib, against its 7pub fn. This transcribes Charon's flag as is.Test Plan
Fixtures
cg_lib.kythe.goldenandcg_app.kythe.goldenare the Kythe output ofmainbefore this change. The v2 output equals them byte for byte.fnref.rs/fnref.llbcis a new fixture with:rustc reports
dead_codeonunused_privateonly.cg_brokenproduces no LLBC: rustc stops on E0425/E0432 before Charon runs. APARTIALcrate is therefore tested by settinghas_errorson a loaded crate.Results
cargo clippy --all-targets -- -D warningsandcargo fmt --checkare clean.Disable runs, each red in its own test:
a_function_pointer_use_is_a_reference.MAY_DISPATCH:dispatch_is_never_a_confirmed_callandmay_dispatch_names_the_method_and_keeps_the_kythe_target.a_reference_is_not_a_kythe_anchor.PUBLIC,IMPLEMENTSandSYNTHETICrows reuse the DEFINES span, and the emitter drops duplicate entries.REFERENCESspan (bytes 247..253 infnref) shows the leak, so the first disable run stayed green until this test was added.has_errors:the_crate_row_records_charon_errors.SYNTHETICoff:synthetic_items_are_flaggedand the receipt count.PUBLICoff:public_functions_are_markedand the receipt count.Not in this PR: the lance-graph reader, queries and diagnostics. They follow as a new lance-graph crate reading these artifacts.
Generated by Claude Code