Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to descending canonical sort order #120

Open
sdboyer opened this issue Mar 12, 2023 · 0 comments
Open

Switch to descending canonical sort order #120

sdboyer opened this issue Mar 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@sdboyer
Copy link
Contributor

sdboyer commented Mar 12, 2023

#82 introduces explicit version statements within schemas. This doesn't change Thema's basic invariants - exactly one correct version number is still entailed by the combination of backwards compatibility and immutability invariants.

However, it does introduce the possibility that schemas might be declared in different orders, because version is no longer so strictly derived from a list index. Given that, i suspect the most ergonomic way of managing lineages over time will be to present the newest first, rather than last, as would generally be implied by an append-only datastructure. This descending ordering would hold for both schemas and lenses.

The effect of this would be that formatting tools should choose to output a lineage with versions [0, 0], [0, 1], and [1, 0] in the following order:

  • [1, 0]
  • [0, 1]
  • [0, 0]

i'm not fully committed to this yet.

@sdboyer sdboyer added the enhancement New feature or request label Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant