Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proto3 support on Windows #20

Closed
maciejlach opened this issue Jan 16, 2017 · 4 comments
Closed

proto3 support on Windows #20

maciejlach opened this issue Jan 16, 2017 · 4 comments

Comments

@maciejlach
Copy link
Contributor

@maciejlach maciejlach commented Jan 16, 2017

I tried to import simple proto3 file via RProtoBuf library, unfortunately this operation fails with error regarding unrecognized syntax identifier:

> install.packages("RProtoBuf")
> library(RProtoBuf)
> proto.dir <- "D:/dev/tmp/proto"
> readProtoFiles( dir = proto.dir )
D:/dev/tmp/proto/search.proto:1:10:Unrecognized syntax identifier "proto3".  This parser only recognizes "proto2".
Error in readProtoFiles(dir = proto.dir) :
  Could not load proto file 'D:/dev/tmp/proto/search.proto'

search.proto is defined as:

syntax = "proto3";

message SearchRequest {
  string query = 1;
  int32 page_number = 2;
  int32 result_per_page = 3;
}

My environment:

R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

RProtoBuf: https://cloud.r-project.org/bin/windows/contrib/3.3/RProtoBuf_0.4.7.zip

C:\>protoc --version
libprotoc 3.1.0

Thanks in advance.

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Jan 16, 2017

Yes, that's a bug. We still use the proto2 libraries.

I just tested a really simply fix pointing to the new libraries and built it on rhub.

For a short time window (two days?) you can access the resulting zip file for the package

Could you test that real quick for me?

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Jan 16, 2017

And here is the package at win-builder; it too will persist for some time (IIRC: 72 hours).

It would be nice if you could confirm that it works. I can't (easily) fire up the Windows VM at work from home (as we have a holiday over here today).

@maciejlach
Copy link
Contributor Author

@maciejlach maciejlach commented Jan 16, 2017

@eddelbuettel I downloaded package from win-builder and I can confirm that load proto3 files on Windows are parsed correctly. Thanks!

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Jan 16, 2017

Great, thanks for the feedback, and the bug report reminding us that we had forgotten Windows.

I'll push a 0.4.8 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.