basho/erlang_protobuffs — pull request #29 by djnym (2012-08-17 20:43:04+00:00)
Title: rotobuffs_compile:generate_source/1 was no longer working

Given a proto file called "caps.proto" with contents

message WithCaps {
optional string nocaps = 1;
optional string CAPS = 2;
}

Running generate source would no longer generate source.

1> protobuffs_compile:generate_source("caps.proto").
** exception error: no match of right hand side value {error,enoent}
in function protobuffs_compile:parse_file/1
in call from protobuffs_compile:generate_source/2
2> protobuffs_compile:generate_source(caps).
** exception error: no match of right hand side value {error,enoent}
in function protobuffs_compile:parse_file/1
in call from protobuffs_compile:generate_source/2

With this fix

1> protobuffs_compile:generate_source("caps.proto").

=INFO REPORT==== 17-Aug-2012::13:38:24 ===
Writing header file to "caps_pb.hrl"

=INFO REPORT==== 17-Aug-2012::13:38:24 ===
Writing src file to "caps_pb.erl"
ok
2> protobuffs_compile:generate_source(caps).

=INFO REPORT==== 17-Aug-2012::13:38:29 ===
Writing header file to "caps_pb.hrl"

=INFO REPORT==== 17-Aug-2012::13:38:29 ===
Writing src file to "caps_pb.erl"
ok

Things work.