Skip to content

Commit f177a7f

Browse files
committed
Print output from all Rascal channels.
1 parent b6de142 commit f177a7f

File tree

8 files changed

+36
-23
lines changed

8 files changed

+36
-23
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
os: [buildjet-4vcpu-ubuntu-2204, windows-latest, macos-latest]
5353
fail-fast: true
5454
env:
55-
CODE_VERSION: "1.90.2"
55+
CODE_VERSION: "1.97.0"
5656
runs-on: ${{ matrix.os }}
5757
steps:
5858
- uses: actions/checkout@v5

rascal-vscode-extension/package-lock.json

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

rascal-vscode-extension/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"version": "0.13.0-head",
1818
"engines": {
19-
"vscode": "^1.90.0",
19+
"vscode": "^1.97.0",
2020
"node": ">=20.9.0"
2121
},
2222
"type": "commonjs",
@@ -289,7 +289,7 @@
289289
"@types/mocha": "10.x",
290290
"@types/node": "20.x",
291291
"@types/tar": "6.x",
292-
"@types/vscode": "1.90.0",
292+
"@types/vscode": "1.97.0",
293293
"@types/yauzl": "2.x",
294294
"@typescript-eslint/eslint-plugin": "7.x",
295295
"@typescript-eslint/parser": "7.x",

rascal-vscode-extension/src/test/vscode-suite/dsl-unregister-register-race.test.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('DSL unregister/register race', function () {
3838

3939
this.timeout(Delays.extremelySlow * 2);
4040

41-
printRascalOutputOnFailure('Language Parametric Rascal');
41+
printRascalOutputOnFailure('Language Parametric Rascal', () => driver);
4242

4343
async function loadPico() {
4444
const repl = new RascalREPL(bench, driver);
@@ -78,13 +78,14 @@ describe('DSL unregister/register race', function () {
7878
});
7979

8080
for (let i = 0; i < 100; i++) {
81-
if (!failed) {
82-
it.only("Try trigger race", async function () {
83-
const editor = await ide.openModule(TestWorkspace.picoFile);
84-
await ide.hasSyntaxHighlighting(editor);
85-
await ide.hasInlayHint(editor);
86-
});
87-
}
81+
it.only("Try trigger race", async function () {
82+
if (failed) {
83+
this.skip();
84+
}
85+
const editor = await ide.openModule(TestWorkspace.picoFile);
86+
await ide.hasSyntaxHighlighting(editor);
87+
await ide.hasInlayHint(editor);
88+
});
8889
}
8990
});
9091

rascal-vscode-extension/src/test/vscode-suite/dsl.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ parameterizedDescribe(function (errorRecovery: boolean) {
4747

4848
this.timeout(Delays.extremelySlow * 2);
4949

50-
printRascalOutputOnFailure('Language Parametric Rascal');
50+
printRascalOutputOnFailure('Language Parametric Rascal', () => driver);
5151

5252
async function loadPico() {
5353
const repl = new RascalREPL(bench, driver);

rascal-vscode-extension/src/test/vscode-suite/ide.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('IDE', function () {
4242

4343
this.timeout(Delays.extremelySlow * 2);
4444

45-
printRascalOutputOnFailure('Rascal MPL');
45+
printRascalOutputOnFailure('Rascal MPL', () => driver);
4646

4747
before(async () => {
4848
browser = VSBrowser.instance;

rascal-vscode-extension/src/test/vscode-suite/repl.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('REPL', function () {
3737

3838
this.timeout(2 * Delays.extremelySlow);
3939

40-
printRascalOutputOnFailure('Rascal MPL');
40+
printRascalOutputOnFailure('Rascal MPL', () => driver);
4141

4242
before(async () => {
4343
browser = VSBrowser.instance;

rascal-vscode-extension/src/test/vscode-suite/utils.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,21 @@ export class IDEOperations {
451451
}
452452

453453

454-
async function showRascalOutput(bbp: BottomBarPanel, channel: string) {
454+
async function showRascalOutput(bbp: BottomBarPanel, channel: string, driver: WebDriver) {
455455
const outputView = await bbp.openOutputView();
456-
await outputView.selectChannel(`${channel} Language Server`);
456+
const channels = await outputView.getChannelNames();
457+
const rascalChannels = channels.filter(c => c.includes("Rascal"));
458+
if (rascalChannels.length === 1) {
459+
await outputView.selectChannel(`${channel} Language Server`);
460+
} else {
461+
// Create a compound channel so we can see everything
462+
const bench = new Workbench();
463+
await bench.executeCommand("workbench.action.output.addCompoundLog");
464+
const filter = await driver.wait(() => outputView.findElement(By.xpath("//div[contains(@class, 'quick-input-filter')]//input")));
465+
await filter.sendKeys("rascal");
466+
await filter.sendKeys(Key.SHIFT, Key.TAB, Key.NULL, Key.SPACE);
467+
await filter.sendKeys(Key.TAB, Key.TAB, Key.ENTER);
468+
}
457469
return outputView;
458470
}
459471

@@ -471,7 +483,7 @@ async function assureDebugLevelLoggingIsEnabled() {
471483
await prompt.confirm();
472484
}
473485

474-
export function printRascalOutputOnFailure(channel: 'Language Parametric Rascal' | 'Rascal MPL') {
486+
export function printRascalOutputOnFailure(channel: 'Language Parametric Rascal' | 'Rascal MPL', driver: () => WebDriver) {
475487

476488
const ZOOM_OUT_FACTOR = 5;
477489
afterEach("print output in case of failure", async function () {
@@ -487,7 +499,7 @@ export function printRascalOutputOnFailure(channel: 'Language Parametric Rascal'
487499
let textLines: WebElement[] = [];
488500
let tries = 0;
489501
while (textLines.length === 0 && tries < 3) {
490-
await showRascalOutput(bbp, channel);
502+
await showRascalOutput(bbp, channel, driver());
491503
textLines = await ignoreFails(bbp.findElements(By.className('view-line'))) ?? [];
492504
tries++;
493505
}

0 commit comments

Comments
 (0)