Skip to content
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

Fix dozer.lock stability #2155

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
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
35 changes: 33 additions & 2 deletions dozer-cli/src/simple/build/contract/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,42 @@ where

impl PartialEq<PipelineContract> for PipelineContract {
fn eq(&self, other: &PipelineContract) -> bool {
dbg!(self, other);
is_isomorphic_matching(
self.0.graph(),
other.0.graph(),
PartialEq::eq,
PartialEq::eq,
|left, right| {
left.handle == right.handle
&& match (&left.kind, &right.kind) {
(
NodeKind::Source {
typ: left_typ,
port_names: left_portnames,
},
NodeKind::Source {
typ: right_typ,
port_names: right_portnames,
},
) => {
if left_typ != right_typ {
false
} else {
let mut left: Vec<_> = left_portnames.values().collect();
left.sort();
let mut right: Vec<_> = right_portnames.values().collect();
right.sort();
left == right
}
}
(
NodeKind::Processor { typ: left_typ },
NodeKind::Processor { typ: right_typ },
) => left_typ == right_typ,
(NodeKind::Sink, NodeKind::Sink) => true,
_ => false,
}
},
|left, right| left.schema == right.schema,
)
}
}
Expand Down
Loading