diff --git a/.github/ISSUE_TEMPLATE/bug-report--non-formatter-.md b/.github/ISSUE_TEMPLATE/bug-report--non-formatter-.md index fab15693..6286dac0 100644 --- a/.github/ISSUE_TEMPLATE/bug-report--non-formatter-.md +++ b/.github/ISSUE_TEMPLATE/bug-report--non-formatter-.md @@ -8,7 +8,7 @@ labels: bug assignees: mark-wiemer --- -For troubleshooting assistance, refer to the [troubleshooting guide](../../docs/Troubleshooting.md) +For troubleshooting assistance, refer to the [troubleshooting guide](https://github.com/mark-wiemer-org/docs/Troubleshooting.md) ## Description diff --git a/ahk2 b/ahk2 index 560aade8..bf91d871 160000 --- a/ahk2 +++ b/ahk2 @@ -1 +1 @@ -Subproject commit 560aade8550e7dd17d6f78b3ac8360b4facf6ff1 +Subproject commit bf91d8719e827909ecfa02370fcf83bea1140b82 diff --git a/changelog.md b/changelog.md index 7a939c30..3a2d87d8 100644 --- a/changelog.md +++ b/changelog.md @@ -2,12 +2,20 @@ ## 6.4.1 - unreleased 🛠️ +### Known issues + +- If your AHK v2 interpreter is not recognized and you try to debug an AHK v2 script, an "AutoHotkey execute bin not found: ..." output log will appear and take focus in the AHK++ (v1) output channel (open issue [#570](https://github.com/mark-wiemer-org/ahkpp/issues/570)) +- The "Select AHK v2 interpreter" command does not work, instead please try to run (not debug) an AHK v2 script and use the quick pick from the "... does not exist" error message (open issue [#571](https://github.com/mark-wiemer-org/ahkpp/issues/571)) + +### Fixes + - Add [troubleshooting guide](docs/Troubleshooting.md) - Fix go to definition in AHK v1 files ([#559](https://github.com/mark-wiemer-org/ahkpp/issues/559)) - Remove unnecessary error message "Couldn't resolve AHK v2 interpreter" ([#493](https://github.com/mark-wiemer-org/ahkpp/issues/493)) - - This has been moved to a console log visible in the AHK++ (v2) output channel - - A similar error message will still appear when attempting to debug with an unrecognized interpreter path - - See the new [troubleshooting guide](docs/Troubleshooting.md) for details + - This has been moved to a output log visible in the AHK++ (v2) output channel + - A "... does not exist" error message will still appear when trying to run an AHK v2 script with an unrecognized interpreter path +- Fix quick pick for "... does not exist" error message on run AHK v2 script ([PR #569](https://github.com/mark-wiemer-org/ahkpp/issues/569)) + > Note: this fix copies your config into your workspace settings. If you don't like this, please manually enter the path via the settings, and don't use the quick pick. Learn more at [PR #569](https://github.com/mark-wiemer-org/ahkpp/issues/569). ## 6.4.0 - 2024-11-02 🗳️ diff --git a/demos/manualTests/bugfixes.ahk b/demos/manualTests/bugfixes.ahk index d045eecc..34d4d9f0 100644 --- a/demos/manualTests/bugfixes.ahk +++ b/demos/manualTests/bugfixes.ahk @@ -1,26 +1,26 @@ ;* Formatting should not change this file -; By default no action needed, older versions would show warnings or errors +;* By default no action needed, older versions would show warnings or errors #Requires AutoHotkey v2.0 -;* https://github.com/thqby/vscode-autohotkey2-lsp/issues/591 +; https://github.com/thqby/vscode-autohotkey2-lsp/issues/591 TraySetIcon(, , true) -;* https://github.com/thqby/vscode-autohotkey2-lsp/issues/594 +; https://github.com/thqby/vscode-autohotkey2-lsp/issues/594 class Test { __New() { 1 ? this.b := 1 : 0 } } -;* https://github.com/thqby/vscode-autohotkey2-lsp/issues/595 -; Should suggest `ptr` as second arg (Ctrl+Space) +; https://github.com/thqby/vscode-autohotkey2-lsp/issues/595 +;* Should suggest `ptr` as second arg (Ctrl+Space) DllCall.Bind("xx", "p") -;* https://github.com/thqby/vscode-autohotkey2-lsp/issues/596 +; https://github.com/thqby/vscode-autohotkey2-lsp/issues/596 Help:: return Sleep:: return -;* https://github.com/thqby/vscode-autohotkey2-lsp/issues/574 +; https://github.com/thqby/vscode-autohotkey2-lsp/issues/574 if 1 { f() { MsgBox("in") @@ -28,11 +28,11 @@ if 1 { MsgBox("out") } -;* https://github.com/thqby/vscode-autohotkey2-lsp/issues/571 -class class2 -{ +; https://github.com/thqby/vscode-autohotkey2-lsp/issues/571 +class class2 { __New() { this.g := Gui() - this.g.add() ; hover over add to see tooltip + ;* hover over `add` to see tooltip + this.g.add() } -} \ No newline at end of file +} diff --git a/demos/manualTests/config.ahk2 b/demos/manualTests/config.ahk2 index c609bc18..b72aa852 100644 --- a/demos/manualTests/config.ahk2 +++ b/demos/manualTests/config.ahk2 @@ -6,7 +6,7 @@ ; set AHK++.v2.general > librarySuggestions to All ; set exclude to "excluded.ahk" ; see whether MyExcludedFunc is suggested (Ctrl+Space) -MyEx +MyExclu ;** AHK++.general ;* showOutput @@ -25,6 +25,17 @@ y := 1 ; todo Class Non Dynamic Member Check is untested for now ; todo Params Check is untested for now +;** V2: File (AHK++.v2.file) +;* interpreterPath +; Setting to an invalid path and restarting the extension host should: +; - not show an error message on startup +; - add msg to output channel: Ctrl+Shift+U -> AHK++ (v2) -> "Couldn't resolve AHK v2 interpreter" +; - show "Select AHK v2 Interpreter" in status bar +; - show error message when trying to run a script +; - log error message in AHK++ (v1) when trying to debug a script +; - persist settings when user confirms quick pick via error message +; - successfully run a script when user confirms quick pick + ;** V2: Formatter tested in other files :) ;** V2: General (AHK++.v2.general) @@ -58,4 +69,4 @@ MyFunc() { ;* varUnset ; x := 1 -MsgBox(x) +MsgBox(x) \ No newline at end of file diff --git a/demos/manualTests/format/formatter.ahk1 b/demos/manualTests/format/formatter.ahk1 index 6f99e5b1..0ff5e161 100644 --- a/demos/manualTests/format/formatter.ahk1 +++ b/demos/manualTests/format/formatter.ahk1 @@ -10,4 +10,4 @@ ; How many were preserved? ;) -; todo other options not tested \ No newline at end of file +; todo other options not manually tested \ No newline at end of file diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md index 9200f9dd..13ce06be 100644 --- a/docs/Troubleshooting.md +++ b/docs/Troubleshooting.md @@ -6,7 +6,10 @@ If AHK++ isn't behaving as you expect, here are some things you can try. For AHK v2, the language server may not behave correctly if it fails to identify a valid path to an interpreter like `AutoHotkey.exe`. The status bar at the bottom left of your IDE should show the current interpreter or an option to "Select AHK v2 Interpreter". -Currently, AHK++ does not support the Windows Store edition of AHK v2, but there are plans to support it by the end of 2024, ref [#496](https://github.com/mark-wiemer-org/ahkpp/issues/496). +> Currently, the "Select AHK v2 Interpreter" command does not work, ref [#571](https://github.com/mark-wiemer-org/ahkpp/issues/571). +> To ensure the extension fully recognizes your interpreter, try to run (not debug) an AHK v2 script. If you get a "... does not exist" error message, the corresponding quick pick will work. + +> Currently, AHK++ does not support the Windows Store edition of AHK v2, but there are plans to support it by the end of 2024, ref [#496](https://github.com/mark-wiemer-org/ahkpp/issues/496). Interpreter found: diff --git a/src/debugger/debugDispatcher.ts b/src/debugger/debugDispatcher.ts index 36992497..1c3384f6 100644 --- a/src/debugger/debugDispatcher.ts +++ b/src/debugger/debugDispatcher.ts @@ -101,6 +101,7 @@ export class DebugDispatcher extends EventEmitter { const programName = getFileNameOnly(args.program); if (!existsSync(runtime)) { + // Exact text is referenced in docs, update docs when updating this value Out.log(`AutoHotkey execute bin not found: ${runtime}`); this.end(); return;