<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>+1 to remove MSVC support.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> pgrouting-dev [mailto:pgrouting-dev-bounces@lists.osgeo.org] <b>On Behalf Of </b>Vicky Vergara<br><b>Sent:</b> Tuesday, April 11, 2023 12:26 PM<br><b>To:</b> pgRouting developers mailing list <pgrouting-dev@lists.osgeo.org><br><b>Subject:</b> [pgrouting-dev] MOTION: Remove support for compilation with MSVC<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><div><div><p class=MsoNormal>Hello all:<br>PSC: Please send your vote on this motion<o:p></o:p></p></div><div><p class=MsoNormal>General developers: If you see fit, please let us know what you think.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I am opening this motion, because of the following:<o:p></o:p></p></div><div><p class=MsoNormal>During the last 10 years an effort has been made to standardize the code base of pgRouting.<o:p></o:p></p></div><div><p class=MsoNormal>With this standardization, adding new functionality has been getting "easier".<o:p></o:p></p><div><p class=MsoNormal>TRSP was a stopper, on simplifying the code base as it did not follow the standard we have been using these last years, but finally on 3.4, we managed to rewrite the code and fix a lot of bugs that pgr_trsp had:<o:p></o:p></p></div><div><p class=MsoNormal>Before: <a href="https://docs.pgrouting.org/3.3/en/pgr_trsp.html" target="_blank">https://docs.pgrouting.org/3.3/en/pgr_trsp.html</a><o:p></o:p></p></div><div><p class=MsoNormal>That starting from 3.4 has become: <br><a href="https://docs.pgrouting.org/3.4/en/pgr_trsp.html" target="_blank">https://docs.pgrouting.org/3.4/en/pgr_trsp.html</a><br><a href="https://docs.pgrouting.org/3.4/en/pgr_trsp_withPoints.html" target="_blank">https://docs.pgrouting.org/3.4/en/pgr_trsp_withPoints.html</a><o:p></o:p></p></div><div><p class=MsoNormal><a href="https://docs.pgrouting.org/3.4/en/pgr_trspVia.html" target="_blank">https://docs.pgrouting.org/3.4/en/pgr_trspVia.html</a><br><a href="https://docs.pgrouting.org/3.4/en/pgr_trspVia_withPoints.html" target="_blank">https://docs.pgrouting.org/3.4/en/pgr_trspVia_withPoints.html</a><o:p></o:p></p></div><div><p class=MsoNormal>(the old functionality is still available)<o:p></o:p></p></div></div><p class=MsoNormal><br>As standardized code, I mean files/and functions (visually) look very similar and they work in a similar way. On Monday April 10, I made a twitch about the following PR<br><a href="https://github.com/pgRouting/pgrouting/pull/2504" target="_blank">https://github.com/pgRouting/pgrouting/pull/2504</a><br>The twitch channel:<br><a href="https://www.twitch.tv/cvvergara" target="_blank">https://www.twitch.tv/cvvergara</a><o:p></o:p></p></div><p class=MsoNormal>Where I explain the commonality of the "*_input" files, and how the work was done to simplify the base code of pgRouting. (2 hours aprox)<o:p></o:p></p></div><div><p class=MsoNormal>There is one problem that is out of our control with MSVC and postgres, where we are not alone, as plv8 also has the same problem. (detail on the issue).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>By doing the changes proposed on the PR, it will be avoided problems generated from the copy/paste and "forgot to adjust something",<o:p></o:p></p></div><div><p class=MsoNormal>for example:<br><a href="https://github.com/pgRouting/pgrouting/blob/main/src/common/vehicles_input.c#L243" target="_blank">https://github.com/pgRouting/pgrouting/blob/main/src/common/vehicles_input.c#L243</a><o:p></o:p></p></div><div><p class=MsoNormal>Clearly the file was copied from the orders_input file, but "forgot to change the word "Orders" to "vehicles".<o:p></o:p></p></div><div><p class=MsoNormal>Also, those PGR_DBG are for developing purposes, and "forgot to delete those PGR_DBG" statements. This is a "Development problem".<o:p></o:p></p></div><div><p class=MsoNormal>We also might have "Maintenance problems", for example, because of the interaction with postgres like the data type <span style='font-size:13.5pt;font-family:"Courier New"'>Portal</span>:<br><a href="https://github.com/pgRouting/pgrouting/blob/main/src/common/vehicles_input.c#L196" target="_blank">https://github.com/pgRouting/pgrouting/blob/main/src/common/vehicles_input.c#L196</a><o:p></o:p></p></div><div><p class=MsoNormal>if for some reason whatsoever, the PostgreSQL team decides to change the name of the data type, we have zillions of places where we need to do a change.<o:p></o:p></p></div><div><p class=MsoNormal><br>By using C++ and having a template:<br><a href="https://github.com/pgRouting/pgrouting/pull/2504/commits/38ebae23a5d65e98590f4d3a817ebea419a6f6c5" target="_blank">https://github.com/pgRouting/pgrouting/pull/2504/commits/38ebae23a5d65e98590f4d3a817ebea419a6f6c5</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>* the type that postgres has its captured automatically, for example:<o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Courier New"'>auto SPIportal = pgr_SPI_cursor_open(SPIplan);</span><o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>* The code is clean, we don't need to use PGR_DBG like before, with manual copy/paste and adjustment, something might be missing, and we need to debug, but then, when things work, we forget that we don't need to debug anymore.<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>So a lot of problems for developing and maintenance are solved by using C++ instead of C and using templates on similar code.<o:p></o:p></p></div><div><p class=MsoNormal>This is a first step, and a crucial one as there is a function <span style='font-size:13.5pt;font-family:"Courier New"'>static void process </span>within the C files, that connect with postgres, where they make the calls to get the data from postgres.<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>and they are all similar, therefore they are candidates to become templates<o:p></o:p></p></div><div><p class=MsoNormal>This experiment:<br><a href="https://github.com/pgRouting/pgrouting/pull/2473">https://github.com/pgRouting/pgrouting/pull/2473</a><o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Although not using a template, but using a single file to process 2 pgrouting functions, demonstrates that templating can be achieved, and the getters will be called from within C++ code.<o:p></o:p></p></div><div><p class=MsoNormal>So the getters,/fetchers/check code on the<br><a href="https://github.com/pgRouting/pgrouting/pull/2504">https://github.com/pgRouting/pgrouting/pull/2504</a><o:p></o:p></p></div><div><p class=MsoNormal>that interact with postgres, it's a "must" to be in C++, this "must" does not work well on MSVC.<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Which by the way, been the main developer of pgRouting, I haven't touched a windows machine, let alone MSVC since 1997, So from my point of view, developing pgRouting with MSVC is not a priority, what is the priority is that it still be compiled with msys2/mingw64 (whatever that is) and that can be package for windows. (Which Regina has confirmed can be done)<o:p></o:p></p></div><div><p class=MsoNormal>Regards<o:p></o:p></p></div><div><p class=MsoNormal>Vicky<o:p></o:p></p></div><div><div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></div></body></html>