Cci-language-server incorrectly says that executor does not exist, when using shorthand syntax

Hello! When defining and using executors in my config, the language server seems to get angry if I use curly braces to shorten my config a little.

Example of code that it doesn’t like:

executors:
  node:
    docker:
      - image: cimg/node:lts

jobs:
  start:
    executor: { name: node }

Example of code it likes:

executors:
  node:
    docker:
      - image: cimg/node:lts

jobs:
  start:
    executor:
      name: node

I can not provide an answer regarding how CircleCI is using/parsing yaml but the normal shorthand in a config.yml file would be the following

Using the JSON Style to write key-value pairs so that they look more like the single line parameter passing found in many programming languages is possible elsewhere in the config.yml as I have used it as a space-saving feature when calling commands that accept parameters.

1 Like

As a follow up I just modified one of my CI scripts to use your format and it ran correctly.

Can you post more of your config.yml file and the exact error you are receiving?

(One key difference between our environments maybe the fact that I run self-hosted runners)

1 Like

Hi @tprobinson and @rit1010 ,

Sorry for the very late reply!
This is definitely a bug on our side - a fix will be out in a few days tops! I’ll post on here when that happens so you can check that it fixes things for you!

Benny

1 Like

Thanks for the feedback directly to the thread, considering that the issue has been noticed, checked and escalated into a coding task within 24 days I do not think you have anything to be sorry about. I’m tracking an issue at another vendor that has had a lot of feedback from the vendor, but no development task raised and that has been going on for over 5,840 days :slight_smile:

2 Likes