Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5936e1a
feat: add language-frontend extractors for graph parity
jonathanong Aug 16, 2026
7c62c29
Merge remote-tracking branch 'origin/main' into feat/language-parity
jonathanong Aug 16, 2026
e03b3b7
style: rustfmt language frontend modules
jonathanong Aug 16, 2026
e738c39
fix: wire language filters into the graph plan
jonathanong Aug 16, 2026
b7e9ae0
fix: tighten Kafka produce matching and Rust status docs
jonathanong Aug 16, 2026
a81584f
fix: honor tests.php.framework for Laravel extractors
jonathanong Aug 16, 2026
696d22f
fix: tighten language extractors and split oversized modules
jonathanong Aug 16, 2026
02f2afd
fix: match language graph keys and advertised edge kinds
jonathanong Aug 16, 2026
5dc8413
fix: drop package cliques and tighten language extractors
jonathanong Aug 16, 2026
3adc29f
merge: origin/main into feat/language-parity
jonathanong Aug 16, 2026
0779195
fix: intern language queue and file nodes as Arc<Path>
jonathanong Aug 16, 2026
a58f2d6
merge: origin/main into feat/language-parity
jonathanong Aug 16, 2026
8ef67f4
test: cover language frontend graph edges and extractor branches
jonathanong Aug 16, 2026
81e8339
fix: prefix project queue globs and expand PHP grouped uses
jonathanong Aug 16, 2026
84173fb
fix: index PHP composer.json and public Rust use items
jonathanong Aug 16, 2026
43c9941
fix: prefer crate roots, Django as_view, and deepest Go modules
jonathanong Aug 16, 2026
0f6f566
fix: index PHP interfaces and Ruby require paths
jonathanong Aug 16, 2026
b1264a9
fix: keep Rails controller namespaces and PHP import aliases
jonathanong Aug 16, 2026
10b82cc
fix: tighten language extractors after review fix-thrash
jonathanong Aug 16, 2026
a11f5b7
fix: scope imports, namespaced Rails, and language graph invalidation
jonathanong Aug 16, 2026
de08218
fix: move Python import tests out of source and satisfy clippy
jonathanong Aug 16, 2026
1406469
fix: more language extractor edge cases from review
jonathanong Aug 16, 2026
b460e8d
fix: resolve relative Rust uses and remaining extractor nits
jonathanong Aug 16, 2026
8140935
test: cover language relationship sort keys and build-plan flags
jonathanong Aug 16, 2026
a5f2104
fix: extract language-frontend build-plan flag to cut CRAP
jonathanong Aug 16, 2026
43a8dd3
fix: resolve framework import aliases and tighten enqueue matching
jonathanong Aug 16, 2026
ce69ab8
fix: prune nested Go modules, normalize Ruby requires, qualify Larave…
jonathanong Aug 16, 2026
66f2851
fix: scope language edges and close remaining extractor gaps
jonathanong Aug 16, 2026
ff62bc1
fix: close remaining language extractor review gaps
jonathanong Aug 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crates/no-mistakes/src/codebase/dependencies/args_relationships.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ pub enum RelationshipArg {
Dotnet,
Swift,
Terraform,
Python,
Go,
Rust,
Ruby,
Php,
Resource,
All,
}
Expand Down Expand Up @@ -81,6 +86,11 @@ impl RelationshipArg {
Self::Dotnet => "dotnet",
Self::Swift => "swift",
Self::Terraform => "terraform",
Self::Python => "python",
Self::Go => "go",
Self::Rust => "rust",
Self::Ruby => "ruby",
Self::Php => "php",
Self::Resource => "resource",
Self::All => "all",
Self::Workflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ fn non_workflow_relationship_edges(relationship: &RelationshipArg) -> &'static [
EdgeKind::TerraformModuleRef,
EdgeKind::TerraformOutputRef,
],
RelationshipArg::Python => &[EdgeKind::PythonImport, EdgeKind::PythonReference],
RelationshipArg::Go => &[EdgeKind::GoImport, EdgeKind::GoReference],
RelationshipArg::Rust => &[EdgeKind::RustUse, EdgeKind::RustMod, EdgeKind::RustPackage],
RelationshipArg::Ruby => &[EdgeKind::RubyRequire, EdgeKind::RubyReference],
RelationshipArg::Php => &[EdgeKind::PhpUse, EdgeKind::PhpPackage],
Comment thread
jonathanong marked this conversation as resolved.
RelationshipArg::Resource => &[EdgeKind::Resource],
RelationshipArg::Workflow
| RelationshipArg::WorkflowJob
Expand Down Expand Up @@ -136,6 +141,17 @@ fn standard_relationship_edges() -> std::collections::HashSet<EdgeKind> {
EdgeKind::TerraformReference,
EdgeKind::TerraformModuleRef,
EdgeKind::TerraformOutputRef,
EdgeKind::PythonImport,
EdgeKind::PythonReference,
EdgeKind::GoImport,
EdgeKind::GoReference,
EdgeKind::RustUse,
EdgeKind::RustMod,
EdgeKind::RustPackage,
EdgeKind::RubyRequire,
EdgeKind::RubyReference,
EdgeKind::PhpUse,
EdgeKind::PhpPackage,
EdgeKind::Resource,
]
.into_iter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ pub(crate) fn test_globs(framework: &str) -> Vec<String> {
"cargo" => globs_to_strings(CARGO),
"dotnet" => globs_to_strings(DOTNET),
"swift" => globs_to_strings(SWIFT),
"python" => globs_to_strings(&[
"**/test_*.py",
"**/*_test.py",
"**/tests.py",
"**/tests/**/*.py",
]),
Comment thread
jonathanong marked this conversation as resolved.
"go" => globs_to_strings(&["**/*_test.go"]),
"rails" => globs_to_strings(&["**/spec/**/*_spec.rb", "**/test/**/*_test.rb"]),
"php" => globs_to_strings(&["**/*Test.php", "**/tests/**/*.php"]),
_ => vec![],
}
}
Expand Down
39 changes: 4 additions & 35 deletions crates/no-mistakes/src/codebase/dependencies/graph/build_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub struct GraphBuildPlan {
pub dotnet: bool,
pub swift: bool,
pub terraform: bool,
pub language_frontends: bool,
}

impl GraphBuildPlan {
Expand Down Expand Up @@ -54,6 +55,7 @@ impl GraphBuildPlan {
dotnet: true,
swift: true,
terraform: true,
language_frontends: true,
}
}

Expand Down Expand Up @@ -125,6 +127,7 @@ impl GraphBuildPlan {
terraform: allowed.contains(&EdgeKind::TerraformReference)
|| allowed.contains(&EdgeKind::TerraformModuleRef)
|| allowed.contains(&EdgeKind::TerraformOutputRef),
language_frontends: allowed_requests_language_frontends(allowed),
}
}

Expand All @@ -150,6 +153,7 @@ impl GraphBuildPlan {
self.dotnet |= other.dotnet;
self.swift |= other.swift;
self.terraform |= other.terraform;
self.language_frontends |= other.language_frontends;
}

pub fn with_symbols(mut self, symbols: bool) -> Self {
Expand All @@ -175,38 +179,3 @@ impl GraphBuildPlan {
}
}
}

fn graph_plan_needs_config(plan: GraphBuildPlan) -> bool {
plan.ci
|| plan.workflow_topology
|| plan.routes
|| plan.queues
|| plan.http
|| plan.tests
|| plan.dotnet
|| plan.swift
|| plan.terraform
}

fn effective_ts_fact_plan(
plan: GraphBuildPlan,
options: Option<&GraphConfigOptions>,
) -> TsFactPlan {
let mut fact_plan = plan.ts_fact_plan();
let route_refs_configured = options.is_some_and(route_ref_facts_configured);
let route_backend_configured = options.is_some_and(route_backend_facts_configured);
let http_configured = options.is_some_and(http_facts_configured);
let queue_configured = options.is_some_and(queue_facts_configured);

fact_plan.route_refs &= route_refs_configured;
fact_plan.backend_routes &= route_backend_configured || http_configured;
fact_plan.http_calls &= http_configured;
fact_plan.symbols = plan.symbols || (fact_plan.symbols && queue_configured);
fact_plan.queue_usage &= queue_configured;
fact_plan.queue_factory &= queue_configured;
fact_plan.queue_project &= queue_configured;
fact_plan.server_routes = options.is_some_and(|options| {
options.project_route_globset.is_some() && (plan.routes || plan.swift)
});
fact_plan
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
fn allowed_requests_language_frontends(allowed: &HashSet<EdgeKind>) -> bool {
[
EdgeKind::PythonImport,
EdgeKind::PythonReference,
EdgeKind::GoImport,
EdgeKind::GoReference,
EdgeKind::RustUse,
EdgeKind::RustMod,
EdgeKind::RustPackage,
EdgeKind::RubyRequire,
EdgeKind::RubyReference,
EdgeKind::PhpUse,
EdgeKind::PhpPackage,
]
.into_iter()
.any(|kind| allowed.contains(&kind))
}

fn graph_plan_needs_config(plan: GraphBuildPlan) -> bool {
plan.ci
|| plan.workflow_topology
|| plan.routes
|| plan.queues
|| plan.http
|| plan.tests
|| plan.dotnet
|| plan.swift
|| plan.terraform
|| plan.language_frontends
}

fn effective_ts_fact_plan(
plan: GraphBuildPlan,
options: Option<&GraphConfigOptions>,
) -> TsFactPlan {
let mut fact_plan = plan.ts_fact_plan();
let route_refs_configured = options.is_some_and(route_ref_facts_configured);
let route_backend_configured = options.is_some_and(route_backend_facts_configured);
let http_configured = options.is_some_and(http_facts_configured);
let queue_configured = options.is_some_and(queue_facts_configured);

fact_plan.route_refs &= route_refs_configured;
fact_plan.backend_routes &= route_backend_configured || http_configured;
fact_plan.http_calls &= http_configured;
fact_plan.symbols = plan.symbols || (fact_plan.symbols && queue_configured);
fact_plan.queue_usage &= queue_configured;
fact_plan.queue_factory &= queue_configured;
fact_plan.queue_project &= queue_configured;
fact_plan.server_routes = options.is_some_and(|options| {
options.project_route_globset.is_some() && (plan.routes || plan.swift)
});
fact_plan
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,23 @@ fn collect_dotnet_edges_for_plan(inputs: &GraphEdgeBuildInputs<'_>) -> Vec<Edge>
)
}

fn merge_language_frontend_edges(
inputs: &GraphEdgeBuildInputs<'_>,
forward: &mut EdgeMap,
reverse: &mut EdgeMap,
) {
let edges = collect_language_frontend_edges(
inputs.root,
&inputs.graph_files.all,
inputs.config_options,
);
Comment thread
jonathanong marked this conversation as resolved.
for (from, to, _) in &edges {
forward.entry(from.clone()).or_default();
forward.entry(to.clone()).or_default();
}
merge_edges(forward, reverse, edges);
}

fn collect_terraform_edges_for_plan(inputs: &GraphEdgeBuildInputs<'_>) -> Vec<Edge> {
if !inputs.plan.terraform {
return Vec::new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,14 @@ fn collect_remaining_edges(
Ok(())
})?;
crate::invocation::check_timeout()?;
crate::perf_trace::trace("graph.language_frontends", || {
if edge_inputs.plan.language_frontends
|| edge_inputs.plan.queues
|| edge_inputs.plan.routes
{
merge_language_frontend_edges(edge_inputs, forward, reverse);
}
});
crate::invocation::check_timeout()?;
Ok(())
}
Loading
Loading