ironsheep / P2-vscode-langserv-extension

Spin/Spin2 Language Server based vscode extension
MIT License
1 stars 0 forks source link

#include does not correctly find files when extension is not .spin2 #11

Closed Wuerfel21 closed 3 months ago

Wuerfel21 commented 4 months ago

and have you...

Version of Spin2 Language Server VScode Extension with the issue

eggplant

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Hardware, Operating System, Operating System version, VSCode version

Hardware: Atari Jaguar OS Ver: rawr grrr VSCode Ver: poteto

Description of problem

When using an include file whose filename doesn't have a .spin2 extension, the file is not found and the definitions are not imported.

The log prints something like this

TRC: -- STEP preload any includes not already loaded...
TRC: -- STEP incorporate included docs into maps ...
TRC: [ID:1714949830401-miko68k.spin2] nameHashKeys=[], nameHashValues=[], includedFiles=[p2defs.inc]
TRC: DP.process() hook-in includes for [ID:1714949830401-miko68k.spin2]  objectNames=[]  objectFileNames=[]
TRC: [ID:1714949830401-miko68k.spin2] clear() previous findings but NOT include info so can load included documents
TRC: MATCHING includeFilename=[p2defs.inc], matchFilename=[p2defs.inc.]
TRC: NO include filename matches found!
TRC: DP._parseDocument() clear() previous findings - leaving include info [ID:1714949830401-miko68k.spin2]
TRC: DP._parseDocument() Actual-Parse Spin2 Document: miko68k.spin2

This discovery comes courtesy of the finding that there's a common subset of syntax between Spin2 CON sections and 68000 assembly (lines like NAME = $1234 are valid in both)

Additional information

No response

ironsheep commented 4 months ago

Huh... I'll see what this is... and address it.

ironsheep commented 3 months ago

Changes committed will appear in v2.2.17 and later.