More protoc integration issues

23 views
Skip to first unread message

jmockittester

unread,
Oct 27, 2011, 10:31:05 AM10/27/11
to protobuf-dt
Hey all! I saw that you guys released 1.0.11 of the protobuf-dt, so
first, let me congratulate you on the release. I'm still very excited
to be using it, and the bug fix that handles the folder hierarchy
issue in Windows (http://code.google.com/p/protobuf-dt/issues/detail?
id=119&can=1&q=windows). However, I'm running into a new problem
related to imported protos when compiling.

Essentially, the "common" .proto compiles the Java class fine, but
when I attempt to compile the "extension" .proto, nothing happens. I
did check the error log this time, but I didn't see any exceptions
being thrown from the plug-in. I guess my first question would be, is
this functionality supposed to be there (protoc integration
for .protos importing other .protos) and if so, is there anything
different I should be doing from the regular .protos?

jmockittester

unread,
Oct 27, 2011, 10:35:14 AM10/27/11
to protobuf-dt
I've put a sample project up here where I'm seeing the issue, so if
anyone can get this project to work, then I clearly have some
preferences set up incorrectly.

http://www.filedropper.com/protobuf-protoc-importissue

Thanks for any help!

Ben Wright

unread,
Oct 27, 2011, 11:15:20 AM10/27/11
to protobuf-dt
I don't have time until tomorrow evening or this weekend to look into
this closer, but the scenario you describe should definitely work - I
know i have protos that import other protos compiling.

Have you setup the "import paths" in the project's Protocol Buffers
settings?

Right click on the project, select properties. Click on Protocol
Buffers, then Import Paths, then add the folders with the required
proto import files.

There should be errors in the document editor if this isn't setup
correctly though.

Let me know if you figure out the issue before I get back around to
this in a couple of days.

protobufdttester

unread,
Oct 28, 2011, 10:40:48 AM10/28/11
to protobuf-dt
Looks like Google decided to inactivate my other account. In any
case, I'm jmockittester, and I thank you for the help Ben. I did
forget to specify the import paths, but, unfortunately, that doesn't
appear to have resolved the issue.

Do you happen to know the reason why the protobuf-dt won't just look
on the path of the project by default? Even if the import paths had
worked, I would think that it would be annoying to have to specify the
path of every imported proto that a person might have.

Thanks again.

Alex Ruiz

unread,
Oct 28, 2011, 1:56:55 PM10/28/11
to proto...@googlegroups.com
I'll be also looking into this issue shortly. Thanks very much for reporting it.

By "why the protobuf-dt won't just look on the path of the project by default?" do you mean looking at all the folders in a project? Unfortunately we cannot do that because we have huge projects. What we may be able to do later is to make the editor "smarter" and look for "source folders" in JDT projects.

Thanks,
-alex

--
You received this message because you are subscribed to the Google Groups "protobuf-dt" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to protobuf-dt...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf-dt?hl=en.


protobufdttester

unread,
Oct 28, 2011, 5:09:41 PM10/28/11
to protobuf-dt
Thanks Alex. I was actually thinking more along the lines of using
the import path in concert with the project path. Maybe this isn't
the preferred way to do this, but I specify the full folder hierarchy
in my import statement. For example, in the sample project I
provided, the import looks like this:

import "src/main/resources/testpackage/protobuf/common/Common.proto";

So, if the protobuf-dt checked the project_loc/src/main/resources/
testpackage/protobuf/common/Common.proto, it should be able to find
it. It's possible there's some underlying nuances that I'm not
familiar with that make this more difficult than it appears, but that
would be my $0.02.

Thanks again for the help!
Reply all
Reply to author
Forward
0 new messages