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

More helpful error messages on validation issue #94

Open
2 tasks
bripkens opened this issue Oct 4, 2023 · 6 comments
Open
2 tasks

More helpful error messages on validation issue #94

bripkens opened this issue Oct 4, 2023 · 6 comments

Comments

@bripkens
Copy link
Member

bripkens commented Oct 4, 2023

  • Missing indicators lines
  • Missing line/col info in the errors panel

image

@bripkens bripkens added this to the iteration-1 milestone Oct 4, 2023
@mmanciop
Copy link
Member

mmanciop commented Oct 9, 2023

Also, we need to contextualise the schema validation warnings:

# Learn more about the OpenTelemetry Collector via
# https://opentelemetry.io/docs/collector/

receivers:
  otlp:
    protocols:
      grpc:
      http:

processors:
  batch:
    ciao: # This should read "The configuration property 'ciao' is not allowed for the 'batch' processor"
  ciao: # This should read "The processor type 'ciao' is unknown"

ciao: # This should read "The 'ciao' top-element configuration is invalid"

exporters:
  otlp:
    endpoint: otelcol:4317

extensions:
  health_check:
  pprof:
  zpages:

service:
  extensions: [health_check, pprof, zpages]
  ciao:
  pipelines:
    ciao: # This should read "The type 'ciao' is not a known type of pipeline"
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]

@roshan-gh
Copy link
Contributor

@mmanciop @bripkens As I communicated with monaco-yaml dev about contextualize the schema validation warnings, for now it's impossible to change the warnings, they are only can accessible as read-only data.

The data is generating from vscode-json-languageservice / yaml-language-server. (just as example: https://github.com/microsoft/vscode-json-languageservice/blob/main/src/services/jsonValidation.ts#L101))

In addition, yaml-language-server still uses vscode-nls, but vscode-json-languageservice has moved on to the new @ vscode/l10n. Updates in yaml-language-server may be needed.

Finally, I assume we can only improve the parts like @bripkens mentioned in the description of the issue

@mmanciop
Copy link
Member

@roshan-gh, are you saying that we cannot modify validation errors before they get to the editor?

@roshan-gh
Copy link
Contributor

@mmanciop yes exactly

@bripkens
Copy link
Member Author

Would it be possible to wrap the worker in some custom code and in there to update the texts @roshan-gh?

case "editorWorkerService":
return new Worker(new URL("monaco-editor/esm/vs/editor/editor.worker", import.meta.url));
case "yaml":
return new Worker(new URL("monaco-yaml/yaml.worker", import.meta.url));

@roshan-gh
Copy link
Contributor

I will look into it and check it @bripkens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants