Skip to content
This repository was archived by the owner on Mar 18, 2019. It is now read-only.
This repository was archived by the owner on Mar 18, 2019. It is now read-only.

More helpful ordering of paths in fancy diffs #1

@lvh

Description

@lvh

On an internal project using kegan, @derwolfe noted that maybe kegan could do a better job ordering some of its results. Right now kegan internally produces sets of paths and values. This means that there's no meaningful ordering to them.

[["1" :b :c] 3 4]
[["1" :a] 1 2]
[["1" :b :d] 5 6]

It would be nice if these were ordered in a slightly better order for human inspectability:

[["1" :a] 1 2]
[["1" :b :c] 3 4]
[["1" :b :d] 5 6]

I think this means ordering paths such that shorter paths come first; equal length paths are lexographically sorted. It might make sense to make this optional.

While it currently produces sets, maybe it should produce seqs and not promise anything about order; leaving the set part to the tests only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions