Closed mdbergmann closed 2 years ago
It concatenates the resultants into a file.
Example:
I went to
jgodbou@penguin:~/quicklisp/local-projects/cl-protobufs/google/protobuf
Then I ran:
protoc --plugin=protoc-gen-lisp=/usr/local/bin/protoc-gen-lisp --lisp_out=output-file=b.lisp:/tmp --proto_path=. a*.proto
If you look at b.lisp
inside of /tmp
we concatenate the different generated files.
Running cat /tmp/b.lisp | less
you see:
;;; any.proto.lisp
;;;
;;; Generated by the protocol buffer compiler. DO NOT EDIT!
(cl:in-package #:common-lisp-user)
.
.
.
;;; api.proto.lisp
;;;
;;; Generated by the protocol buffer compiler. DO NOT EDIT!
(cl:in-package #:common-lisp-user)
.
.
.
I'd suggest sticking with ASDF and not bothering running protoc manually.
@mdbergmann did this sufficiently answer your question?
Thanks for you answer. Let me try this tonight. I have a folder structure of .proto files so I'd be curious what it does with this. Or should protoc be called on a per folder basis?
What do you mean with 'sticking to ASDF'?
Once everything is installed, you can use
protobuf-source-file
in your asd file.
It will call protoc for you.
Check the well-known-types
module in the cl-protobufs asd for an example
I guess this never made it to the readme? Then that should be a documentation bug...
Yeah, would be cool if that could get documented.
Hi.
This is more a question as I couldn't find the answer.
I've tried a few variants:
or
The cl plugin then responds with:
--lisp_out: protoc-gen-lisp: First file chunk returned by plugin did not specify a file name.
So, I'm not sure if the
--lisp_out
form is correct as in the documentation it usesoutput-file
, but here it's multiple files.Any advice?
Manfred