[Haskell-cafe] Versioning

Neil Mitchell ndmitchell at gmail.com
Wed Dec 20 06:00:08 EST 2006

Hi Jo,

You seem to be describing SYB and not knowing it:

That basically does exactly what you've requested, in terms of
traversing all items when only one matters. That said, serialisation
is still a hard problem - think long and hard before picking a data

With Yhc.Core I used Drift to derve Binary instances, keep a version
tag, and if the version tags mismatch refuse to load the data.



On 12/20/06, Joachim Durchholz <jo at durchholz.org> wrote:
> As written in my other post, I will need to update data structures that
> were marshalled to disk.
> Now I'm wondering how to best prepare for the situation. E.g. one of the
> common situations is that a single data item gets replaced by a list of
> items.
> Now assume that there's a SomeData type that's used across the game, and
> which gets incompatibly updated SomeData1 (say, instead of containing
> just a string it turns into a list of strings).
> The update code would now have to unmarshall a blob of game data,
> traverse it to find all instances of SomeData, wrap them in a
> one-element list to turn them into SomeData1s, reconstruct the blob of
> game data with the SomeData1 items, and marshall the result back out to
> disk.
> This sounds as if I'd have to write code for every single data type in
> the update program just to update a single data type. Is that true, or
> is there a way around this?
> Regards,
> Jo
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list