Jacek Laskowski 57 Posted September 18, 2019 How to set Delphi compiler to stop with error on classes where unknown attributes were used (no appropriate units in the uses section)? Delphi 10.3 Share this post Link to post
Der schöne Günther 316 Posted September 18, 2019 I don't have my RAD Studio in English, so the translation might be off: Project options -> Delphi Compiler -> Hints and Warnings -> Not supported language Features You can set this from "True" to "Error" so the compilation will stop. Share this post Link to post
Jacek Laskowski 57 Posted September 18, 2019 In previous versions of delphi I did so, in 10.3 it doesn't work, that's why I asked a question. Share this post Link to post
Dalija Prasnikar 1396 Posted September 18, 2019 8 minutes ago, Jacek Laskowski said: In previous versions of delphi I did so, in 10.3 it doesn't work, that's why I asked a question. Please file a bug report. Share this post Link to post
Jacek Laskowski 57 Posted September 18, 2019 This bug is ...resolved: https://quality.embarcadero.com/browse/RSP-20384 Share this post Link to post
Dalija Prasnikar 1396 Posted September 18, 2019 13 minutes ago, Jacek Laskowski said: This bug is ...resolved: https://quality.embarcadero.com/browse/RSP-20384 Err... according to that there is supposed to be new warning so current behavior is fine, but I cannot see it nor turn it on. (except with compiler directives) Share this post Link to post
Uwe Raabe 2057 Posted September 18, 2019 7 minutes ago, Dalija Prasnikar said: according to that there is supposed to be new warning so current behavior is fine, but I cannot see it nor turn it on. (except with compiler directives) Yes, my comment to Marcos post remained unheard. We should create a separate QP entry for that. 1 Share this post Link to post
Jacek Laskowski 57 Posted September 18, 2019 There is no access to such a warning! In turn, the compiler directive does not work globally, but locally (per unit), so it is useless. 1 Share this post Link to post
Uwe Raabe 2057 Posted September 18, 2019 In Project Options - Delphi-Compiler - Compiling add the following value to Additional options to pass to the compiler: -W^UNKNOWN_CUSTOM_ATTRIBUTE 2 Share this post Link to post
Dalija Prasnikar 1396 Posted September 18, 2019 Reported as Unknown attribute can only be turned to error via compiler directive https://quality.embarcadero.com/browse/RSP-26208 Share this post Link to post
Dalija Prasnikar 1396 Posted September 18, 2019 1 minute ago, Uwe Raabe said: In Project Options - Delphi-Compiler - Compiling add the following value to Additional options to pass to the compiler: -W^UNKNOWN_CUSTOM_ATTRIBUTE Arghhhh... who designs this stuff? Some warnings can be setup at one place, other in another... it is a mess... 3 Share this post Link to post
Uwe Raabe 2057 Posted September 18, 2019 4 minutes ago, Dalija Prasnikar said: Some warnings can be setup at one place, other in another. That is only a workaround until the dialog allows setting it directly. The mentioned option is a last resort to tweak the command line parameters given to the compiler. Share this post Link to post
Dalija Prasnikar 1396 Posted September 18, 2019 If the things were done right in the first place we would not need workarounds. Share this post Link to post
Uwe Raabe 2057 Posted September 18, 2019 47 minutes ago, Dalija Prasnikar said: If the things were done right in the first place we would not need workarounds. If things were always done right in the first place neither the term bug nor the term workaround would exist. 4 1 1 Share this post Link to post
Jacek Laskowski 57 Posted September 19, 2019 On 9/18/2019 at 1:27 PM, Uwe Raabe said: In Project Options - Delphi-Compiler - Compiling add the following value to Additional options to pass to the compiler: -W^UNKNOWN_CUSTOM_ATTRIBUTE Thanks for tip! Share this post Link to post