dcodeIO/ProtoBuf.js — pull request #67 by danielflower (2013-11-12 13:53:23+00:00)
Title: Extensions support

Hi, I really needed extensions support, so added it in this branch. I'm not expecting you to merge this (at least not right away) but it would be useful to get some feedback. Note that I have used this on some quite complex proto examples against a java server, so it does work. However, it only works if the message you are extending is importing the current message, so if we have:

basething.proto

message A {
}

anotherthing.proto

extend A {
optional int32 bar = 100;
}

then the compiler needs to go...

newBuilder.import(basething.proto).import(anotherthing.proto)

(specifically, when anotherthing.proto is being used, it needs to be able to do a lookup in the current "context" for message A)

Note: it doesn't honor the "extensions" keyword in the target message.

Looking forward to your feedback.