Skip to content

Commit 50d87fa

Browse files
committed
Merge remote-tracking branch 'upstream/master' into client-side-compile-update
2 parents dab9d5c + a868865 commit 50d87fa

File tree

10 files changed

+241
-127
lines changed

10 files changed

+241
-127
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Change Log
22

3+
## [3.0.3] 16-Jun-2025
4+
- Enhancements
5+
- Cache the contents of files fetched during a debug session (#1579)
6+
- Fixes
7+
- Fix `objectscript.autoAdjustName` behavior with `Save As...` (#1562)
8+
- Fix detection of duplicate file change events (#1564)
9+
- Attempt to use existing line endings when replacing a file's contents post-compile (#1567)
10+
- Exempt files created due to server export from `objectscript.autoAdjustName` behavior (#1571)
11+
- Prevent rare case where a file may be compiled twice due to concurrency issues (#1571)
12+
- Improve code that exempts post-save compile from the batching behavior (#1571)
13+
- Update the VS Code editor UI if a server-side document was changed during save (#1573)
14+
- Don't show `Show Plan` CodeLenses inside string literals (#1574)
15+
- Fix timeout of connection requests on activation (#1577)
16+
- Fix the automatic termination of REST and unit test debug sessions (#1579)
17+
- Prevent VS Code from showing a `Create File` button for files that are deployed when debugging (#1579)
18+
- Don't attempt to set a breakpoint that's from a file in a different workspace folder (#1579)
19+
- Fix debugging files in a client-side virtual workspace folder (#1579)
20+
- Explicitly report failure to set a breakpoint (#1579)
21+
- Use the document index to get determine the name of a document in a local file when debugging (#1579)
22+
- Handle errors when fetching server-side source control menu options fails (#1580)
23+
- Fix saving and re-opening of server-side documents on VS Code 1.101.0 (#1584)
24+
325
## [3.0.2] 20-May-2025
426
- Enhancements
527
- Allow `objectscript.multilineMethodArgs` to be set per workspace folder (#1534)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ To unlock these features (optional):
5555

5656
1. Download and install a beta version from GitHub. This is necessary because Marketplace does not allow publication of extensions that use proposed APIs.
5757
- Go to https://github.com/intersystems-community/vscode-objectscript/releases
58-
- Locate the beta immediately above the release you installed from Marketplace. For instance, if you installed `3.0.2`, look for `3.0.3-beta.1`. This will be functionally identical to the Marketplace version apart from being able to use proposed APIs.
59-
- Download the VSIX file (for example `vscode-objectscript-3.0.3-beta.1.vsix`) and install it. One way to install a VSIX is to drag it from your download folder and drop it onto the list of extensions in the Extensions view of VS Code.
58+
- Locate the beta immediately above the release you installed from Marketplace. For instance, if you installed `3.0.3`, look for `3.0.4-beta.1`. This will be functionally identical to the Marketplace version apart from being able to use proposed APIs.
59+
- Download the VSIX file (for example `vscode-objectscript-3.0.4-beta.1.vsix`) and install it. One way to install a VSIX is to drag it from your download folder and drop it onto the list of extensions in the Extensions view of VS Code.
6060

6161
2. From [Command Palette](https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_command-palette) choose `Preferences: Configure Runtime Arguments`.
6262
3. In the argv.json file that opens, add this line (required for both Stable and Insiders versions of VS Code):

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-objectscript",
33
"displayName": "InterSystems ObjectScript",
44
"description": "InterSystems ObjectScript language support for Visual Studio Code",
5-
"version": "3.0.3-SNAPSHOT",
5+
"version": "3.0.4-SNAPSHOT",
66
"icon": "images/logo.png",
77
"aiKey": "9cd75d51-697c-406c-a929-2bcf46e97c64",
88
"categories": [

src/api/index.ts

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,6 @@ interface ConnectionSettings {
4040
dockerService?: string;
4141
}
4242

43-
// Needed to fix a TS error
44-
declare let AbortSignal: {
45-
prototype: AbortSignal;
46-
new (): AbortSignal;
47-
abort(reason?: any): AbortSignal;
48-
timeout(milliseconds: number): AbortSignal;
49-
};
50-
5143
export class AtelierAPI {
5244
private _config: ConnectionSettings;
5345
private namespace: string;
@@ -369,7 +361,7 @@ export class AtelierAPI {
369361
} else if (!cookies.length) {
370362
if (!authRequest) {
371363
// Recursion point
372-
authRequest = this.request(0, "HEAD");
364+
authRequest = this.request(0, "HEAD", undefined, undefined, undefined, undefined, options);
373365
authRequestMap.set(target, authRequest);
374366
}
375367
auth = authRequest;
@@ -408,7 +400,6 @@ export class AtelierAPI {
408400
data: body,
409401
withCredentials: true,
410402
httpsAgent,
411-
timeout: options?.timeout ? options.timeout : 0,
412403
signal: options?.timeout ? AbortSignal.timeout(options.timeout) : undefined,
413404
validateStatus: (status) => status < 504,
414405
});
@@ -524,6 +515,25 @@ export class AtelierAPI {
524515

525516
return data;
526517
} catch (error) {
518+
if (
519+
error?.message?.includes("Connection: close") &&
520+
path?.includes("/doc/") &&
521+
headers &&
522+
headers["IF-NONE-MATCH"]
523+
) {
524+
// This "Parse Error: Data after `Connection: close`" error is caused by
525+
// stricter behavior in the llhttp library introduced in Node 22/VS Code 1.101.0.
526+
// This only affects servers that use IIS as a web server, and it only occurs
527+
// when a 304 Not Modified response is sent from the server.
528+
// See https://github.com/intersystems-community/vscode-objectscript/issues/1583
529+
if (outputTraffic) {
530+
outputRequest();
531+
outputChannel.appendLine(`+- RESPONSE -----------------------------------------`);
532+
outputChannel.appendLine("304 Not Modified");
533+
outputChannel.appendLine(`+- END ----------------------------------------------`);
534+
}
535+
throw { statusCode: 304, message: "Not Modified" };
536+
}
527537
if (outputTraffic && !error.statusCode) {
528538
// Only output errors here if they were "hard" errors, not HTTP response errors
529539
outputRequest();
@@ -571,7 +581,6 @@ export class AtelierAPI {
571581
return Promise.all([
572582
workspaceState.update(this.configName.toLowerCase() + ":apiVersion", apiVersion),
573583
workspaceState.update(this.configName.toLowerCase() + ":serverVersion", serverVersion),
574-
workspaceState.update(this.configName.toLowerCase() + ":iris", data.version.startsWith("IRIS")),
575584
]).then(() => info);
576585
}
577586
});

src/commands/studio.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,13 +424,13 @@ export class StudioActions {
424424

425425
const query = "select * from %Atelier_v1_Utils.Extension_GetMenus(?,?,?)";
426426
const parameters = [menuType, this.name, selectedText];
427+
const noun = sourceControl ? "source control action" : "command";
427428

428429
return this.api
429430
.actionQuery(query, parameters)
430431
.then((data) => data.result.content)
431432
.then((menus) => this.prepareMenuItems(menus, sourceControl))
432433
.then((menuItems) => {
433-
const noun = sourceControl ? "source control action" : "command";
434434
const suffix = this.name ? ` on ${this.name}` : "";
435435
if (menuItems.length == 0) {
436436
vscode.window.showInformationMessage(`There are no server-side ${noun}s to execute${suffix}.`, "Dismiss");
@@ -441,7 +441,10 @@ export class StudioActions {
441441
title: `Pick a server-side ${noun} to execute${suffix}`,
442442
});
443443
})
444-
.then((action) => this.userAction(action));
444+
.then((action) => this.userAction(action))
445+
.catch((error) => {
446+
handleError(error, `Failed to get the server-side ${noun} menu options.`);
447+
});
445448
}
446449

447450
public fireOtherStudioAction(action: OtherStudioAction, userAction?: UserAction): void {

0 commit comments

Comments
 (0)