<div dir="ltr">Hi Julien,<div><br></div><div>I could fix these in the past by adding the appropriate ModuleHeaderCode, it requires looking into the generated sip_corepart file to find out which class was responsible.</div><div><br></div><div>#ifdef SIP_RUN<br>% ModuleHeaderCode<br>#include "qgsoptionalexpression.h"<br>% End<br>#endif<br></div><div><br></div><div>Hope this helps</div><div>Matthias</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 31, 2021 at 9:11 AM Julien Cabieces <<a href="mailto:julien.cabieces@oslandia.com">julien.cabieces@oslandia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Hy Nyall,<br>
<br>
Yes, I am already rebased on master. And I saw you change it to 13, so I<br>
try to increase it to 14... and it works for core but not analysis.<br>
<br>
For now, I'm gonna stick with a concat value of 1, and when I'll be<br>
ready to push, I'll search for a value which works.<br>
<br>
Thanks for your response.<br>
<br>
Kind regards,<br>
Julien<br>
<br>
> On Wed, 26 May 2021 at 23:49, Julien Cabieces<br>
> <<a href="mailto:julien.cabieces@oslandia.com" target="_blank">julien.cabieces@oslandia.com</a>> wrote:<br>
>><br>
>><br>
>> Hi devs,<br>
>><br>
>> I'm working on a new QGIS feature and wanted to add a new API in core module. I get a strange error when building, on a class not related to what I am adding.<br>
>><br>
>> /home/julien/work/QGIS/build_debug/python/core/sip_corepart11.cpp:272:67: error: no type named 'QgsOptionalQgsExpressionBase' in the global namespace; did you mean 'QgsOptionalExpression'?<br>
>>      ::QgsOptionalQgsExpressionBase *sipCpp = reinterpret_cast< ::QgsOptionalQgsExpressionBase *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QgsOptionalQgsExpressionBase));<br>
>><br>
>> It said that QgsOptionalExpressionBase is not defined in<br>
>> sip_corepart_11.cpp, but the typedef is actually in sip_corepart_10.cpp,<br>
>> at the end of the file.<br>
><br>
> Are you based on a recent master branch? I had to bump the concat<br>
> parts to 13 recently to avoid this exact issue. Perhaps if you rebase<br>
> it will be fixed already.<br>
><br>
<br>
>> From what I understand, CMakeList variable SIP_CONCAT_PARTS allows to<br>
>> split the SIP generated cpp code in several module, but in this case it<br>
>> looks like split happens on a bad location (typedef on one side, part of<br>
>> the code on the other side).<br>
><br>
> Yeah, it's sip being fragile. We've hit this many times in past, and<br>
> the solution each time is to increase the number of parts by 1.<br>
><br>
>><br>
>> If I set SIP_CONCAT_PARTS to 1, it works.<br>
>><br>
>> Has anyone already facing this kind of issue? Is there some sort of instruction that I should be aware of to solve this?<br>
>><br>
>> I'm on master, Debian Bullseye, SIP 4.19.25<br>
>><br>
>> Kind regards,<br>
>> Julien<br>
>> _______________________________________________<br>
>> QGIS-Developer mailing list<br>
>> <a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
>> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
>> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div>