Skip to content

DiffGraph: allow simultaneous edge and node removal#347

Merged
mpollmeier merged 1 commit intomasterfrom
michael/remove-edge-and-node-simultaneously
Sep 19, 2025
Merged

DiffGraph: allow simultaneous edge and node removal#347
mpollmeier merged 1 commit intomasterfrom
michael/remove-edge-and-node-simultaneously

Conversation

@mpollmeier
Copy link
Contributor

Prior to this, if a user tried to delete a node and an adjacent edge at
the same time, we would run into this:

scala.MatchError: flatgraph.DiffGraphBuilder$RemoveEdge@7bcbf3a8 (of class flatgraph.DiffGraphBuilder$RemoveEdge)
	at flatgraph.DiffGraphApplier.splitUpdate$$anonfun$2(DiffGraphApplier.scala:228) ~[io.joern.flatgraph-core_3-0.1.25.jar:0.1.25]

Which was because the condition was on the case RemoveEdge filtered
out that case and there's no fallback case _ or similar.
This makes it explicit and adds a test.

Prior to this, if a user tried to delete a node and an adjacent edge at
the same time, we would run into this:
```
scala.MatchError: flatgraph.DiffGraphBuilder$RemoveEdge@7bcbf3a8 (of class flatgraph.DiffGraphBuilder$RemoveEdge)
	at flatgraph.DiffGraphApplier.splitUpdate$$anonfun$2(DiffGraphApplier.scala:228) ~[io.joern.flatgraph-core_3-0.1.25.jar:0.1.25]
```

Which was because the condition was on the `case RemoveEdge` filtered
out that case and there's no fallback `case _` or similar.
This makes it explicit and adds a test.
@mpollmeier mpollmeier merged commit b9e4798 into master Sep 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments