Repository navigation
Structured binary - #6255
Structured binary#6255
Conversation
c9b24e6 to
f83824d
Compare
DanielG
left a comment
There was a problem hiding this comment.
Would be nice if there was some documentation on what exactly this is trying to do. Your commits don't have any messages, pretty hypocritical to complain when other people do this and then not have any yourself :P
From context and digging literally hundres of lines into the diff I'm guessing this is to fix things such as #6163 and #6164 where types of caches with derrived Binary instances change and reading them back either fails or gives the wrong result.
| then fail "Too large LicenseExceptionId tag" | ||
| else return (toEnum (fromIntegral i)) | ||
|
|
||
| -- note: remember to bump version each time the definition changes |
There was a problem hiding this comment.
This seems to defeat the purpose of this patch. Any way this datatype can be included in the structure hash too?
There was a problem hiding this comment.
Manual Binary instance => Manual Structured instance.
Yet, here Binary instance is generated by templating, so yes, we should generate Structured instance too. I'll take the license list version and use that.
Good catch.
This is WIP PR, I will rewrite commit messages. |
f83824d to
1ddced4
Compare
It defines `Structured` type class, which we use to prepend a hash to cached `Binary` blobs. Thus we can catch early, if format is changed, avoiding corrupt cache making cabal behave weirdly. Plenty types got Typeable instances, as it's a superclass of Structured This commit also introduces new compat modules: - Distribution.Compat.Typeable with typeRep - Distribution.Client.Compat.Orphans, to collect at least some orphans into central place.
1ddced4 to
ae33fcf
Compare
Please include the following checklist in your PR:
[ci skip]is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!