Jump to content
Mark Williams

New Inline variables mess up IDE

Recommended Posts

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

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.

  • Like 1

Share this post


Link to post
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

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
4 hours ago, Dalija Prasnikar said:

Either live with red lines or disable Error Insight

..or not declare vars inline 🙂

  • Like 7

Share this post


Link to post

@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*

  • Like 1
  • Sad 1

Share this post


Link to post
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

@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

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
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.

  • Like 1

Share this post


Link to post
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 by PeterPanettone

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×