monaco-yaml icon indicating copy to clipboard operation
monaco-yaml copied to clipboard

Autocompletion from schema crash with large file?

Open anisite opened this issue 2 years ago • 9 comments

Hi, before v3 everything was working great, now I got a Range error :

image

This happens on an autocompletion (ex: pressing CTRL+ SPACE after "type:" element to get values)

Cause drop menu to show wrong values : image

Working example with v 2.5.0 image

example large file with schema : https://raw.githubusercontent.com/TrucsPES/TestsVue/main/FRW.PR.EXTRA/schemas/3003.ecsform.yml

**Note, if I delete arround half content, everything work great... ? I can't find why :(

thanks for your time! Great project! YAML is the future 👍

anisite avatar Oct 02 '21 01:10 anisite

Thanks for reporting this! This is definitely a bug.

I looked into it a bit, but I’m clueless where this is coming from. I’d appreciate any help with this. Please let me know if you want to look into this and need any information.

remcohaszing avatar Oct 04 '21 15:10 remcohaszing

Thanks for reporting this! This is definitely a bug.

I looked into it a bit, but I’m clueless where this is coming from. I’d appreciate any help with this. Please let me know if you want to look into this and need any information.

It is not reproducible! Maybe it is only on a specific yaml? Or maybe a specific json schema. And by looking at our code it is not possible to have -1 on range 🤔 maybe it is a yaml language server issue.

yazaabed avatar Oct 05 '21 18:10 yazaabed

@yazaabed everything is good if I cut half the file, you can try to paste my yaml and schema reference in a new instance of monaco yaml, everything work great with yaml language server in VS code and everything work great in old version of monaco-yaml

anisite avatar Oct 05 '21 23:10 anisite

I am able to reproduce this using the following steps:

  1. Visit https://monaco-yaml.js.org and open the browser console
  2. Replace all content with the content found in https://raw.githubusercontent.com/TrucsPES/TestsVue/main/FRW.PR.EXTRA/schemas/3003.ecsform.yml
  3. On line 2886, press Ctrl+Space

I am not able to reproduce this in VS Code.

remcohaszing avatar Oct 06 '21 07:10 remcohaszing

@anisite The link you provided for the huge YAML file no longer works. Could you update it? Alternatively you could add it as an attachment.

remcohaszing avatar Oct 17 '21 10:10 remcohaszing

@remcohaszing Hi, sorry, my mistake 3003.ecsform.yml.txt ecsform.json.txt

anisite avatar Oct 18 '21 12:10 anisite

Hi @remcohaszing, I'm facing the same problem and reproduce it on your demo stand

monaco-yaml-bug

Is there any solution or WA? P.S. Or maybe we can at least mute the console error...

aerialist7 avatar Jul 22 '22 07:07 aerialist7

@remcohaszing, could you please help?

aerialist7 avatar Jul 27 '22 14:07 aerialist7

No, I don’t know how to fix this. I’m open to a pull request.

Also the error shown in the console is an actual error and shouldn’t be suppressed.

remcohaszing avatar Jul 28 '22 08:07 remcohaszing

This appears to have been fixed somehow. I am no longer able to reproduce it.

remcohaszing avatar Aug 25 '23 13:08 remcohaszing