Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML Syntax highlignting doesnt include multiline scalars anymore #99025

Closed
MaxRink opened this issue Jun 2, 2020 · 5 comments
Closed

YAML Syntax highlignting doesnt include multiline scalars anymore #99025

MaxRink opened this issue Jun 2, 2020 · 5 comments
Assignees
Labels
*as-designed Described behavior is as designed info-needed Issue requires more information from poster

Comments

@MaxRink
Copy link

MaxRink commented Jun 2, 2020

  • VSCode Version: 1.45.1
  • OS Version: Win10x86

Steps to Reproduce:
In previous versions vscode linted yaml in multiline scalars, now it doesnt anymore:
This happens without ANY plugins installed.

1.45.1
image

1.39.1
image

It also happens with the insider build (e.g. 1.46)

Does this issue occur when all extensions are disabled?: Yes

@aeschli aeschli assigned alexr00 and unassigned aeschli Jun 2, 2020
@alexr00
Copy link
Member

alexr00 commented Jun 5, 2020

Can you please provide a copy/paste-able example?

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Jun 5, 2020
@MaxRink
Copy link
Author

MaxRink commented Jun 5, 2020

sure

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-ingress-controller-customer-configmap
  namespace: ingress-system
data:
  values.yaml: |
    service:
      annotations:
        metallb.universe.tf/allow-shared-ip: "10.27.50.35/32"
      loadBalancerIP: "10.27.50.35"

@alexr00
Copy link
Member

alexr00 commented Jun 8, 2020

I can see the repro. This is very odd though, since the yaml grammar hasn't changed since 2017. It looks like this started with version 1.41.
Starting with 1.41, the scope for service in your example is string.unquoted.block.yaml.
In 1.40, the scope of service was entity.name.tag.yaml, string.unquoted.plain.out.yaml.

It looks like whatever grammar that GitHub is using does the same thing.

@alexdima, before I spend more time looking into this, do you know of any changes vscode textmate that started with 1.41 that could have changed this?

@alexdima
Copy link
Member

alexdima commented Jun 8, 2020

Yes, here is what steps I used to track them down.

If using tags to publish to npm (which vscode-textmate does), it is possible to use github to find out the changes: microsoft/vscode-textmate@v4.2.2...v4.4.0

From looking at those changes, this change mentions yaml explicitly -- microsoft/vscode-textmate#119

I can use the inspect tool to investigate.

@alexdima
Copy link
Member

alexdima commented Jun 8, 2020

This appears to be correct. This is a direct consequence of the fix for microsoft/vscode-textmate#119 .

It is expected that the fix for microsoft/vscode-textmate#119 changes this between VS Code versions. The new behaviour is aligned with how TextMate parses using this same grammar:

image

So TL;DR the old version of vscode appears to look better, but it was wrong.

@alexdima alexdima closed this as completed Jun 8, 2020
@alexdima alexdima added the *as-designed Described behavior is as designed label Jun 8, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants