Please make inline vars usable for production – fix RSP-28892
With the arrival of Delphi Rio 10.3 in October 2018 we saw “a very handy feature to the language, local inline variables with local scope and type inference” [Marco Tech Blog]. That was a feature “long overdue” [Comment section] and helped to push the Delphi language a little bit further. We’ve been very excited about this feature helping us writing code we’re all used to in other languages especially those used in for-loops:
1 2 3 4 |
for var I: Integer := 1 to 10 do for var Item: TItemType in Collection do |
or even more simplified to
1 2 3 4 |
for var I := 1 to 10 do for var Item in Collection do |
As soon as the ISO/Web installer hit the download section we grabbed it, installed it… and have been hit hard in the face by CodeInsight (or whatever that feature is called) with not recognizing that simple code above as a valid Delphi code – which (not only) prevents working of not just the “Find declaration” but all of the source code productivity features as well. Ok, it was the first release of a new language feature, so well, we could wait for the next release which surely would fix that (there was an entry already in the Quality portal opened during the beta release…*sigh*).
Then came Delphi 10.3.1 in February 2019 – downloaded, installed, nothing changed, bug still there.
Then came Delphi 10.3.2 in July 2019 – downloaded, installed, nothing changed, bug still there.
Then came Delphi 10.3.3 in November 2019 – downloaded, installed, nothing changed, bug still there.
Then came Delphi 10.4 in May 2020 – downloaded, installed – oh yes, the inline vars aren’t tagged as error, but Go-to-definition nor Refactoring won’t work, thus bug still there.
The “fun” part is, while commenting both releases with the same request on fixing the RSP, all of the MVPs (including Marco) decided to delete (or not to publish) my comment about my request on fixing that bug. Not cool.
So here I am again – more than 600 days after the introduction of the new feature – begging for a fix so we could use that new feature. Please fix (latest RSP submitted):
RSP-28892 “Find Declaration” won’t work if inline vars are used
Thank you.
4 Comments to Please make inline vars usable for production – fix RSP-28892
Bothers me a lot, too
July 23, 2019
I agree that such issues need to be fixed, and likely should have been part of the initial implementation of in-line vars or at least documented as a known issue with the release(s).
This has been brought up by many individuals, and EMBT knows that CodeInsight, ErrorInsight, Refactoring and other code tools needs some significant re-work. If you look at the road map for 10.4 you will see that EMBT intends on implementing an LSP (Language Server Protocol) for Delphi. C++ got one with the 10.3.2 release, but EMBT needs to implement their own for Object Pascal. It is a much anticipated release for these reasons alone.
July 23, 2019
Error inside has been fundamentally broken since it was first introduced. Even when it can make sense of the syntax (and if you use a single $IF, you can pretty much forget it ever doing that) – it just slows things down. If you are lucky, it doesn’t just crash the IDE.
Turning it off is one of the first things I do as part of migrating my settings forward.
Will the LSP promised for future versions finally fix things? I have my doubts. The protocols certainly are not designed for speed and efficiency.
Turn it off, pretend it doesn’t exist. Problem solved as far as I am concerned.
July 25, 2020
I’m glad to see others are upset about this too. I grabbed the latest fixes, but there is still a problem where if unit A includes unit B in the interface, and unit B includes unit A in the implementation, Error Insight gets all mixed up and simply stops flagging any and all errors. Not cool.
Granted code could be refactored, but in an enterprise scenario, ours anyway, a programmer cannot decide to just go and change code as he pleases.
Very frustrating.
Leave a comment
About Dennis D. Spreen
Search
Recent Posts
- How to compile Lua 5.4.0 for Android as a dynamic library using Android Studio 4
- Please make inline vars usable for production – fix RSP-28892
- How to compile Lua 5.4.0 as a Mac OS X dynamic library
- How to compile Lua 5.4.0 for Linux as a shared library
- How to compile Lua 5.4.0 for Windows
- Daily Wage – a Spigot/Bukkit plugin that pays out a daily wage
- How to compile Lua 5.3.5 for Windows
- Better Collada exporter for Blender with custom properties
- MOS6502-delphi – a MOS 6502 CPU emulator for Delphi
- Pass a multidimensional array as a parameter (with a hidden caveat)
Categories
Tags
Archives
- May 2020
- March 2020
- June 2019
- March 2017
- August 2016
- July 2016
- June 2016
- January 2016
- September 2015
- February 2015
- January 2015
- October 2014
- September 2014
- August 2014
- May 2014
- March 2014
- February 2014
- November 2011
- June 2011
- February 2011
- March 2010
- September 2009
- August 2009
- July 2009
- May 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- February 2008
- June 2007
Delphi Feeds
- Habari STOMP Client libraries release 2024.12 December 7, 2024
- Delphi and AI December 7, 2024
- Uses Clause Manager topic added to the GExperts help December 6, 2024
- Upgrading C++Builder 12.2: Tip #4 1/2: Check out compiler safety options December 6, 2024
- Upgrading C++Builder 12.2: Tip #4, Take Advantage of Security and Correctness December 5, 2024
- .NET MAUI: Complete Guide December 4, 2024
- Upgrading C++Builder 12.2: Tip #3, Massive Files with iostreams December 4, 2024
- Log exceptions in your Delphi app in the cloud with StellarDS.io December 4, 2024
- Introducing Signotaur - Remote Code Signing Server December 4, 2024
- Upgrading C++Builder 12.2: Tip #2, Handling Old RTL December 3, 2024
July 23, 2019