I have a general question regarding the configuration of the project.
In many places I can see a pattern where a configuration failure of some component does not lead to built break. Instead it is silently (hard to spot status message does not count) ignored. This leads to very hard to spot problems during compilation and installation.
Few examples of such places:
More can be seen by using simple grep: git grep -A 1 'message(STATUS.*FAILED'
Why not message(FATAL_ERROR ...)? This way user will know right away that something is missing and it's not possible to build the project (building only half of the project is not a successful built). In my case the installation of all onecc scripts silently failed without letting me know that something is wrong... The reason for that was the fact that I have only Python 3.13 available (Ubuntu 25.10)...
In the past I also struggled to build onnx2circle (now I know that this tool is deprecated, but my point here still holds) because I had to add all dependencies to the -DBUILD_WHITELIST= list. And even though the list of dependencies was not complete, the configuration stage succeeded. However, the ./nncc build command built nothing.
Also I've spotted different problematic code - the same category but different pattern:
If one will not spot this return() and add some code below that line, the code will not be executed unless tests are enabled... Why not wrap the test code in the if(ENABLE_TEST) code block? Such logic would be easier to read and is not error prone due to many return paths in the code.
I have a general question regarding the configuration of the project.
In many places I can see a pattern where a configuration failure of some component does not lead to built break. Instead it is silently (hard to spot status message does not count) ignored. This leads to very hard to spot problems during compilation and installation.
Few examples of such places:
More can be seen by using simple grep:
git grep -A 1 'message(STATUS.*FAILED'Why not
message(FATAL_ERROR ...)? This way user will know right away that something is missing and it's not possible to build the project (building only half of the project is not a successful built). In my case the installation of alloneccscripts silently failed without letting me know that something is wrong... The reason for that was the fact that I have only Python 3.13 available (Ubuntu 25.10)...In the past I also struggled to build
onnx2circle(now I know that this tool is deprecated, but my point here still holds) because I had to add all dependencies to the-DBUILD_WHITELIST=list. And even though the list of dependencies was not complete, the configuration stage succeeded. However, the./nncc buildcommand built nothing.Also I've spotted different problematic code - the same category but different pattern:
If one will not spot this
return()and add some code below that line, the code will not be executed unless tests are enabled... Why not wrap the test code in theif(ENABLE_TEST)code block? Such logic would be easier to read and is not error prone due to many return paths in the code.