Issue1090

Title use newer uncrustify version
Priority wish Status resolved
Superseder Nosy List florian, jendrik, malte
Assigned To jendrik Keywords
Optional summary
PR: https://github.com/aibasel/downward/pull/157
TODO: ~~update wiki (https://www.fast-downward.org/ForDevelopers/Uncrustify)~~

Created on 2023-07-16.11:57:23 by jendrik, last changed by florian.

Summary
PR: https://github.com/aibasel/downward/pull/157
TODO: update wiki (https://www.fast-downward.org/ForDevelopers/Uncrustify)
Messages
msg11134 (view) Author: florian Date: 2023-07-19.18:47:26
Thanks Jendrik! I merged the PR.
msg11131 (view) Author: jendrik Date: 2023-07-19.11:50:17
Wiki is updated.
msg11129 (view) Author: florian Date: 2023-07-19.11:00:48
Regarding the wiki update, the URL changes a bit. The following instructions worked for me:

wget https://github.com/uncrustify/uncrustify/archive/refs/tags/uncrustify-0.72.0.tar.gz
tar -xzvf uncrustify-0.72.0.tar.gz
cd uncrustify-uncrustify-0.72.0
mkdir build
cd build
cmake ../
make -j4
sudo cp uncrustify /usr/local/bin  # Add binary to a directory on PATH.
msg11113 (view) Author: florian Date: 2023-07-16.12:41:40
I left some comments on Github. I think the changes done to the code by the newer version are all positive, but we should fix the old hacks that are affected. I'm somewhat on the fence about whether uncrustify should introduce things that go beyond reformatting the code, like static_cast.

How would the wiki page change? Are the installation instructions still working in the same way for the new version? Is it working on all systems we want to support (I remember getting the right uncrustify version used to be tricky)?

Is there anything else that has to be changed besides the Github actions, Wiki, and code?
msg11112 (view) Author: jendrik Date: 2023-07-16.11:57:23
The current uncrustify version (0.67) is quite old and is missing support for many newer C++ features. For example, it produces ugly indentation when a function returns an initializer list. Therefore, we want to switch to a newer version. I suggest version 0.72 because it's the one that is in the repos of all recent Ubuntu versions.
History
Date User Action Args
2023-07-19 18:47:26floriansetstatus: reviewing -> resolved
messages: + msg11134
2023-07-19 11:50:17jendriksetmessages: + msg11131
summary: PR: https://github.com/aibasel/downward/pull/157 TODO: update wiki (https://www.fast-downward.org/ForDevelopers/Uncrustify) -> PR: https://github.com/aibasel/downward/pull/157 TODO: ~~update wiki (https://www.fast-downward.org/ForDevelopers/Uncrustify)~~
2023-07-19 11:00:48floriansetmessages: + msg11129
2023-07-16 12:41:40floriansetmessages: + msg11113
2023-07-16 12:17:47jendriksetstatus: unread -> reviewing
assignedto: jendrik
summary: PR: https://github.com/aibasel/downward/pull/157 TODO: update wiki (https://www.fast-downward.org/ForDevelopers/Uncrustify)
2023-07-16 11:57:23jendrikcreate