You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR bundles a number of fixes and improves to the extension
Features
- The extension is no longer reliant on a `CHPL_HOME` value
- Can detect and use prefix-based installs
- Added better error detection and handling
- When CLS/chplcheck has crashed, the status bar now also has a notification to show that these are not working correctly.
- Removed the ability to build the tools automatically, this was error prone and only rarely the "correct" course of action
- Syntax highlighting for format string specifiers
List of fixes
- Resolve issues with searching PATH
- Fix syntax highlighting for numbers and the count operator
Tested locally with two versions of a chapel, a CHPL_HOME build from source and with a prefix install from homebrew
[Reviewed by @ShreyasKhandekar]
This document is intended for developers who want to contribute to the Chapel extension for Visual Studio Code.
4
+
5
+
## Building locally
6
+
7
+
To build and test the extension locally in debug mode, you can use the Run/Debug tab to launch the extension in a new VSCode window (or press `F5`).
8
+
9
+
For some debugging purposes, it may be useful to build a local binary of the extension using `vsce`. To do this, run `vsce package -o bin/chapel.vsix` from the root of the repository. This can then be installed in VSCode by selecting "Install from VSIX" in the Extensions view, or by running `code --install-extension bin/chapel.vsix`.
Copy file name to clipboardExpand all lines: package.json
+13-8
Original file line number
Diff line number
Diff line change
@@ -82,13 +82,8 @@
82
82
],
83
83
"commands": [
84
84
{
85
-
"command": "chapel.findChpl",
86
-
"title": "Find Chapel",
87
-
"category": "chapel"
88
-
},
89
-
{
90
-
"command": "chapel.buildTools",
91
-
"title": "Build chpl-language-server and chplcheck",
85
+
"command": "chapel.findChplHome",
86
+
"title": "Find CHPL_HOME",
92
87
"category": "chapel"
93
88
},
94
89
{
@@ -114,7 +109,7 @@
114
109
"chapel.CHPL_HOME": {
115
110
"scope": "window",
116
111
"type": "string",
117
-
"description": "CHPL_HOME"
112
+
"description": "The path to CHPL_HOME. If not provided, the extension may be able to find it automatically if `chpl`, `chplcheck`, and `chpl-language-server` are in PATH."
118
113
},
119
114
"chapel.CHPL_DEVELOPER": {
120
115
"scope": "window",
@@ -128,6 +123,11 @@
128
123
"default": true,
129
124
"description": "Enable chplcheck"
130
125
},
126
+
"chapel.chplcheck.path": {
127
+
"scope": "window",
128
+
"type": "string",
129
+
"description": "An explicit path to the chplcheck executable. If not provided, the extension will look for chplcheck in PATH and in CHPL_HOME"
130
+
},
131
131
"chapel.chplcheck.args": {
132
132
"scope": "window",
133
133
"type": "array",
@@ -143,6 +143,11 @@
143
143
"default": true,
144
144
"description": "Enable chpl-language-server"
145
145
},
146
+
"chapel.chpl-language-server.path": {
147
+
"scope": "window",
148
+
"type": "string",
149
+
"description": "An explicit path to the chpl-language-server executable. If not provided, the extension will look for chpl-language-server in PATH and in CHPL_HOME"
`${this.name}does not exist in the CHPL_HOME directory, make sure you are using the correct version of Chapel`,
162
+
`${this.name}is missing at the path '${this.tool_path}'. If you set the path manually, make sure it is correct. If it is, you may need to upgrade your Chapel version.`,
138
163
"Show Log",
139
164
"Ok"
140
165
)
@@ -146,15 +171,12 @@ export abstract class ChapelLanguageClient {
146
171
}else{
147
172
vscode.window
148
173
.showErrorMessage(
149
-
`${this.name} encountered an error, this is likely because ${this.name} is not installed. Double check that ${this.name} is built.`,
150
-
"Build Tools",
174
+
`${this.name} encountered an error. You may need to rebuild ${this.name}.`,
0 commit comments