TheToolsmiths / ddl

Data Definition Language for Game Development Tools
MIT License
4 stars 3 forks source link

Add content hashes to output #18

Open flaxed opened 3 years ago

flaxed commented 3 years ago

The compiled package output should provide stable hashes, which will be a helpful feature for tooling consuming the compiled content.

These would be both per item and for the whole package output.

Per item hashes should take into account:

andyburke commented 3 years ago

I think it may be useful to break this into two different pieces:

1) A stable id/hash that does not change as the item itself changes in various ways (added attributes, etc) 2) A hash of the item definition as it is today, such that you could uniquely identify that version of it

I think it's difficult to come up with a way to have a stable id/hash that would be deterministic across clean runs. (Hence maybe just hashing item name and type together is the best solution for that, but will change the hash if the item is renamed.)

Hashing the item definition is, I think, useful for tooling so you can understand if anything about it has changed vs. something like your last build.