Stillat / vscode-antlers-language-server

Provides rich language features for Statamic's Antlers templating language, including code completions, syntax highlighting, and more.
https://antlers.dev
MIT License
36 stars 3 forks source link

TypeError: Cannot read properties of undefined (reading 'copy') #69

Closed stephenmeehanuk closed 1 year ago

stephenmeehanuk commented 1 year ago

Describe the bug Not sure if it's a bug, but Antlers Toolbox crashes quite often?

Impacted Products Which Antlers Toolbox products does this bug apply to?

Versions and Other Plugins/Extensions Antlers Toolbox Version: 2.5.3

Tailwind CSS IntelliSense Version: 0.9.11

Prettier - Code formatter Version: 9.12.0

Material Theme Icons Version: 2.7.5

Material Theme Version: 33.8.0

language-postcss Version: 1.1.0

htmltagwrap Version: 0.0.9

Community Material Theme Version: 1.4.6

Name: colorize Version: 0.11.1

To Reproduce 30 second video shows the issue

https://user-images.githubusercontent.com/72254741/234531449-a130e7b6-4766-4d93-b579-058a22051a87.mp4

If submitting a formatting bug, please include the template contents below as well as an attachment Error triggers on a almost empty file. I created a new file and added some text, triggers the error?

TypeError: Cannot read properties of undefined (reading 'copy')
    at ScopeEngine.analyzeScope (/Users/stephenmeehan/.vscode/extensions/stillat-llc.vscode-antlers-2.5.3/server/out/antlers/scope/engine.js:244:72)
    at AntlersDocument.updateProjectDetails (/Users/stephenmeehan/.vscode/extensions/stillat-llc.vscode-antlers-2.5.3/server/out/runtime/document/antlersDocument.js:119:29)
    at AntlersDocument.updateProject (/Users/stephenmeehan/.vscode/extensions/stillat-llc.vscode-antlers-2.5.3/server/out/runtime/document/antlersDocument.js:104:14)
    at /Users/stephenmeehan/.vscode/extensions/stillat-llc.vscode-antlers-2.5.3/server/out/runtime/document/documentManager.js:21:26
    at Map.forEach (<anonymous>)
    at DocumentManager.setProject (/Users/stephenmeehan/.vscode/extensions/stillat-llc.vscode-antlers-2.5.3/server/out/runtime/document/documentManager.js:19:30)
    at collectProjectDetails (/Users/stephenmeehan/.vscode/extensions/stillat-llc.vscode-antlers-2.5.3/server/out/server.js:321:38)
    at contentChangeHandler (/Users/stephenmeehan/.vscode/extensions/stillat-llc.vscode-antlers-2.5.3/server/out/server.js:229:5)
    at CallbackList.invoke (/Users/stephenmeehan/.vscode/extensions/stillat-llc.vscode-antlers-2.5.3/server/node_modules/vscode-jsonrpc/lib/common/events.js:55:39)
    at Emitter.fire (/Users/stephenmeehan/.vscode/extensions/stillat-llc.vscode-antlers-2.5.3/server/node_modules/vscode-jsonrpc/lib/common/events.js:117:36)
JohnathonKoster commented 1 year ago

Thanks for the report! I'll take a look and get it resolved as soon as I can 🙂

JohnathonKoster commented 1 year ago

Should be good to go for this specific failure as of 2.5.4

stephenmeehanuk commented 1 year ago

Great stuff, thanks for taking a look.