buildPaths error building ... - Since 2 days ( update ?)
For troubleshooting assistance, refer to the troubleshooting guide
Description
When opening any ahk v1 file , output shows a lot of buildPaths errors
2025-04-03T09:25:18.658Z buildPaths error building c:\portable_apps\my_scripts\autohotkey\RM2module\c:\portable_apps\my_scripts\autohotkey\RM2module\RM2module.ahk 2025-04-03T09:25:18.659Z cannot open file:///c%3A/portable_apps/my_scripts/autohotkey/RM2module/c%3A/portable_apps/my_scripts/autohotkey/RM2module/RM2module.ahk%09%09%3B%20by%20Learning%20one. Detail: Unable to read file 'c:\portable_apps\my_scripts\autohotkey\RM2module\c:\portable_apps\my_scripts\autohotkey\RM2module\RM2module.ahk ; by Learning one' (Error: Unable to resolve nonexistent file 'c:\portable_apps\my_scripts\autohotkey\RM2module\c:\portable_apps\my_scripts\autohotkey\RM2module\RM2module.ahk ; by Learning one')
2025-04-03T09:30:29.817Z buildPaths error building C:\portable_apps\my_scripts\autohotkey\RM2module\Ahk_Script\Quick_Scripts\Lib\Faster_Script_-Optimize_Speed_To_MAX.ahk 2025-04-03T09:30:29.817Z cannot open file:///c%3A/portable_apps/my_scripts/autohotkey/RM2module/Ahk_Script/Quick_Scripts/Lib/Faster_Script-Optimize_Speed_To_MAX.ahk. Detail: Unable to read file 'c:\portable_apps\my_scripts\autohotkey\RM2module\Ahk_Script\Quick_Scripts\Lib\Faster_Script-Optimize_Speed_To_MAX.ahk' (Error: Unable to resolve nonexistent file 'c:\portable_apps\my_scripts\autohotkey\RM2module\Ahk_Script\Quick_Scripts\Lib\Faster_Script-_Optimize_Speed_To_MAX.ahk')
this included file is is located here #Include, %A_AhkPath%..\Lib\Faster_Script_-_Optimize_Speed_To_MAX.ahk
but it looks for in c:\portable_apps\my_scripts\autohotkey\RM2module\Ahk_Script\
and it looks a lot of file in that folder, although It's not special
Reproduction steps
Steps to reproduce the behavior:
- Open any Ahk file in vscode
- wait a little bit, and a wall of errors appears in output
- while the output errors are pouring, Can't write anything
Expected behavior
Nothing in the ouput
Additional context
it happened like yesterday, and it seems like the update broke it I checked the interpreter in on v1 (as shown in status bar) and tried defining it manually ctlk+k m I tried a full uninstall - reinstall
Have run into the same errors from within a library relying on relative includes resembling the following:
#Include %A_ScriptDir%\..\SiblingDir\CommonFile.ahk
results in the following type of message:
2025-04-03T21:55:14.922Z buildPaths error building <drive>:\<ParentDir>\<ScriptDir>\<drive>:\<ParentDir>\<SiblingDir>\<CommonFile>.ahk
2025-04-03T21:55:14.923Z cannot open file:///<drive>%3A/<ParentDir>/<ScriptDir>/<drive>%3A/<ParentDir>/<SiblingDir>/<CommonFile>.ahk. Detail: Unable to read file '<drive>:\<ParentDir>\<ScriptDir>\<drive>:\<ParentDir>\<SiblingDir>\<CommonFile>.ahk' (Error: Unable to resolve nonexistent file '<drive>:\<ParentDir>\<ScriptDir>\<drive>:\<ParentDir>\<SiblingDir>\<CommonFile>.ahk')
Dis/Re-Enabling confirms with Output; significant load difference noted.
Version rollback removed most of the errors, but several remained; these used a similar relative scheme, but with A_LineFile instead of A_ScriptDir.
Seems related to handling of relative paths in certain contexts.
Encountering the same issue while opening the ahk v1 file, rollback the extension to 6.7.0 to resolve it.
@feeas 6.7.0 is the latest.
I'll move this log to debug for the next release as I look into it, it's related to #623 for anyone curious. Looks like the filename resolution isn't good enough to justify a warning log yet, sorry for the noise. You can safely ignore this log in the meantime.
See also #646 and #649