Closed djbe closed 5 years ago
So, small discussion point from #240 is that the current Stencil behaviour was, until now, undefined.
So let's define it then. An important note should be that the behaviour should be consistent, no matter the swift version you compile Stencil with (4 vs 4.2).
Note: I was a bit too quick and merged #240 into the wrong branch, and github won't allow me to fix things without a new PR 🤷♂️
With Swift 4.2, hashing isn't consistent between runs anymore. A consequence of this is, if we iterate over a dictionary, the output won't always be the same, which will be unexpected for a user.
With this PR we iterate over the sorted keys of a dictionary, ensuring consistent output across runs.