Skip to content

Commit 0e08578

Browse files
committed
self-review fixes
1 parent d714b7d commit 0e08578

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

dev-tools/ls-apis/src/api_metadata.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,9 +487,7 @@ pub struct DependencyFilterRule {
487487
// that they're present. And this would let us include this explanation in
488488
// output in the future (e.g., to explain why some dependency was filtered
489489
// out).
490-
#[expect(dead_code)]
491490
pub note: String,
492-
#[expect(dead_code)]
493491
pub permalinks: Vec<String>,
494492
}
495493

@@ -567,5 +565,12 @@ pub enum Evaluation {
567565
Dag,
568566
/// Intra-deployment-unit communication. Only valid with the `server`
569567
/// matcher and server-side-versioned APIs. Subject to auto-validation.
568+
///
569+
/// Note: This evaluation is intentionally *not* filtered out by
570+
/// `ApiDependencyFilter`. These edges are real dependencies that should
571+
/// appear in component listings and most graphs. They are only excluded
572+
/// when building the deployment unit dependency graph for cycle detection
573+
/// (via `VersionedHowFilter::ServerSideOnly`), because intra-unit
574+
/// communication doesn't create cross-unit version skew.
570575
SameDeploymentUnit,
571576
}

dev-tools/ls-apis/src/system_apis.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -654,11 +654,7 @@ impl SystemApis {
654654
let filter = ApiDependencyFilter::IncludeNonDag;
655655
let mut required = BTreeSet::new();
656656

657-
for server in self.server_component_units.keys() {
658-
let Some(server_unit) = self.server_component_units.get(server)
659-
else {
660-
continue;
661-
};
657+
for (server, server_unit) in &self.server_component_units {
662658

663659
for (client, _) in self.component_apis_consumed(server, filter)? {
664660
// Only consider server-side-versioned APIs.
@@ -1483,7 +1479,14 @@ pub enum ApiDependencyFilter {
14831479

14841480
impl ApiDependencyFilter {
14851481
/// Return whether this filter should include a dependency on
1486-
/// `client_pkgname` that goes through dependency path `dep_path`
1482+
/// `client_pkgname` that goes through dependency path `dep_path`.
1483+
///
1484+
/// Note: `Evaluation::SameDeploymentUnit` edges are included by all filters
1485+
/// here. These edges represent real dependencies and should appear in
1486+
/// component listings and graphs. They are only excluded when building the
1487+
/// deployment unit graph for cycle detection, which is handled separately
1488+
/// via `VersionedHowFilter::ServerSideOnly` in
1489+
/// `make_deployment_unit_graph`.
14871490
fn should_include(
14881491
&self,
14891492
api_metadata: &AllApiMetadata,

0 commit comments

Comments
 (0)