tanqidong1992 / protobuf-dt

Automatically exported from code.google.com/p/protobuf-dt
0 stars 0 forks source link

Version 1.0.1 can no longer compile on save #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. enable 'compile on save' in Preferences
2. make some editing in file (add a comment/field) ensure editor is 'dirty'
3. save file

What is the expected output? 
new .pb.h / pb.cc files to appear in the designated directory (src-gen)

What do you see instead?
nothing

---
What version of the product are you using? On what operating system?

  Protocol Buffer Editor    1.0.1.201109121402  com.google.eclipse.protobuf.feature.group   Google, Inc.

---
Please provide any additional information below.

I think something went seriously wrong with the update / install (see also my 
other bug); note I've tried with both protoc on PATH and explicitly entered 
(note it's not possible to type / paste into the preference's edit box for the 
path to protoc, only 'browse' to fill it in).

I've also tried uninstalling and re-installing the PB-dt plugin, but no joy 
either.

From the command line it all works just fine:

~$ protoc --version
libprotoc 2.4.0
~$ which protoc
/usr/local/bin/protoc
~$ echo $PATH
/home/marco/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/us
r/games:/usr/local/java/bin:/opt/eclipse:/usr/local/android/tools:/usr/local/and
roid/platform-tools:/opt/springsource/spring-roo-1.1.5.RELEASE/bin:/opt/springso
urce/sts-2.7.1.RELEASE:/opt/springsource/vfabric-tc-server-developer-2.5.0.RELEA
SE/tomcat-6.0.32.B.RELEASE/bin:/opt/hadoop/bin
~$ cd workspaces/linux/MusicFileFix/proto/
~/workspaces/linux/MusicFileFix/proto$ cat Makefile 
# Makefile for protobufs
#
# Created by M. Massenzio, 2011-04-16

all: build

clean:
    rm -rf ../src-gen/*.pb.*

# WARNING: ./gen and ./java-gen MUST be already present, use mkdir
build: musicfile.proto
    # fails if protobuf is not installed
    pkg-config --cflags protobuf  
    protoc --cpp_out=../src-gen musicfile.proto
    @echo "Remember to include these flags in the compilation: " `pkg-config --cflags --libs protobuf`

#
# Flags for the compilation:
# compiler: -pthread -I/usr/local/include 
# linker:   -pthread -L/usr/local/lib -lprotobuf -lz
#
# In Eclipse, use Project > Properties > C/C++ Build > Settings
#
# C++ Compiler: Miscellaneous --> add -pthread in "Other flags"
#               Directories   --> add a 'workspace linked' /gen directory or 
the full path
# Linker: Libraries  (-l) protobuf (-L) /usr/local/lib
#         Miscellaneous --> Linker flags: -pthread
#                           Other objects: /usr/local/lib/libprotobuf.a
#

~/workspaces/linux/MusicFileFix/proto$ make clean
rm -rf ../src-gen/*.pb.*
~/workspaces/linux/MusicFileFix/proto$ make build
pkg-config --cflags protobuf  
-pthread -I/usr/local/include  
protoc --cpp_out=../src-gen musicfile.proto
Remember to include these flags in the compilation:  -pthread 
-I/usr/local/include -pthread -L/usr/local/lib -lprotobuf -lz -lpthread
~/workspaces/linux/MusicFileFix/proto$ ls ../src-gen
musicfile.pb.cc  musicfile.pb.h

Original issue reported on code.google.com by m.massen...@gmail.com on 13 Sep 2011 at 5:08

GoogleCodeExporter commented 9 years ago
It seems to be a problem in Xtext (so far.) I used to work, and it broke with 
Xtext 2.0.1. What version of Xtext do you have installed? (crossing fingers it 
is 2.0.1) :)

Original comment by alr...@google.com on 13 Sep 2011 at 5:57

GoogleCodeExporter commented 9 years ago
Rebuilding with Xtext 2.0.1 solves the problem. I'll be pushing a fix soon.

Original comment by alr...@google.com on 13 Sep 2011 at 10:20

GoogleCodeExporter commented 9 years ago

Original comment by alr...@google.com on 13 Sep 2011 at 11:19

GoogleCodeExporter commented 9 years ago
Looks like it's xtext 2.0.0: see attached.

Original comment by m.massen...@gmail.com on 14 Sep 2011 at 6:58

GoogleCodeExporter commented 9 years ago
Hey Marco,

I found some funkiness on how we were dealing with hierarchical folders. It had 
nothing to do with Xtext 2.0.1 (although the NPE I got was weird indeed.)

It is fixed and a new version (1.0.2) will be released tomorrow morning. 
Actually it is available now, but I will make the official announcement 
tomorrow.

Please give it a try :)

Original comment by alr...@google.com on 14 Sep 2011 at 7:13