softprops/dynomite

Proposal: Rename `hash` to `partition` and `range` to `sort`

phrohdoh opened this issue · 2 comments

Why

Hash and Range are the old names for what are now called Partition and Sort keys.

See AWS docs for more information.

How

We could (and probably should) take a two-release approach with this:

  1. allow all 4 terms to be used, deprecate hash and range by suggesting partition and sort respectively
  2. remove support for hash and range forcing use of partition and sort

The names could be made more clear / explicit by naming them partition_key and sort_key, if desired.

I would also, personally, prefer either #[dynomite(partition_key)] or #[dynomite::partition_key] instead of #[partition_key] so there is more context.

Procedural macro don't yet support diagnostics: rust-lang/rust#54140 meaning we can not yet produce a deprecation diagnostic.