Issue 220 in protobuf-dt: Compilation fails with spaces in proto path

83 views
Skip to first unread message

proto...@googlecode.com

unread,
May 22, 2012, 10:39:57 AM5/22/12
to proto...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 220 by m...@thzhang.co.uk: Compilation fails with spaces in proto
path
http://code.google.com/p/protobuf-dt/issues/detail?id=220

What steps will reproduce the problem?
1. Enable protoc integration (on save)
2. Edit a file with a space in the path (e.g. "c:\Documents and
Settings\...\MyProto.proto")
3. Save

What is the expected output? What do you see instead?
The proto file should be compiled, however the path is passed without being
quoted or escaped, resulting in incorrect parsing of the arguments by
protoc.

What version of the product are you using? On what operating system?
protoc: 2.4.1

Please provide any additional information below.
A simple fix may be to pass the file names encased in quotes.

proto...@googlecode.com

unread,
May 23, 2012, 7:27:50 PM5/23/12
to proto...@googlegroups.com
Updates:
Status: WontFix

Comment #1 on issue 220 by alr...@google.com: Compilation fails with spaces
This is a known issue with the protocol buffer compiler, protoc. It is not
a bug in the Eclipse plug-in. Unfortunately, there is no workaround we can
provide.

proto...@googlecode.com

unread,
Oct 23, 2012, 5:20:10 AM10/23/12
to proto...@googlegroups.com

Comment #2 on issue 220 by Thomas.M...@telsis.com: Compilation fails with
A quick test shows that protoc *can* compile proto files with spaces in the
path, if quotes are placed around the parameters. Compare the two examples
here:

C:\Temp>"H:\workspace\libraries\Protocol buffers
2.4.1\protoc-2.4.1-win32\protoc.exe" --proto_path=C:\Temp\Path with
spaces\src --java_out=C:\Temp\Path with spaces\src-gen C:\Temp\Path with
spaces\src\protobuf\messages.proto
C:\Temp\Path: warning: directory does not exist.
with: No such file or directory

C:\Temp>"H:\workspace\libraries\Protocol buffers
2.4.1\protoc-2.4.1-win32\protoc.exe" "--proto_path=C:\Temp\Path with
spaces\src" "--java_out=C:\Temp\Path with spaces\src-gen" "C:\Temp\Path
with spaces\src\protobuf\messages.proto"
(nothing printed on stdout or stderr, but Messages.java is created and
looks correct)

Using protoc 2.4.1 on Windows XP.

proto...@googlecode.com

unread,
Dec 12, 2012, 10:39:18 PM12/12/12
to proto...@googlegroups.com

Comment #3 on issue 220 by alr...@google.com: Compilation fails with spaces
Issue 233 has been merged into this issue.

alex varela

unread,
Jan 31, 2013, 5:16:11 AM1/31/13
to proto...@googlegroups.com, codesite...@google.com, proto...@googlecode.com

This solution works for windows XP in windows 7 doesn't work. Is there a common solution for both System ?

proto...@googlecode.com

unread,
Mar 10, 2013, 10:43:18 AM3/10/13
to proto...@googlegroups.com

Comment #4 on issue 220 by ovel...@google.com: Compilation fails with
Can you elaborate more why a fix is not feasible? On first glance it kind
of does look like a problem with the Eclipse plug-in :)

Looks like simply changing the logic here to properly escape command line
arguments should do the trick:
https://code.google.com/p/protobuf-dt/source/browse/com.google.eclipse.protobuf.ui/src/com/google/eclipse/protobuf/ui/protoc/command/ProtocCommand.java

Thanks

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

Aram Paronikyan

unread,
Nov 3, 2013, 8:16:51 AM11/3/13
to proto...@googlegroups.com, codesite...@google.com, proto...@googlecode.com
This is a pure bug with a simple fix. Please, fix it asap!! Thanks for Protobuf!

proto...@googlecode.com

unread,
Mar 25, 2014, 5:14:38 AM3/25/14
to proto...@googlegroups.com

Comment #5 on issue 220 by dam...@aeromac.com: Compilation fails with
I say this IS a bug. Eclipse supports paths with spaces - so should this
plugin.
Reply all
Reply to author
Forward
0 new messages