Skip to content

Commit 384ea4a

Browse files
Merge remote-tracking branch 'origin/develop'
2 parents f3ead73 + dcf2cf2 commit 384ea4a

731 files changed

Lines changed: 19812 additions & 10511 deletions

File tree

Some content is hidden

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

.eslintrc.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,18 @@
3939
"extends": ["plugin:@nx/typescript"],
4040
"rules": {
4141
"@typescript-eslint/no-explicit-any": "off",
42-
"no-shadow": "error"
42+
"no-shadow": "error",
43+
"@typescript-eslint/no-extra-semi": "error",
44+
"no-extra-semi": "off"
4345
}
4446
},
4547
{
4648
"files": ["*.js", "*.jsx"],
4749
"extends": ["plugin:@nx/javascript"],
48-
"rules": {}
50+
"rules": {
51+
"@typescript-eslint/no-extra-semi": "error",
52+
"no-extra-semi": "off"
53+
}
4954
}
5055
]
5156
}

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ compliance
1717
apps/test-tokenizer/src/test-maker/cache/cache.json
1818
.angular
1919

20-
/.nx/cache
20+
/.nx/cache
21+
/.nx/workspace-data

.vscodeignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ package-lock.json
6969
perf.txt
7070
problems.json
7171
tsconfig.base.json
72-
webpack.base.config.js
72+
webpack.node.config.js
73+
webpack.vscode.config.js

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,36 @@ Document some advanced types so users may try them out and provide feedback. The
1616

1717
- Read more in the extension documentation
1818

19+
## 4.6.0 - August 2024
20+
21+
Fixed an issue where we open a file that we have stopped in, even if it is compiled as a SAVE file. Now, only PRO files will be jumped to.
22+
23+
Fixed an issue where, if you have a comment block before and after a routine definition, the second comment block is picked. We now only use the comment block after a routine definition if we did not find one just before.
24+
25+
Fixed an issue where documentation after a routine definition wasn't properly reporting problems.
26+
27+
For both of the problems above, and for documentation inside of a routine, the interior comments must be on the next line after the definition otherwise they will not be detected. If this breaks existing behavior for you, let us know and we can change it back!
28+
29+
Resolved an issue where, when routine definitions changed, problems were not properly detected as they should be. Example: changing the name of a keyword should have an error appear in any file that used the old keyword.
30+
31+
Notebooks now support compiling files! If a cell only has comments and compile statements, then it will be executed as a batch file. This allows you to merge notebooks and traditional editing/creation of PRO code.
32+
33+
Updated the "Hello World" IDL Notebook example with this new behavior.
34+
35+
Improve auto-complete for executive commands.
36+
37+
For `.compile` we now have auto-complete for files known to the language server.
38+
39+
Created a new concept called a Routine Definition File for IDL. These files allow developers, who deliver code as SAVE files or as DLLs/DLMs, to provide documentation so that other users get hover help, auto-complete, and the ability to create notebooks automatically from examples in the docs.
40+
41+
> See the new documentation page [here](https://interactive-data-language.github.io/vscode-idl/types/routine_definition_files.html) for more information.
42+
43+
Fixed an issue where we were not correctly detecting unclosed quotes when there was an escaped quote within the content of the string.
44+
45+
Re-work the toolbar for animations in IDL Notebooks. The new toolbar uses the same colors/style as the sidebar and will look good on most themes. There was an issue, after a library update, where colors for high contrast themes did not work with the slider and have now been fixed.
46+
47+
Notebook maps (requires ENVI) now have a button that will reset the view to the initial state. Helpful in case you zoom out or lose the location of your imagery while zooming/panning around.
48+
1949
## 4.5.1 - May 2024
2050

2151
Continuing with our story of IDL Notebook user experience, each session of notebook now gets it's own instance of IDL! This means a few things:

apps/client-e2e/project.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"main": "apps/client-e2e/src/main.ts",
1313
"tsConfig": "apps/client-e2e/tsconfig.app.json",
1414
"assets": [],
15-
"webpackConfig": "webpack.base.config.js",
15+
"webpackConfig": "webpack.vscode.config.js",
1616
"externalDependencies": "none",
1717
"target": "node",
1818
"compiler": "tsc"
@@ -44,17 +44,13 @@
4444
},
4545
"lint": {
4646
"executor": "@nx/eslint:lint",
47-
"outputs": ["{options.outputFile}"],
48-
"options": {
49-
"lintFilePatterns": ["apps/client-e2e/**/*.ts"]
50-
}
47+
"outputs": ["{options.outputFile}"]
5148
},
5249
"test": {
5350
"executor": "@nx/jest:jest",
5451
"outputs": ["{workspaceRoot}/coverage/apps/client-e2e"],
5552
"options": {
56-
"jestConfig": "apps/client-e2e/jest.config.ts",
57-
"passWithNoTests": true
53+
"jestConfig": "apps/client-e2e/jest.config.ts"
5854
}
5955
}
6056
},

apps/client-e2e/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function run(): Promise<void> {
4040
/**
4141
* Manually specify IDL folder
4242
*/
43-
const idlDir = FindIDL();
43+
const idlDir = FindIDL('idl90');
4444

4545
// validate we know where it is
4646
if (!idlDir) {

apps/client-e2e/src/tests/client-e2e-config.interface.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const CLIENT_E2E_CONFIG = {
88
DELAYS: {
99
/** Problem delay for PRO files and anything else */
1010
DEFAULT: 1000,
11-
/** Problem delay for IDL Notebooks */
12-
PROBLEMS_NOTEBOOK: 1000,
11+
/** Delay for tests using problem reporting and notebooks */
12+
PROBLEMS_NOTEBOOK: 2000,
1313
},
1414
};

apps/client-e2e/src/tests/interactions/_interactions-runner.ts

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

33
import { Runner } from '../runner.class';
4-
import { AddDocs } from './add-docs';
4+
import { DefFilesInteractRight } from './basic-interactions/def-files-interact-right';
5+
import { IDLJSONInteractRight } from './basic-interactions/idl-json-interact-right';
6+
import { IndexIDLFolderRightAndOpenEditClose } from './basic-interactions/index-idl-folder-right-and-open-edit-close';
7+
import { ProCodeInteractRight } from './basic-interactions/pro-code-interacts-right';
8+
import { TasksInteractRight } from './basic-interactions/tasks-interact-right';
9+
import { DuplicateGlobals } from './change-detection/duplicate-globals';
10+
import { DuplicateGlobalsFromDefs } from './change-detection/duplicate-globals-from-defs';
11+
import { DuplicateGlobalsFromOnlyDefs } from './change-detection/duplicate-globals-from-only-defs';
12+
import { RoutineChange } from './change-detection/routine-change';
513
import {
614
ExecuteCodeActionsWithEditForNotebook,
715
ExecuteCodeActionsWithEditForPROFile,
8-
} from './execute-code-actions-with-edits';
9-
import { IDLDisableAllFromSettings } from './idl-disable-all-from-setting';
10-
import { IDLDisableAllFromSettingsForNotebook } from './idl-disable-all-from-setting-for-notebook';
11-
import {
12-
IDLDisableAllFromComments,
13-
IDLDisableLinesFromComments,
14-
} from './idl-disable-from-comments';
15-
import { IDLDisableIndividualsFromSettings } from './idl-disable-individuals-from-setting';
16-
import { IDLDisableIndividualsFromSettingsForNotebook } from './idl-disable-individuals-from-setting-for-notebook';
17-
import { IDLJSONInteractRight } from './idl-json-interact-right';
18-
import { IndexIDLFolderRightAndOpenEditClose } from './index-idl-folder-right-and-open-edit-close';
19-
import { MigrateCodeDL30, MigrateCodeDL30_2 } from './migrate-code-dl-3.0';
20-
import { NotebookImpliedPrintProblemReporting } from './notebook-implied-print-problem-reporting';
21-
import { NotebookProblemsTrackRight } from './notebook-problems-track-right';
22-
import { NotebookCompletionBasic } from './notebooks-completion-basic';
23-
import { NotebooksInteractRight } from './notebooks-interact-right';
24-
import { NotebooksNoDuplicateRoutines } from './notebooks-no-duplicate-routines';
16+
} from './code-actions/execute-code-actions-with-edits';
2517
import {
2618
ProCodeCodeActionsExisting,
2719
ProCodeCodeActionsNoExisting,
28-
} from './pro-code-code-actions';
29-
import { ProCodeInteractRight } from './pro-code-interacts-right';
30-
import { TasksInteractRight } from './tasks-interact-right';
20+
} from './code-actions/pro-code-code-actions';
21+
import { AddDocs } from './commands/add-docs';
22+
import {
23+
MigrateCodeDL30,
24+
MigrateCodeDL30_2,
25+
} from './commands/migrate-code-dl-3.0';
26+
import { IDLDisableAllFromSettings } from './disable-problems/idl-disable-all-from-setting';
27+
import { IDLDisableAllFromSettingsForNotebook } from './disable-problems/idl-disable-all-from-setting-for-notebook';
28+
import {
29+
IDLDisableAllFromComments,
30+
IDLDisableLinesFromComments,
31+
} from './disable-problems/idl-disable-from-comments';
32+
import { IDLDisableIndividualsFromSettings } from './disable-problems/idl-disable-individuals-from-setting';
33+
import { IDLDisableIndividualsFromSettingsForNotebook } from './disable-problems/idl-disable-individuals-from-setting-for-notebook';
34+
import { NotebookImpliedPrintProblemReporting } from './notebooks/notebook-implied-print-problem-reporting';
35+
import { NotebookProblemsTrackRight } from './notebooks/notebook-problems-track-right';
36+
import { NotebookCompletionBasic } from './notebooks/notebooks-completion-basic';
37+
import { NotebooksInteractRight } from './notebooks/notebooks-interact-right';
38+
import { NotebooksNoDuplicateRoutines } from './notebooks/notebooks-no-duplicate-routines';
3139

3240
/*
3341
* Logger to be used for tests related to debugging
@@ -79,6 +87,11 @@ INTERACTIONS_RUNNER.addTest({
7987
fn: ProCodeInteractRight,
8088
});
8189

90+
INTERACTIONS_RUNNER.addTest({
91+
name: 'PRO def files interact right',
92+
fn: DefFilesInteractRight,
93+
});
94+
8295
INTERACTIONS_RUNNER.addTest({
8396
name: 'Disable problem reporting using comments (all)',
8497
fn: IDLDisableAllFromComments,
@@ -164,3 +177,23 @@ INTERACTIONS_RUNNER.addTest({
164177
name: 'Notebooks report problems right for implied print and standalone expressions',
165178
fn: NotebookImpliedPrintProblemReporting,
166179
});
180+
181+
INTERACTIONS_RUNNER.addTest({
182+
name: 'Detect duplicate globals from two PRO files',
183+
fn: DuplicateGlobals,
184+
});
185+
186+
INTERACTIONS_RUNNER.addTest({
187+
name: 'Detect duplicate globals from PRO and def files',
188+
fn: DuplicateGlobalsFromDefs,
189+
});
190+
191+
INTERACTIONS_RUNNER.addTest({
192+
name: 'Detect duplicate globals from only def files',
193+
fn: DuplicateGlobalsFromOnlyDefs,
194+
});
195+
196+
INTERACTIONS_RUNNER.addTest({
197+
name: 'Advanced change detection from routines changing',
198+
fn: RoutineChange,
199+
});
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
import { GetExtensionPath, Sleep } from '@idl/shared';
2+
import { OpenFileInVSCode, ReplaceDocumentContent } from '@idl/vscode/shared';
3+
import expect from 'expect';
4+
import { readFileSync } from 'fs';
5+
import * as vscode from 'vscode';
6+
import {
7+
SemanticTokens,
8+
SemanticTokensParams,
9+
TextDocumentPositionParams,
10+
} from 'vscode-languageserver';
11+
12+
import { CLIENT_E2E_CONFIG } from '../../client-e2e-config.interface';
13+
import { RunnerFunction } from '../../runner.interface';
14+
15+
/**
16+
* Verifies working with notebooks does the right thing with changes and doesnt trigger
17+
* PRO code parsing in the language server
18+
*/
19+
export const DefFilesInteractRight: RunnerFunction = async (init) => {
20+
const doc = await OpenFileInVSCode(
21+
GetExtensionPath('idl/test/client-e2e/def-files/testclente2e.pro.def')
22+
);
23+
24+
// short pause to make sure we open and parse
25+
await Sleep(CLIENT_E2E_CONFIG.DELAYS.DEFAULT);
26+
27+
/**
28+
* Get URi for the notebook
29+
*/
30+
const uri = doc.uri.toString();
31+
32+
/**
33+
* Event params for LSP user interaction
34+
*/
35+
const hoverParams: TextDocumentPositionParams = {
36+
textDocument: {
37+
uri,
38+
},
39+
position: {
40+
line: 25,
41+
character: 11,
42+
},
43+
};
44+
45+
// verify hover has return
46+
expect(
47+
await init.client.client.sendRequest('textDocument/hover', hoverParams)
48+
).toBeTruthy();
49+
50+
// verify definition has return
51+
expect(
52+
await init.client.client.sendRequest('textDocument/definition', hoverParams)
53+
).toBeFalsy();
54+
55+
/**
56+
* Event params for LSP user interaction
57+
*/
58+
const completionParams: TextDocumentPositionParams = {
59+
textDocument: {
60+
uri,
61+
},
62+
position: {
63+
line: 26,
64+
character: 0,
65+
},
66+
};
67+
68+
// verify definition has return
69+
expect(
70+
await init.client.client.sendRequest(
71+
'textDocument/completion',
72+
completionParams
73+
)
74+
).toBeFalsy();
75+
76+
/**
77+
* Event params for LSP semantic token request
78+
*/
79+
const tokenParams: SemanticTokensParams = {
80+
textDocument: {
81+
uri: uri,
82+
},
83+
};
84+
85+
// verify semantic tokens
86+
expect(
87+
(await init.client.client.sendRequest(
88+
'textDocument/semanticTokens/full',
89+
tokenParams
90+
)) as SemanticTokens
91+
).toBeFalsy();
92+
93+
/**
94+
* Get number of original diagnostics
95+
*/
96+
const nOrig = vscode.languages.getDiagnostics(doc.uri).length;
97+
98+
// replace the content in our document
99+
await ReplaceDocumentContent(
100+
doc,
101+
readFileSync(
102+
GetExtensionPath(
103+
'idl/test/client-e2e/def-files/testclente2e-changes.pro.def'
104+
),
105+
'utf-8'
106+
)
107+
);
108+
109+
// short pause
110+
await Sleep(CLIENT_E2E_CONFIG.DELAYS.DEFAULT);
111+
112+
// verify problems
113+
expect(vscode.languages.getDiagnostics(doc.uri).length).toEqual(nOrig);
114+
};

apps/client-e2e/src/tests/interactions/idl-json-interact-right.ts renamed to apps/client-e2e/src/tests/interactions/basic-interactions/idl-json-interact-right.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
TextDocumentPositionParams,
99
} from 'vscode-languageserver';
1010

11-
import { RunnerFunction } from '../runner.interface';
11+
import { CLIENT_E2E_CONFIG } from '../../client-e2e-config.interface';
12+
import { RunnerFunction } from '../../runner.interface';
1213

1314
/**
1415
* Verifies idl.json does the right thing with changes and doesnt trigger
@@ -20,7 +21,7 @@ export const IDLJSONInteractRight: RunnerFunction = async (init) => {
2021
);
2122

2223
// short pause to make sure we open and parse
23-
await Sleep(250);
24+
await Sleep(CLIENT_E2E_CONFIG.DELAYS.DEFAULT);
2425

2526
/**
2627
* Get number of original diagnostics
@@ -37,7 +38,7 @@ export const IDLJSONInteractRight: RunnerFunction = async (init) => {
3738
);
3839

3940
// short pause
40-
await Sleep(250);
41+
await Sleep(CLIENT_E2E_CONFIG.DELAYS.DEFAULT);
4142

4243
// verify problems
4344
expect(vscode.languages.getDiagnostics(doc.uri).length).toEqual(nOrig);

0 commit comments

Comments
 (0)