Closed GoogleCodeExporter closed 9 years ago
Ok, the proposed method is not working since it messes with the static
initialization... Looking forward to another solution. Replacing the required
fields with optional since then.
Original comment by falco20019
on 7 Jan 2015 at 6:02
I have solved it now with setting the call of WeakBuild() to WeakBuildPartial
as described above and with improving readability of
UninitializedMessageException. See applied patch.
Original comment by falco20019
on 9 Jan 2015 at 10:18
Attachments:
Hi Falco20019,
Thanks for looking into this diligently and providing a fix. I haven't had a
chance to look at it closely myself yet (and I'm too tired to do so right now)
but in the meantime, can I check whether you've already signed the Google CLA?
We'll need a CLA before I can accept your patch, I'm afraid. See
https://cla.developers.google.com/clas for details.
Original comment by jonathan.skeet
on 10 Jan 2015 at 3:51
Just signed the CLA. Please look into the code before applying the patch since
I am not that deep into the whole code. I just checked if I can see any
dependencies but haven't seen any other problems with the change of WeakBuild
to WeakBuildPartial.
Original comment by falco20019
on 13 Jan 2015 at 3:51
Hi Falco20019,
Just to say I haven't forgotten about this. I need to get back into the code
myself, and it's proving tricky to find a good slot of time to do that - but I
promise it's on my list!
Original comment by jonathan.skeet
on 31 Jan 2015 at 9:01
We've now had a look at this, and understood it better. Basically, it's working
as intended - but that doesn't mean you can't use an option with two required
fields. It just means you need to use the syntax which specifies the option
value as a complete message, rather than one field of it at a time. So you want:
message Test {
option (Messages.message_options)).message_version = {
main_version: 1,
sub_version: 1
};
optional string testField = 1;
}
Hopefully this will meet your requirements - it feels like a much cleaner way
to specify it, to be honest.
Original comment by jonathan.skeet
on 22 Feb 2015 at 8:23
Original issue reported on code.google.com by
falco20019
on 7 Jan 2015 at 4:59