monaco-yaml
monaco-yaml copied to clipboard
Autocompletion from schema crash with large file?
Hi, before v3 everything was working great, now I got a Range error :
This happens on an autocompletion (ex: pressing CTRL+ SPACE after "type:" element to get values)
Cause drop menu to show wrong values :
Working example with v 2.5.0
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 👍
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.
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 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
I am able to reproduce this using the following steps:
- Visit https://monaco-yaml.js.org and open the browser console
- Replace all content with the content found in https://raw.githubusercontent.com/TrucsPES/TestsVue/main/FRW.PR.EXTRA/schemas/3003.ecsform.yml
- On line 2886, press Ctrl+Space
I am not able to reproduce this in VS Code.
@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 Hi, sorry, my mistake 3003.ecsform.yml.txt ecsform.json.txt
Hi @remcohaszing, I'm facing the same problem and reproduce it on your demo stand
Is there any solution or WA? P.S. Or maybe we can at least mute the console error...
@remcohaszing, could you please help?
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.
This appears to have been fixed somehow. I am no longer able to reproduce it.