boltex / leojs

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

Problem with the '.ini' importer #94

Closed boltex closed 9 months ago

boltex commented 9 months ago

From @tbpassin :

All right, it installed in vsc and it did open an outline. I saw a lot of errors like this:

reading settings in C:/Users/tom/.leo/workbook.leo TypeError: Cannot read properties of undefined (reading 'trim') at Ini_Importer.find_blocks (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1507413) at Ini_Importer.gen_block (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1508153) at Ini_Importer.gen_lines (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1511889) at Ini_Importer.import_from_string (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1512400) at exports.do_import (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1522910) at LeoImportCommands.createOutline (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1338218) at async AtFile.readOneAtAutoNode (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:955878) at async AtFile.readFileAtPosition (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:954544) at async AtFile.readAll (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:953359) at async FileCommands.readExternalFiles (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1151896) at async FileCommands._getLeoFileByName (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1151493) at async FileCommands.getAnyLeoFileByName (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1149953) at async LoadManager.openFileByName (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:937514) at async LoadManager.loadLocalFile (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:936309) at async SessionManager.load_session (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1439599) at async LoadManager.doPostPluginsInit (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:932259) at async LoadManager.load (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:931126) at async runLeo (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1807739) at async activate (c:\Users\tom.vscode\extensions\boltex.leojs-0.2.0\dist\extension-node.js:2:1815070) 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)

boltex commented 9 months ago

@tbpassin Can you provide me with the .ini file that your leo file is trying to refresh at startup?

boltex commented 9 months ago

I think this is related to Leo's issue: https://github.com/leo-editor/leo-editor/issues/3727 😄

boltex commented 9 months ago

@tbpassin Oh i had a mistranlation in the ini importer's regex. Will be fixed in next release tomorrow.

tbpassin commented 9 months ago

Here are the two external .ini files I have in the workbook. The errors must have come during processing them.

inifiles.zip

boltex commented 9 months ago

@tbpassin I would have needed the ini files themselves zipped, not the leo file alone that you zipped, for which the inner @auto and @clean nodes have nothing to pikup upon... and therefore endup almost empty 😢

tbpassin commented 9 months ago

Oops, sorry. I forgot that. Coming right up.

inifiles.zip

boltex commented 9 months ago

@tbpassin That did the trick! 👍 Today's new release has gotten rid of those errors!

Thanks for testing out and reporting what you find! Really very much appreciated!!

With your help, we'll get rid of the remaining bugs and get to a full LeoJS 1.0 release much more quickly! Thanks again Thomas!!

tbpassin commented 9 months ago

: )

tbpassin commented 9 months ago

I didn't get any error messages on opening leoJS with the new release.

LeoJS 0.2.7, master branch, build 1ae8764
2023-12-23 20:17:31 -0500
Node.js v18.15.0, VSCode version 1.85.1