Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix for stops sorting function. In some cases Lua is complaining that the function is invalid.
Fixed issues:
is_before
andis_after
functions were exactly the same,is_after
is not used anywere as far as I can tell, but still.sort_step
itself was also wrong as, for my snippet it generated steps like this:(s1, s2)
was passed becauses1
(line 3) is befores2
(line 4). It was also true when(s2, s1)
was called ass2.id < s1.id
. Lua apparently don't like that behaviour and is throwing exception "invalid order function for sorting".Snippet that was causing me the issues (stripped down version):