boltex / leojs

Leo Literate Editor with Outline in Typescript
https://boltex.github.io/leojs/
MIT License
28 stars 1 forks source link

Errors While Reading Settings In leoSettins.leo #82

Closed tbpassin closed 9 months ago

tbpassin commented 9 months ago

During startup, when leoSettings.leo is read, there is an exception: TypeError: d.get is not a function.

This does not seem to prevent viewing and editing an outline.

reading settings in leoSettings.leo
reading settings in C:/Users/tom/.leo/myLeoSettings.leo
read outline in 0.19 seconds
TypeError: d.get is not a function
    at SettingsTreeParser.parseOpenWithLine (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:1107288)
    at SettingsTreeParser.parseOpenWith (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:1106787)
    at SettingsTreeParser.doOpenWith (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:1103369)
    at SettingsTreeParser.visitNode (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:1122680)
    at SettingsTreeParser.traverse (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:1109316)
    at async LoadManager.createSettingsDicts (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:927028)
    at async LoadManager.computeLocalSettings (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:926211)
    at async LoadManager.readGlobalSettingsFiles (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:930584)
    at async LoadManager.doPrePluginsInit (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:933058)
    at async LoadManager.load (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:930893)
    at async runLeo (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:1809091)
    at async activate (c:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5\dist\extension-node.js:2:1816422)
    at async u.n (c:\Users\tom\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:6255)
    at async u.m (c:\Users\tom\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:6218)
    at async u.l (c:\Users\tom\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:5675)
es_exception called without error!
LeoJS 0.2.5, master branch, build 2f8dca6
2023-12-16 23:36:29 -0500
Node.js v18.15.0, VSCode version 1.85.0
Windows 10 Home x64 (build 10.0.19045)
      home: C:\Users\tom
leo-editor: C:\Users\tom\.vscode\extensions\boltex.leojs-0.2.5
boltex commented 9 months ago

@tbpassin Thank you for this!

If I read what you reported carefully, It looks from the error you pasted above that it is when reading myLeoSettings.leo, instead of leoSettings.leo. Could that be the case?

Anyways, I think I found the bug and will soon release 0.2.7 for you to try :)

Many Thanks! :)

boltex commented 9 months ago

Ugh! Classic mistranslation from python to typescript of the .get accessor.

I'll scan throughout the LeoJS code base for other similar 'd.get' I might have missed. Thanks again @tbpassin for spotting this bug!

(I thought I had spotted and properly converted those .get accessor usage, but it looks like I might have missed one or two! haha!! 😆 )

tbpassin commented 9 months ago

If I read what you reported carefully, It looks from the error you pasted above that it is when reading myLeoSettings.leo, instead of leoSettings.leo. Could that be the case?

Yes, it is. Sorry to have been sloppy about reporting it. It seems to me that I've seen quite a few d.get errors and didn't take note where they came up.