CRS AL Language Extension – ControlNames are no longer surrounded by double quotes

There is a recent change that I had to introduce in the CRS AL Language Extension – you know, that tiny little VSCode Extension that quite a lot of you seem to be using ;-). +89000 downloads/+21500 installs – that’s crazy! It’s one of my biggest projects I ever did for the community :-).

Stop bragging, get to the point…

Well – because of the fact that so many people are using the extension, I think I have to make you aware of an important change (fix) I did to the extension (already almost 3 weeks ago…).

I have had a couple of requests to change the “rename” behaviour, which I had to implement, because they were causing small inconveniences. These were the requests:

Long story short: because I simply put double quotes for fields on pages, I introduced some bugs. It didn’t work for procedure calls – and it might have ended up with crashing reports.

A combination of commits (from both me and Kenneth (thanks Kenneth!)) will now make sure that the double quotes will only be there if needs to be. Much better of course, and it solves the bugs.

But that’s just like any other bugfix … so now comes the real reason of this post …

However, since you all will get this new version of this VSCode extension by default, you might have noticed that your names in your existing pages might automatically get more edits that you might have expected: when you rename the file (and for many people, that automatically happens when you save the file), it will “correct” all these fields. So you will have edits that removed quotes.

You might have had this:

And suddenly now you have this:

That might be inconvenient – I have had the feedback from a few people.

Well, it IS inconvenient – the issue is: you are making many more changes than you actually intend to. All these changes go into source control: so a changeset might give you non-important renames of controls .. which can be confusing.

How do you handle it?

Well, my recommendation would be.

  • rename all
  • commit with comment “Remove unnecessary double quotes for fieldnames”

In that case, you have one isolated commit with all the rename-changes, and you won’t have any upcoming weird changes in any upcoming commit.

Hope this helps! Enjoy the extension going forward!

5.00 avg. rating (97% score) - 1 vote

Permanent link to this article:


1 ping

    • Jeremy Gillard on December 7, 2022 at 4:34 pm
    • Reply

    Hi Waldo:

    This is causing me an issue. If you have a table where the field name starts with a number, the field name has to have double quotes around it otherwise the compiler goes crazy and throws weird errors that are not true. Having double quotes around the field name fixes this problem. Now I can’t save the file the field having double quotes around it when I have the waldo extension enabled. Would it be possible to keep the double quotes if the fieldname starts with a number?

      • waldo on December 8, 2022 at 9:02 am

      Field names starting with a number? Can you give me an example? Doesn’t really sound like a very good practice 🤔.

      I’ll look into it, but it’s a very complex regex that I don’t like to mess with .. .

      Can you start by creating an issue here:

      And give me an example?

  1. […] Source : Waldo’s Blog Read more… […]

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.