fuhrmanator / FamixTypeScriptImporter

MIT License
2 stars 1 forks source link

Many "Unknown property" messages appear in Pharo Transcript when loading TypeScript model #54

Closed fuhrmanator closed 3 months ago

fuhrmanator commented 7 months ago

image

NicolasAnquetil commented 7 months ago

can you provide a small model to test ?

fuhrmanator commented 7 months ago

This is Moose 10, using the MM at https://github.com/fuhrmanator/FamixTypeScript?tab=readme-ov-file#loading-from-a-playground

simplemodel.typescript.json Transcript.txt

The source file is this TypeScript file (test_src/basicExport.ts)

        export const variable1 = "Hello, World!";
fuhrmanator commented 7 months ago

This issue maybe needs to be in the FamixTypeScript repo (if it's a MM problem rather than importer problem). I can transfer it there, if needed.

NicolasAnquetil commented 7 months ago

Some points from an initial analysis:

I loaded the FamixTypeScript project using the Metacello script in the Readme of this project...

NicolasAnquetil commented 7 months ago

Note: main problem was actually with #start_line

Analysis: It is also derived (no setter, only a getter). It is computed from the #startPos and the length of the lines in the source file. To use #startLine: one should use the trait FamixTFileNavigation instead of FamixTIndexedFileNavigation. The former wants startLine/startColumn/endLine/endColumn

If one wants #startLine from FamixTIndexedFileNavigation, it is derived (computed), providing one has access to the #completeText of the file, itself subject to having a correct #rootFolder.

NicolasAnquetil commented 7 months ago

If you agree with all this, you can close the issue. Tx for helping

fuhrmanator commented 7 months ago

Thanks for your help! I agree with these but will leave it open until we make the changes to the MM and importer.

fuhrmanator commented 3 months ago

Many, not all, are fixed in #63. Remaining ones are problems with concretizations/genericity.