Skip to content

Commit f4d2c09

Browse files
authored
Merge branch 'intersystems-community:master' into colorize-output
2 parents 4581924 + 5e6af88 commit f4d2c09

File tree

6 files changed

+55
-26
lines changed

6 files changed

+55
-26
lines changed

docs/Configuration.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ nav_order: 4
66
---
77
# Configuration
88

9-
VS Code settings enable you to customize various aspects of its function. The InterSystems extensions provide settings used to configure VS Code for ObjectScript development.
9+
VS Code settings enable you to customize various aspects of its function. The InterSystems extensions provide settings used to configure VS Code for ObjectScript development. You may find these videos from InterSystems Learning Services useful for creating a configuration that works best for you:
10+
11+
- [Working with ObjectScript Classes in VS Code for Client-Side Editing](https://learning.intersystems.com/course/view.php?id=1778&ssoPass=1)
12+
- [Configuring VS Code Workspaces for Multiple ObjectScript Connections](https://learning.intersystems.com/course/view.php?id=1783&ssoPass=1)
1013

1114
{: #code-workspaces}
1215
## VS Code Workspaces

docs/RunDebug.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ The InterSystems ObjectScript Extension provides support for ObjectScript debugg
1111
- [Debugging Intro Video](https://code.visualstudio.com/docs/introvideos/debugging)
1212
- [Debugging User Guide](https://code.visualstudio.com/docs/editor/debugging)
1313

14+
Also, InterSystems Learning Services has produced [a short video](https://learning.intersystems.com/course/view.php?id=1795&ssoPass=1) which walks through the steps in this documentation page that you may find useful.
15+
1416
## Debug Configurations
1517

1618
In order to run or debug an ObjectScript class or routine or attach to a running process, you must create a debug configuration. Some other languages default to running the currently active file, but to run ObjectScript, you must specify the routine or ClassMethod to use or the running process to attach to.

package-lock.json

Lines changed: 41 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@
11941194
"glob": "^7.1.6",
11951195
"iconv-lite": "^0.6.0",
11961196
"mkdirp": "^1.0.4",
1197-
"node-fetch": "3.0.0",
1197+
"node-fetch": "3.1.1",
11981198
"vscode-cache": "^0.3.0",
11991199
"vscode-debugadapter": "^1.41.0",
12001200
"vscode-debugprotocol": "^1.41.0",

src/providers/FileSystemProvider/FileSystemProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export class FileSystemProvider implements vscode.FileSystemProvider {
192192
// Instead we simply return as though we wrote it successfully.
193193
// The actual writing is done by our workspace.onDidSaveTextDocument handler.
194194
// But first check cases for which we should fail the write and leave the document dirty if changed.
195-
if (fileName.split(".").pop().toLowerCase() === "cls") {
195+
if (!csp && fileName.split(".").pop().toLowerCase() === "cls") {
196196
// Check if the class is deployed
197197
api.actionIndex([fileName]).then((result) => {
198198
if (result.result.content[0].content.depl) {

src/utils/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ export async function portFromDockerCompose(): Promise<{ port: number; docker: b
382382
}
383383

384384
const envFileParam = envFile ? `--env-file ${envFile}` : "";
385-
const cmd = `docker-compose -f ${file} ${envFileParam} `;
385+
const exe = process.platform === "win32" ? "docker-compose.exe" : "docker-compose";
386+
const cmd = `${exe} -f ${file} ${envFileParam} `;
386387

387388
return new Promise((resolve, reject) => {
388389
exec(`${cmd} ps --services --filter status=running`, { cwd }, (error, stdout) => {
@@ -415,7 +416,8 @@ export async function terminalWithDocker(): Promise<vscode.Terminal> {
415416
const terminalName = `ObjectScript:${workspace}`;
416417
let terminal = terminals.find((t) => t.name == terminalName && t.exitStatus == undefined);
417418
if (!terminal) {
418-
terminal = vscode.window.createTerminal(terminalName, "docker-compose", [
419+
const exe = process.platform === "win32" ? "docker-compose.exe" : "docker-compose";
420+
terminal = vscode.window.createTerminal(terminalName, exe, [
419421
"-f",
420422
file,
421423
"exec",
@@ -439,7 +441,8 @@ export async function shellWithDocker(): Promise<vscode.Terminal> {
439441
const terminalName = `Shell:${workspace}`;
440442
let terminal = terminals.find((t) => t.name == terminalName && t.exitStatus == undefined);
441443
if (!terminal) {
442-
terminal = vscode.window.createTerminal(terminalName, "docker-compose", ["-f", file, "exec", service, "/bin/bash"]);
444+
const exe = process.platform === "win32" ? "docker-compose.exe" : "docker-compose";
445+
terminal = vscode.window.createTerminal(terminalName, exe, ["-f", file, "exec", service, "/bin/bash"]);
443446
terminals.push(terminal);
444447
}
445448
terminal.show(true);

0 commit comments

Comments
 (0)