codefori / vscode-rpgle

RPGLE language tools for VS Code
MIT License
39 stars 18 forks source link

Source Orbit: Failed to parse file with TypeError: Cannot read properties of undefined (reading 'library') #287

Closed AG1965 closed 7 months ago

AG1965 commented 7 months ago

called "so" in a directory with several subdirectories with our sources inside when this happended:

qclpsrc/#chkv3b.pgm.clle - Failed to parse file.
qclpsrc/#chkv3b.pgm.clle
TypeError: Cannot read properties of undefined (reading 'library')
    at /QOpenSys/pkgs/lib/nodejs20/lib/node_modules/@ibm/sourceorbit/dist/index.js:3:87890
    at Array.forEach (<anonymous>)
    at t.Targets.createClTarget (/QOpenSys/pkgs/lib/nodejs20/lib/node_modules/@ibm/sourceorbit/dist/index.js:3:87857)
    at t.Targets.parseFile (/QOpenSys/pkgs/lib/nodejs20/lib/node_modules/@ibm/sourceorbit/dist/index.js:3:83515)
    at async /QOpenSys/pkgs/lib/nodejs20/lib/node_modules/@ibm/sourceorbit/dist/index.js:3:76285
[ERROR] Report this issue to us with an example: github.com/halcyon-tech/vscode-rpgle/issues

copied the problematic file #chkv3b.pgm.clle to a new empty directory and called "so" in there, the error is repeatable. (The source can be successfully compiled with CRTBNDCL.) This is the file, added ending .txt to please github file upload. #chkv3b.pgm.clle.txt

worksofliam commented 7 months ago

Thanks for your issue! I will look into this on Tuesday. Appreciate it!

worksofliam commented 7 months ago

Two things I have found:

           DCLF            L012
  1. CL parser needs to support this style of DCLF (no keyword)
  2. Source Orbit was crashing because the DCLF definition was found but didn't have the file attached to it.
  3. I need to fix the issue where it was telling you to report the issue here! It should be under github.com/IBM/sourceorbit.

Working on the fix now.

worksofliam commented 7 months ago

Hey @AG1965 !!

This is fixed in SO 0.6.1 now: https://github.com/IBM/sourceorbit/releases/tag/0.6.1

Please raise more issues over on that repo :)

Thanks!!