proto3 support on Windows #20

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

Projects

None yet

2 participants

@maciejlach

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
Owner
eddelbuettel commented Jan 16, 2017 edited

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
Owner
eddelbuettel commented Jan 16, 2017 edited

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

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

@eddelbuettel
Owner

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