Skip to content

Commit 861b41d

Browse files
Merge remote-tracking branch 'origin/develop'
2 parents 7f1f12d + a6952da commit 861b41d

File tree

112 files changed

+3993
-563
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+3993
-563
lines changed

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,42 @@ Added the ability to convert a notebook to a PDF! This requires an additional ex
2828

2929
- You do need to save your notebook to disk so we have a path to write the Markdown and PDF files
3030

31+
## 4.4.2 - April 2024
32+
33+
For notebook cells, syntax errors are now highlighted and problems are reported on the lines that have errors. This behaves the same as PRO files when using the debug console as well.
34+
35+
When you run a notebook cell, and IDL stops running, we now show the line in the cell that was stopped on to help track down problems.
36+
37+
Syntax error and notebook decorations now cover the whole line instead of just the text on the line to help make them pop more.
38+
39+
Improved the user experience for breakpoints when working with IDL. Some of the new behaviors include:
40+
41+
- Properly setting breakpoints when you add them to a file before IDL starts
42+
43+
- When you manually compile any file, we synchronize the actual location of breakpoints with VSCode
44+
45+
Fixed a rare error where, when IDL was running in the debug console, we would fail to fetch internal information about IDL.
46+
47+
When converting notebooks to PDFs, add a short pause before generating the PDF try avoid having to click the button twice.
48+
49+
Fixed an issue where, when you would delete a notebook cell that had reported problems, the problems would always stick around in the "Problems" tab of VSCode
50+
51+
Re-worked quote formatting to not potentially break user code. There are a few edge cases where the quotes cause errors when they were flipped from single to double (or double to single). Now, all quotes preserve the interior content of the string so that IDL interprets them the same.
52+
53+
Fixed a small issue with syntax highlighting where we weren't detecting escaped quotes (and highlighting them) as we should have.
54+
55+
Tweak setting IDL's DLM path when launching so that users can specify custom paths through normal environment variables and have it be supported.
56+
57+
When IDL starts up for notebooks, we now check to make sure you have at least IDL 8.8.0 which has some required updates in order for the notebooks to function as expected.
58+
59+
Updated the main README and notebooks docs to reflect the version requirements.
60+
61+
When IDL starts for Notebooks, we update the kernel indicator in the top-right of the notebook to show the version of IDL we are using. We use this now instead of the pop-up window that used to appear.
62+
63+
## 4.4.1 April 2024
64+
65+
Fix a bug where watch variables were being executed and causing chaos in IDL debug sessions
66+
3167
## 4.4.0 - April 2024
3268

3369
Fixed an issue where the names of ENVI and IDL tasks were incorrectly lower-case instead of what the user had specified in the task files.

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ The extension is tested against:
6666

6767
Anything else is use-at-your-own-risk and may not work.
6868

69-
For notebooks, we only test against the above versions, and the ENVI Notebook API does require ENVI in order to function.
69+
Notebooks have specific version requirements for IDL and ENVI:
70+
71+
- For IDL, you'll need IDL 8.8.0 or newer (enforced, and checked, when notebooks start)
72+
73+
- For ENVI, you'll need ENVI 6.0 or ENVI 5.7. Any other version of ENVI is not guaranteed to work.
7074

7175
## Features
7276

apps/client-e2e/src/tests/debugging/_debugging-runner.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { Logger } from '@idl/logger';
22

33
import { Runner } from '../runner.class';
4-
import { BreakPointStepInStepOut } from './breakpoint-step-in-step-out';
4+
import { BreakpointCompileBehavior } from './breakpoint-compile-behavior';
5+
import { BreakpointSetBeforeStart } from './breakpoint-set-before-start';
6+
import { BreakpointStepInStepOut } from './breakpoint-step-in-step-out';
7+
import { CleanOutput } from './clean-output';
58
import { Compile } from './compile';
69
import { Continue } from './continue';
710
import { Edit } from './edit';
@@ -31,6 +34,12 @@ DEBUGGING_RUNNER.addTest({
3134
critical: true,
3235
});
3336

37+
DEBUGGING_RUNNER.addTest({
38+
name: 'Remove excess IDL content from IDL output (compile/restore statements)',
39+
fn: CleanOutput,
40+
critical: true,
41+
});
42+
3443
DEBUGGING_RUNNER.addTest({
3544
name: 'Queue works right',
3645
fn: QueueRight,
@@ -54,7 +63,17 @@ DEBUGGING_RUNNER.addTest({
5463

5564
DEBUGGING_RUNNER.addTest({
5665
name: 'Set breakpoints, step in, over, out, reset',
57-
fn: BreakPointStepInStepOut,
66+
fn: BreakpointStepInStepOut,
67+
});
68+
69+
DEBUGGING_RUNNER.addTest({
70+
name: 'Breakpoints behave correctly when we set before compiling a file',
71+
fn: BreakpointCompileBehavior,
72+
});
73+
74+
DEBUGGING_RUNNER.addTest({
75+
name: 'Breakpoints get applied when set before IDL starts up',
76+
fn: BreakpointSetBeforeStart,
5877
});
5978

6079
DEBUGGING_RUNNER.addTest({
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
import { GetExtensionPath, IDL_COMMANDS } from '@idl/shared';
2+
import { Sleep } from '@idl/tests/helpers';
3+
import {
4+
GetActivePROCodeWindow,
5+
OpenFileInVSCode,
6+
VSCODE_COMMANDS,
7+
} from '@idl/vscode/shared';
8+
import expect from 'expect';
9+
import * as vscode from 'vscode';
10+
11+
import { RunnerFunction } from '../runner.interface';
12+
import { DEBUG_PAUSE } from './_shared.interface';
13+
14+
/**
15+
* Test that makes sure breakpoints behave as we expect when we compile a file
16+
*/
17+
export const BreakpointCompileBehavior: RunnerFunction = async (init) => {
18+
/**
19+
* Start IDL
20+
*/
21+
const started = await vscode.commands.executeCommand(
22+
IDL_COMMANDS.DEBUG.START
23+
);
24+
25+
// verify we started
26+
expect(started).toBeTruthy();
27+
28+
// show the debug console
29+
await vscode.commands.executeCommand(VSCODE_COMMANDS.SHOW_DEBUG_CONSOLE);
30+
31+
// reset breakpoints
32+
await init.debug.adapter._breakpoints.resetBreakpoints();
33+
34+
/** Get the file we need to work with */
35+
const file = GetExtensionPath(
36+
'idl/test/client-e2e/debug/breakpoints/on_compile.pro'
37+
);
38+
39+
// open editor and display
40+
await OpenFileInVSCode(file);
41+
42+
// get current editor window
43+
const editor = GetActivePROCodeWindow();
44+
45+
// make sure we opened a window
46+
expect(editor).not.toBeUndefined();
47+
48+
// make sure it is the plot file
49+
expect(editor.uri.fsPath.endsWith('on_compile.pro')).toBeTruthy();
50+
51+
// pause momentarily
52+
await Sleep(DEBUG_PAUSE);
53+
54+
// set breakpoint
55+
await init.debug.adapter._breakpoints.setBreakpoints({
56+
source: {
57+
path: file,
58+
},
59+
lines: [8, 10, 14, 19, 24],
60+
});
61+
62+
/** Compile our file */
63+
await vscode.commands.executeCommand(IDL_COMMANDS.DEBUG.COMPILE);
64+
65+
// pause momentarily
66+
await Sleep(DEBUG_PAUSE);
67+
68+
// query breakpoints
69+
const bps = init.debug.adapter._breakpoints.VSCodeBreakpoints.map(
70+
(bp) => bp.line
71+
).sort((a, b) => a - b);
72+
73+
// make sure we have the right breakpoints
74+
expect(bps).toEqual([8, 10, 24]);
75+
76+
// remove all breakpoints
77+
await init.debug.adapter._breakpoints.resetBreakpoints();
78+
79+
// reset
80+
await init.debug.adapter.evaluate('.reset');
81+
};
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import { GetExtensionPath, IDL_COMMANDS } from '@idl/shared';
2+
import { Sleep } from '@idl/tests/helpers';
3+
import { OpenFileInVSCode, VSCODE_COMMANDS } from '@idl/vscode/shared';
4+
import expect from 'expect';
5+
import * as vscode from 'vscode';
6+
7+
import { RunnerFunction } from '../runner.interface';
8+
import { DEBUG_PAUSE } from './_shared.interface';
9+
10+
/**
11+
* Test that makes sure breakpoints can be set before IDL starts and then
12+
* we set them when IDL starts up
13+
*/
14+
export const BreakpointSetBeforeStart: RunnerFunction = async (init) => {
15+
/** Get the file we need to work with */
16+
const file = GetExtensionPath(
17+
'idl/test/client-e2e/debug/breakpoints/before_start.pro'
18+
);
19+
20+
// open editor and display
21+
const doc = await OpenFileInVSCode(file);
22+
23+
// make sure we opened a window
24+
expect(doc).not.toBeUndefined();
25+
26+
// make sure it is the plot file
27+
expect(doc.uri.fsPath.endsWith('before_start.pro')).toBeTruthy();
28+
29+
// stop our IDL session
30+
await vscode.commands.executeCommand(VSCODE_COMMANDS.DEBUG_STOP);
31+
32+
// short pause
33+
await Sleep(100);
34+
35+
// make sure stopped
36+
expect(init.debug.adapter.isStarted()).toBeFalsy();
37+
38+
// set breakpoint
39+
const prom = init.debug.adapter._breakpoints.setBreakpoints({
40+
source: {
41+
path: file,
42+
},
43+
lines: [1, 3],
44+
});
45+
46+
// short pause
47+
await Sleep(DEBUG_PAUSE);
48+
49+
/**
50+
* Start IDL
51+
*/
52+
const started = await vscode.commands.executeCommand(
53+
IDL_COMMANDS.DEBUG.START
54+
);
55+
56+
// verify we started
57+
expect(started).toBeTruthy();
58+
59+
// wait for breakpoints to actually be added
60+
await prom;
61+
62+
// query breakpoints
63+
const bps = init.debug.adapter._breakpoints.VSCodeBreakpoints.map(
64+
(bp) => bp.line
65+
);
66+
67+
// make sure we have the right breakpoints
68+
expect(bps.sort()).toEqual([1, 3]);
69+
70+
// reset breakpoints
71+
await init.debug.adapter._breakpoints.resetBreakpoints();
72+
73+
// reset
74+
await init.debug.adapter.evaluate('.reset');
75+
};

apps/client-e2e/src/tests/debugging/breakpoint-step-in-step-out.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { DEBUG_PAUSE } from './_shared.interface';
1515
* Test that makes sure we can set breakpoints, stop on them, step into routines, and step
1616
* out of them
1717
*/
18-
export const BreakPointStepInStepOut: RunnerFunction = async (init) => {
18+
export const BreakpointStepInStepOut: RunnerFunction = async (init) => {
1919
/**
2020
* Start IDL
2121
*/
@@ -29,6 +29,9 @@ export const BreakPointStepInStepOut: RunnerFunction = async (init) => {
2929
// show the debug console
3030
await vscode.commands.executeCommand(VSCODE_COMMANDS.SHOW_DEBUG_CONSOLE);
3131

32+
// reset breakpoints
33+
await init.debug.adapter._breakpoints.resetBreakpoints();
34+
3235
/** Get the file we need to work with */
3336
const file = GetExtensionPath('idl/test/client-e2e/step_in.pro');
3437

@@ -48,7 +51,12 @@ export const BreakPointStepInStepOut: RunnerFunction = async (init) => {
4851
await Sleep(DEBUG_PAUSE);
4952

5053
// set breakpoint
51-
await init.debug.adapter.setBreakpoint(file, 19);
54+
await init.debug.adapter._breakpoints.setBreakpoints({
55+
source: {
56+
path: file,
57+
},
58+
lines: [19],
59+
});
5260

5361
/** Run our file */
5462
await vscode.commands.executeCommand(IDL_COMMANDS.DEBUG.RUN);
@@ -75,6 +83,9 @@ export const BreakPointStepInStepOut: RunnerFunction = async (init) => {
7583
await Sleep(DEBUG_PAUSE);
7684
expect(init.debug.adapter.stopped?.stack?.line).toEqual(21);
7785

86+
// remove all breakpoints
87+
await init.debug.adapter._breakpoints.resetBreakpoints();
88+
7889
// reset
7990
await init.debug.adapter.evaluate('.reset');
8091
};
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import { CleanIDLOutput } from '@idl/idl';
2+
import { IDL_COMMANDS, Sleep } from '@idl/shared';
3+
import expect from 'expect';
4+
import * as vscode from 'vscode';
5+
6+
import { RunnerFunction } from '../runner.interface';
7+
8+
/**
9+
* Example IDL statements that we should remove
10+
*/
11+
const STATEMENTS: string[] = [
12+
`% Restored file: HASH::INIT`,
13+
`% Compiled module: IMAGE::QUERYPROPERTY.`,
14+
`% Compiled module: SURFACE::QUERYPROPERTY.`,
15+
`% Compiled module: SCATTERPLOT::QUERYPROPERTY.`,
16+
`% Compiled module: SCATTERPLOT3D::QUERYPROPERTY.`,
17+
`% Compiled module: CONTOUR::QUERYPROPERTY.`,
18+
`% Compiled module: TEXT::QUERYPROPERTY.`,
19+
`% Compiled module: FILLPLOT::QUERYPROPERTY.`,
20+
`% Compiled module: POLYGON::QUERYPROPERTY.`,
21+
`% Compiled module: POLYLINE::QUERYPROPERTY.`,
22+
`% Compiled module: ARROW::QUERYPROPERTY.`,
23+
`% Compiled module: ELLIPSE::QUERYPROPERTY.`,
24+
`% Compiled module: MAPGRID::QUERYPROPERTY.`,
25+
`% Compiled module: VECTOR::QUERYPROPERTY.`,
26+
`% Compiled module: STREAMLINE::QUERYPROPERTY.`,
27+
`% Compiled module: MAPGRIDLINE::QUERYPROPERTY.`,
28+
`% Compiled module: CROSSHAIR::QUERYPROPERTY.`,
29+
`% Compiled module: VOLUME::QUERYPROPERTY.`,
30+
`% Compiled module: TEXT::GETTEXTDIMENSIONS.`,
31+
`% Compiled module: GRAPHIC__DEFINE.`,
32+
];
33+
34+
/**
35+
* Function that verifies we can clean the output from IDL when we
36+
* have compiled and restore statements
37+
*/
38+
export const CleanOutput: RunnerFunction = async (init) => {
39+
/**
40+
* Start IDL
41+
*/
42+
const started = await vscode.commands.executeCommand(
43+
IDL_COMMANDS.DEBUG.START
44+
);
45+
46+
// verify we started
47+
expect(started).toBeTruthy();
48+
49+
// short pause
50+
await Sleep(100);
51+
52+
/**
53+
* Evaluate something and get result
54+
*/
55+
const res = CleanIDLOutput(
56+
await init.debug.adapter.evaluate(
57+
`print, '${STATEMENTS.join(`' & print, '`)}'`,
58+
{ echo: true }
59+
)
60+
);
61+
62+
// verify we get the right output
63+
expect(res).toEqual('');
64+
};

apps/client-e2e/src/tests/debugging/compile.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export const Compile: RunnerFunction = async (init) => {
2525

2626
// compile file
2727
const res = CleanIDLOutput(
28-
await init.debug.adapter.evaluate(`.compile plot`, { echo: true })
28+
await init.debug.adapter.evaluate(`.compile plot`, { echo: true }),
29+
false
2930
);
3031

3132
// make sure we compile

0 commit comments

Comments
 (0)