Re: [BuildStream] Proposal: Artifact as a Proto




On 14/01/2019 17:10, Raoul Hidalgo Charman via BuildStream-list wrote:
As the ref just points to a digest, could it make sense to have it be a digest
of either an artifact proto or a directory proto? This would keep the reference
service generic (and require no changes), and allow use of the new artifact proto.
This means you would get an error if you used the wrong ref that was pointing to
the other type, but you'd want an error to be raised if this happens anyway.
There could be some issue with this I haven't thought of however.

I have no problem with the idea but the implementation might be a bit tricky - you need to know what type of object a ref is before decoding it; trying to decode something to the wrong protocol type will /probably/ throw an error, but I would rather not rely on that behaviour.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]