eranif / codelite

A multi purpose IDE specialized in C/C++/Rust/Python/PHP and Node.js. Written in C++
https://codelite.org
GNU General Public License v2.0
2.13k stars 455 forks source link

Flex cmake #3352

Closed Jarod42 closed 4 months ago

Jarod42 commented 5 months ago

Build with flex, and remove generated file from repo. Restore CodeLite/include_finder.l Report build fixes from generated file CodeLite/PhpLexer.cpp to source file CodeLite/PhpLexer.l

UffeJakobsen commented 5 months ago

Question - I may have missed some detail here - but wont this open up for the risk of different versions of flex producing different output ? Ultimately resulting in weird problems on different distributions that is difficult to debug

Jarod42 commented 5 months ago

@UffeJakobsen: The different output should be equivalent, as for gcc/clang/cmake version used... Chances are than newer versions are even better. That avoids "desynchronization" between sources and generated files (which might be source of bug too). (Yes, some of the generated files has been changed manually :-/)

If needed, I might changed to still put generated files in source tree, but I prefer to not have generated files in source tree. (I plan to also remove generated files from wxcrafter in the future, but it requires some works in the tool first).

UffeJakobsen commented 5 months ago

Well at my $WORK-place - some 6-7 years ago - we had an obscure problem - some of our binary releases worked different than others... The problem was traced down to differences in the flex version that was used to build the release. That was before we got real CI/CD systems - the sw-engineers that did the release builds each had their own favorite system on which they did the release builds... and at least one of these systems was running a distro that had a flaky flex.... With open source CodeLite there are lots of different flex versions in play...

Jarod42 commented 5 months ago

What is really different between Flex than other dependencies (libssh, wxwidgets, hungspell, ...) which might have different version? We might still require a specific version from CMake IIRC.

AJenbo commented 3 months ago

@Jarod42 Would have been hard for me to make the recent fixes to the PHP parser without this clean up, so thank you.