Skip to content

Commit 3fe68d6

Browse files
ricxJrisc-bsavianodependabot[bot]gjsjohnmurraybot
authored andcommitted
Merge/upstream 2026 01 12 (#74)
* Prevent users from accidentally opening multiple copies of the same class or routine (intersystems-community#1666) * Fix opening server-side generated INT routines (intersystems-community#1668) * Fix running unit tests from a root test item (intersystems-community#1669) * Bump js-yaml from 4.1.0 to 4.1.1 (intersystems-community#1670) Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.1.0...4.1.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.1.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump glob from 11.0.1 to 11.1.0 (intersystems-community#1673) Bumps [glob](https://github.com/isaacs/node-glob) from 11.0.1 to 11.1.0. - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](isaacs/node-glob@v11.0.1...v11.1.0) --- updated-dependencies: - dependency-name: glob dependency-version: 11.1.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix automatic refresh of server-side documents after save and compile (intersystems-community#1678) * Fix `Show Plan` for IRIS 2026.1+ (intersystems-community#1679) * Insert file stub snippet when creating a new class or routine using client-side editing (intersystems-community#1681) * chore: `npm audit fix` (intersystems-community#1682) * Trigger server-side source control `OpenedDocument` UserAction after a project is modified (intersystems-community#1685) * Remove barely used configuration settings (intersystems-community#1683) * Prepare 3.4.0 release (intersystems-community#1692) * auto bump version with release * Add `Func` suffix to `Copy Invocation` result for Queries (intersystems-community#1695) * Fix extension activation when clicking on InterSystems view container in an empty workspace folder (intersystems-community#1694) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Brett Saviano <bsaviano@intersystems.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: John Murray <johnm@georgejames.com> Co-authored-by: ProjectBot <bot@users.noreply.github.com>
1 parent 4cdd56c commit 3fe68d6

6 files changed

Lines changed: 50 additions & 23 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ To unlock these features (optional):
6060
- Download the VSIX file (for example `vscode-objectscript-3.4.1-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.
6161

6262
- Go to https://github.com/intersystems-community/vscode-objectscript/releases
63-
- Locate the beta immediately above the release you installed from Marketplace. For instance, if you installed `3.2.0`, look for `3.2.1-beta.1`. This will be functionally identical to the Marketplace version apart from being able to use proposed APIs.
64-
- Download the VSIX file (for example `vscode-objectscript-3.2.1-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.
63+
- Locate the beta immediately above the release you installed from Marketplace. For instance, if you installed `3.4.0`, look for `3.4.1-beta.1`. This will be functionally identical to the Marketplace version apart from being able to use proposed APIs.
64+
- Download the VSIX file (for example `vscode-objectscript-3.4.1-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.
6565

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

package-lock.json

Lines changed: 10 additions & 17 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
@@ -1930,7 +1930,7 @@
19301930
"@vscode/debugprotocol": "^1.68.0",
19311931
"@vscode/extension-telemetry": "^1.2.0",
19321932
"@xmldom/xmldom": "^0.9.8",
1933-
"axios": "^1.13.5",
1933+
"axios": "^1.13.2",
19341934
"core-js": "^3.41.0",
19351935
"iconv-lite": "0.7.0",
19361936
"istextorbinary": "^7.0.0",

src/commands/project.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,38 @@ export async function exportProjectContents(): Promise<any> {
918918
}
919919
}
920920

921+
export async function compileProjectContents(node: ProjectNode): Promise<any> {
922+
const { workspaceFolderUri, namespace, label } = node;
923+
const api = new AtelierAPI(workspaceFolderUri);
924+
api.setNamespace(namespace);
925+
const compileList: string[] = await api
926+
.actionQuery(
927+
"SELECT CASE WHEN Type = 'PKG' THEN Name||'.*.cls' WHEN Type = 'CLS' THEN Name||'.cls' ELSE Name END Name " +
928+
"FROM %Studio.Project_ProjectItemsList(?,1) WHERE Type != 'GBL' AND Type != 'DIR' " +
929+
"AND (Type != 'CSP' OR (Type = 'CSP' AND $PIECE(Name,'.',2) %INLIST $LISTFROMSTRING('csp,csr,CSP,CSR'))) " +
930+
"UNION SELECT SUBSTR(sod.Name,2) AS Name FROM %Library.RoutineMgr_StudioOpenDialog('*.csp,*.csr',1,1,1,1,0,1) AS sod " +
931+
"JOIN %Studio.Project_ProjectItemsList(?,1) AS pil ON pil.Type = 'DIR' AND sod.Name %STARTSWITH '/'||pil.Name||'/'",
932+
[label, label]
933+
)
934+
.then((data) => data.result.content.map((e) => e.Name));
935+
return vscode.window.withProgress(
936+
{
937+
cancellable: true,
938+
location: vscode.ProgressLocation.Notification,
939+
title: `Compiling project '${label}'`,
940+
},
941+
(progress, token: vscode.CancellationToken) =>
942+
api
943+
.asyncCompile(compileList, token, config().compileFlags)
944+
.then((data) => {
945+
if (data.status && data.status.errors && data.status.errors.length) {
946+
throw new Error("Compile error");
947+
}
948+
})
949+
.catch(() => compileErrorMsg())
950+
);
951+
}
952+
921953
/**
922954
* Returns the index of the first isfs folder in this workspace that is linked to `project`.
923955
*/

src/commands/unitTest.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,9 @@ function labelFromAssertion(assertion: LegacyAssertion): string | undefined {
416416
/** Find the root `TestItem` for `uri` */
417417
function rootItemForItem(testController: vscode.TestController, uri: vscode.Uri): vscode.TestItem | undefined {
418418
let rootItem: vscode.TestItem;
419+
const uriString = uri.toString();
419420
for (const [, i] of testController.items) {
420-
if (uriIsAncestorOf(i.uri, uri)) {
421+
if (uriIsParentOf(i.uri, uri) || uriString == i.uri.toString()) {
421422
rootItem = i;
422423
break;
423424
}
@@ -1375,9 +1376,10 @@ async function runHandler(
13751376

13761377
// Add the initial items to the queue to process
13771378
const queue: vscode.TestItem[] = [];
1379+
const rootUriString = root.uri.toString();
13781380
if (request.include?.length) {
13791381
request.include.forEach((i) => {
1380-
if (uriIsAncestorOf(root.uri, i.uri)) {
1382+
if (uriIsParentOf(root.uri, i.uri) || i.uri.toString() == rootUriString) {
13811383
queue.push(i);
13821384
}
13831385
});

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<any> {
15411541
e.files
15421542
// Attempt to fill in stub content for classes and routines that
15431543
// are not server-side files and were not created due to an export
1544-
.filter((f) => notIsfs(f) && isClassOrRtn(f.path) && !exportedUris.has(f.toString()))
1544+
.filter((f) => notIsfs(f) && isClassOrRtn(f) && !exportedUris.has(f.toString()))
15451545
.forEach(async (uri) => {
15461546
// Need to wait in case file was created using "Save As..."
15471547
// because in that case the file gets created without

0 commit comments

Comments
 (0)