ahkpp icon indicating copy to clipboard operation
ahkpp copied to clipboard

The "Set AHK v2 Interpreter" command does not work

Open mark-wiemer opened this issue 1 year ago • 7 comments

Description

When running "Set AHK v2 Interpreter" from either the status bar or the command palette, the quick pick appears and the confirmed choice is reflected in the status bar. However, my settings are not saved to settings.json and trying to run an AHK v2 script with a bad path still fails with the "... does not exist" error message.

Additional context

I'm not sure if this ever worked, but I'm a bit sick right now so I can't debug before today's release. Just noting it for reference, should be fixed by end of year.

mark-wiemer avatar Nov 09 '24 20:11 mark-wiemer

Don't want to create duplicate issues, but with respect to the Interpreter:

I have both v1 and v2 interpreters' paths set correctly, and the extension correctly parses scripts identifying the version for any given active script; however, with version 1 scripts, the interpreter does not appear to change to version 2, see below: image Similarly, while intellisense and script errors are identified for version 2 scripts, it does not appear to work at all for version 1. For context:

image

This same version 1 script was the active file in the editor when both the above screenshots were taken.

pa-0 avatar Nov 10 '24 03:11 pa-0

with version 1 scripts, the interpreter does not appear to change to version 2

The file association does not automatically change in VS Code, unfortunately, you need to manually set it by clicking "AutoHotkey v1" in the status bar on the right. Alternatively, using #Requires directives will help.

See more details at https://github.com/mark-wiemer-org/ahkpp/discussions/445 :)

script errors are identified for version 2 scripts, it does not appear to work at all for version 1

Yes, this is a missing feature in v1 support. You're welcome to open a feature request, but I'm focusing on bugfixes for now, so don't expect any new features soon. If you do want errors identified, please specify which errors are most important to you, and I'll add those one at a time.

If I'm wrong, and errors were found earlier but aren't found any more, you're welcome to rollback to a specific version of AHK++ where things work, see https://github.com/mark-wiemer-org/ahkpp/blob/main/docs/Troubleshooting.md for details :)

mark-wiemer avatar Nov 10 '24 04:11 mark-wiemer

It actually is recognizing v1 scripts automaticallly.. See the status bar on the right in first image - it correctly switches to v1 after parsing the script. it's just the interpreter that doesn't change.

Thanks, I'll play around with previous versions and see what happens!

pa-0 avatar Nov 10 '24 11:11 pa-0

The interpreter status bar item at the bottom left is unique to v2, it has no effect when a v1 script is open. I'll see about showing it only when a v2 script is open.

In short, I think the extension is working for you :)

mark-wiemer avatar Nov 10 '24 15:11 mark-wiemer

Fixed in 6.5.0 :)

mark-wiemer avatar Feb 25 '25 12:02 mark-wiemer

Unable to repro with version 6.4.3 and 6.4.1, leaving this as "completed" but this may have been a false positive in the first place. Regardless, it's working on workspaces with and without workspace settings in all scenarios I've tried :)

mark-wiemer avatar Feb 25 '25 13:02 mark-wiemer

This error is still happening over here. Using 6.5.0. Just fixed by manually entering the path into the settings.json

Rosaldivo avatar Mar 04 '25 22:03 Rosaldivo