Skip to content

Commit c9425d1

Browse files
committed
diff: Sort exported port changes first
1 parent 29dc0aa commit c9425d1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/real-life.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
ledchain SHOWN -> IN dummy(Forward)
3939
ledchain READY -> IN dummyB(Forward)
4040
diff: |
41+
- OUTPORT=ledchain.PIXELSET:PIXELSET
4142
- "true" -> HWSPI ledchain
4243
+ "2" -> PINDATA ledchain
4344
+ "3" -> PINCLK ledchain
44-
- OUTPORT=ledchain.PIXELSET:PIXELSET

src/diff.coffee

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,15 @@ calculateDiff = (from, to) ->
230230
# this is just the basics/dry-fact view. Any heuristics etc is applied afterwards
231231
changes = []
232232

233+
# exported port changes
234+
changes = changes.concat portChanges(from.inports, to.inports, 'inport')
235+
changes = changes.concat portChanges(from.outports, to.outports, 'outport')
236+
233237
# nodes added/removed
234238
changes = changes.concat processChanges(from.processes, to.processes)
235239

236240
# edges added/removed
237241
changes = changes.concat connectionChanges(from.connections, to.connections)
238-
239-
# exported port changes
240-
changes = changes.concat portChanges(from.inports, to.inports, 'inport')
241-
changes = changes.concat portChanges(from.outports, to.outports, 'outport')
242242

243243
# FIXME: diff graph properties
244244
# TODO: support diffing of groups

0 commit comments

Comments
 (0)