Closed ChristopherHX closed 2 months ago
Hi @ChristopherHX, thank you for the feedback, we'll try to improve error handling and fix the problem once we'll have enough time!
@ChristopherHX would that be valid YAML? Put another way, if the language server didn't crash, what would you have written?
(The language server shouldn't crash regardless so this is definitely a bug, just trying to understand what the intended outcome would have been.)
Hi, yes that sample is valid YAML, but not yet a valid pipeline.
I'm normally not writing this kind of syntax like most other people, if the extension would just have been silent about this part of the file this issue wouldn't exist.
Looks like a regression of changes to the language server to tollerate expressions for me.
This is how it would look if it becomes a valid pipeline
variables:
- template: ./v1.yaml
stages:
- stage:
variables:
- template: ./v1.yaml
parameters:
test: me
jobs:
- job:
variables:
- template: ./v1.yaml
parameters:
test: me
# Everything before typing the following line works without crash
- { name: myvar, value: yes this is yaml }
Pipeline Preview from my test repo after ADO validated the pipeline and has processed it
variables:
- name: vara
value: varb
stages:
- stage: ''
variables:
- name: vara
value: varb
jobs:
- job: ''
variables:
- name: vara
value: varb
- name: myvar
value: yes this is yaml
I'm researching in a free time project how to implement autocomplete from scratch for azure pipelines incl. expressions and came across this crash while looking how it works here. Take the time you need.
Note: the valid pipeline doesn't crash this plugin, you just can't type it without killing it.
Version: 1.237.0-pr-574-c4a655e the unreleased update downloaded here https://github.com/microsoft/azure-pipelines-vscode/pull/574 under GitHub Actions
YAML
Crash
I wanted to see how intellisense works in that case inside this extension and noticed that the language server has gone away