Trailing slash in schema path
.proto
files are parsed by Loader
The filename must be relative to the mapping path.
For instance, having the following file tree:
/home/giorgio/Documents/Workspair/Protobuf/
└── workspair
├── grpc
│ ├── booking.proto
│ └── sharing.proto
└── protobuf
├── date.proto
├── facility.proto
├── i18n.proto
├── job.proto
├── location.proto
├── price.proto
├── user.proto
└── workshop.proto
/home/giorgio/Documents/Workspair/Protobuf/
is the schema directory and mapping root;
.proto
files are loaded using their relative path (eg workspair/grpc/booking.proto
, workspair/protobuf/date.proto
)
Error with trailing slash
When a trailing slash is in the -S
schema name, an error occurs:
$ profanedb_server -S ~/Documents/Workspair/Protobuf/
[2017-10-10 18:31:57.760191] [0x00007f22ce2fd400] [error] File at ../workspair/grpc/booking.proto couldn't be loaded
terminate called after throwing an instance of 'std::runtime_error'
what(): ../workspair/grpc/booking.proto couldn't be loaded