[zeromq-dev] Fighting between zproto and zproject.
Kevin Sapper
kevinsapper88 at gmail.com
Sun Oct 13 22:45:29 CEST 2019
Hi Brett,
I think we need for zproto to be aware of zproject. Meaning if there's an
api file for a class we should not generate and override the zproject
headers.
Maybe instead of generating header files zproto could generate api files.
That way we avoid conflicts with zproject in regards to the header files.
//Kevin
Brett Viren via zeromq-dev <zeromq-dev at lists.zeromq.org> schrieb am Fr.,
11. Okt. 2019, 23:54:
> Hi,
>
> I'm rather confused about what should be generating headers and source
> when both zproto and zproject are used.
>
> Trying three ways:
>
> 1:
> (rm all generated source and headers)
> gsl project.xml
>
> 2:
> (rm all generated source and headers)
> gsl project.xml
> make code
>
> 3:
> (rm all generated source and headers)
> gsl project.xml
> (rm generated src/*_{client,server,proto}*.{inc,hpp,cpp}
> cd src && gsl *.xml
>
> It's the last that seems to produce the best code.
>
> The source generated by just "gsl project.xml" lacks some of the
> niceties of the version that "cd src && gsl *.xml" provides such as more
> contents in the initial private structs.
>
> I found this past message which seems to speak to the issue:
>
> https://zeromq-dev.zeromq.narkive.com/uiD9AXgS/czmq-code-generation
>
> Should #3 be what is baked into "make code"?
>
> Or, is it that a new project supposed to do a one-time explicit
>
> cd src && gsl *.xml
>
> then rely on the fact that subsequent "make code" will not rewrite the
> source?
>
>
> A minor secondary problem is that "make code" causes the "proto" header
> to be generated by zproject while zproto's version has a nice comment
> block describing all the messages.
>
>
> So, I think that the Makemodule.am file should change from:
>
> code:
> cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zperf_msg.xml
> cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zperf_server.xml
> cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zperf_client.xml
> cd $(srcdir); gsl -target:- project.xml
>
> to:
>
> code:
> cd $(srcdir); gsl -target:- project.xml
> cd $(srcdir)/src; gsl -topdir:.. -q zperf_msg.xml
> cd $(srcdir)/src; gsl -topdir:.. -q zperf_server.xml
> cd $(srcdir)/src; gsl -topdir:.. -q zperf_client.xml
>
>
> (where "zperf" is my project)
>
>
> Thanks,
> -Brett.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20191013/0f9f0a06/attachment.htm>
More information about the zeromq-dev
mailing list