Mark Williams 14 Posted July 1, 2019 I thought I'd give the new inline variables a try in 10.3.1. When I enter eg "Var b:=true" it is underlined in squiggly red to indicate a code error (as are chunks of the subsequent code) but it compiles fine. I would like to use this new feature, but this is going to get me confused as to where actual errors do actually lie. Is this a bug or do I need to configure something in the IDE to stop this happening? Share this post Link to post
David Heffernan 2345 Posted July 1, 2019 Disable the IDE feature and rely on the compiler? Share this post Link to post
Mark Williams 14 Posted July 1, 2019 I quite like the underlining of errors. Really handy to see at a glance where your errors are without having to recompile for each one. 1 Share this post Link to post
David Heffernan 2345 Posted July 1, 2019 14 minutes ago, Mark Williams said: I quite like the underlining of errors. Really handy to see at a glance where your errors are without having to recompile for each one. Well, you'll have to make a choice. Have the squiggles, and accept that they are wrong, or remove the squiggles. Your call. Share this post Link to post
Mark Williams 14 Posted July 1, 2019 Do I really need to make that choice? As the inline vars compile ok they shouldn't be underlined as code errors. So I was wondering if there is an option I needed to configure in the IDE to prevent this issue or whether it is a bug in the new IDE. If it is not a configuration option then I assume it must be a bug. So I would rather not make the choice. I would rather get an answer and if it is a bug I will report it and hope it gets fixed. Share this post Link to post
David Heffernan 2345 Posted July 1, 2019 (edited) It's a bug and surely it's already reported. Have you searched QP yet? Obviously, if it is a bug, then you have to make that choice. I just did the search: https://quality.embarcadero.com/browse/RSP-21719 although I bet there are plenty of dupes Edited July 1, 2019 by David Heffernan Share this post Link to post
Dalija Prasnikar 1396 Posted July 1, 2019 It is a bug Editor marks inline variables as error https://quality.embarcadero.com/browse/RSP-22158 Until it gets fixed there is not much you can do. Either live with red lines or disable Error Insight. Share this post Link to post
Dave Nottage 557 Posted July 1, 2019 4 hours ago, Dalija Prasnikar said: Either live with red lines or disable Error Insight ..or not declare vars inline 🙂 6 Share this post Link to post
Darian Miller 361 Posted July 2, 2019 33 minutes ago, Dave Nottage said: ..or not declare vars inline 🙂 Best choice for me 1 Share this post Link to post
Sherlock 663 Posted July 2, 2019 @Mark Williams I'm genuinely surprised that Error Insight is working for you apart from inline variables. Apart from small (very small) projects this has never been the case for me since they introduced it, back in the day. So I guess...lucky you. I have to disable it every time I install Delphi. *sigh* 1 1 Share this post Link to post
Dalija Prasnikar 1396 Posted July 2, 2019 6 hours ago, Dave Nottage said: ..or not declare vars inline 🙂 Considering that code completion and navigation is also broken by inline variables, that is currently the most appealing option. Share this post Link to post
Mark Williams 14 Posted July 2, 2019 @Sherlock Error Insight (didn't know it was called that) seems to be working fine for me since at least 10.2. It is really useful. Compiling and re-compiling to detect errors is just so painful. Share this post Link to post
PeterPanettone 157 Posted July 14, 2019 We really need a genius who writes an add-in which replaces the native Delphi Code Insight with a working one. Such an add-in should also be highly configurable. I would pay up to $100 for such an add-in. Share this post Link to post
Dalija Prasnikar 1396 Posted July 14, 2019 33 minutes ago, PeterPanettone said: We really need a genius who writes an add-in which replaces the native Delphi Code Insight with a working one. Such an add-in should also be highly configurable. I would pay up to $100 for such an add-in. Not really... Main problem with IDE is that it uses different parser... so when compiler changes and gets new features IDE part also needs to be updated with support for new features. That is what is missing here. IDE does not know about inline variables. According to May 2019 roadmap https://community.idera.com/developer-tools/b/blog/posts/may-2019-rad-studio-roadmap-commentary-from-product-management this problem will be solved by using LSP (Language Server Protocol) https://langserver.org/ That way, there will no longer be discrepancy between IDE and compiler. 1 Share this post Link to post
PeterPanettone 157 Posted July 14, 2019 (edited) 13 hours ago, Dalija Prasnikar said: According to May 2019 roadmap https://community.idera.com/developer-tools/b/blog/posts/may-2019-rad-studio-roadmap-commentary-from-product-management this problem will be solved by using LSP (Language Server Protocol) https://langserver.org/ That way, there will no longer be discrepancy between IDE and compiler. So you are hopeful? Thank you for giving me new hope! Edited July 15, 2019 by PeterPanettone Share this post Link to post