Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
znorman-harris committed Aug 22, 2024
2 parents f3ead73 + dcf2cf2 commit 384ea4a
Show file tree
Hide file tree
Showing 731 changed files with 19,812 additions and 10,511 deletions.
9 changes: 7 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,18 @@
"extends": ["plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"no-shadow": "error"
"no-shadow": "error",
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
}
]
}
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ compliance
apps/test-tokenizer/src/test-maker/cache/cache.json
.angular

/.nx/cache
/.nx/cache
/.nx/workspace-data
3 changes: 2 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ package-lock.json
perf.txt
problems.json
tsconfig.base.json
webpack.base.config.js
webpack.node.config.js
webpack.vscode.config.js
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,36 @@ Document some advanced types so users may try them out and provide feedback. The

- Read more in the extension documentation

## 4.6.0 - August 2024

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.

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.

Fixed an issue where documentation after a routine definition wasn't properly reporting problems.

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!

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.

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.

Updated the "Hello World" IDL Notebook example with this new behavior.

Improve auto-complete for executive commands.

For `.compile` we now have auto-complete for files known to the language server.

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.

> See the new documentation page [here](https://interactive-data-language.github.io/vscode-idl/types/routine_definition_files.html) for more information.
Fixed an issue where we were not correctly detecting unclosed quotes when there was an escaped quote within the content of the string.

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.

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.

## 4.5.1 - May 2024

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:
Expand Down
10 changes: 3 additions & 7 deletions apps/client-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"main": "apps/client-e2e/src/main.ts",
"tsConfig": "apps/client-e2e/tsconfig.app.json",
"assets": [],
"webpackConfig": "webpack.base.config.js",
"webpackConfig": "webpack.vscode.config.js",
"externalDependencies": "none",
"target": "node",
"compiler": "tsc"
Expand Down Expand Up @@ -44,17 +44,13 @@
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/client-e2e/**/*.ts"]
}
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/apps/client-e2e"],
"options": {
"jestConfig": "apps/client-e2e/jest.config.ts",
"passWithNoTests": true
"jestConfig": "apps/client-e2e/jest.config.ts"
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion apps/client-e2e/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function run(): Promise<void> {
/**
* Manually specify IDL folder
*/
const idlDir = FindIDL();
const idlDir = FindIDL('idl90');

// validate we know where it is
if (!idlDir) {
Expand Down
4 changes: 2 additions & 2 deletions apps/client-e2e/src/tests/client-e2e-config.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const CLIENT_E2E_CONFIG = {
DELAYS: {
/** Problem delay for PRO files and anything else */
DEFAULT: 1000,
/** Problem delay for IDL Notebooks */
PROBLEMS_NOTEBOOK: 1000,
/** Delay for tests using problem reporting and notebooks */
PROBLEMS_NOTEBOOK: 2000,
},
};
75 changes: 54 additions & 21 deletions apps/client-e2e/src/tests/interactions/_interactions-runner.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
import { Logger } from '@idl/logger';

import { Runner } from '../runner.class';
import { AddDocs } from './add-docs';
import { DefFilesInteractRight } from './basic-interactions/def-files-interact-right';
import { IDLJSONInteractRight } from './basic-interactions/idl-json-interact-right';
import { IndexIDLFolderRightAndOpenEditClose } from './basic-interactions/index-idl-folder-right-and-open-edit-close';
import { ProCodeInteractRight } from './basic-interactions/pro-code-interacts-right';
import { TasksInteractRight } from './basic-interactions/tasks-interact-right';
import { DuplicateGlobals } from './change-detection/duplicate-globals';
import { DuplicateGlobalsFromDefs } from './change-detection/duplicate-globals-from-defs';
import { DuplicateGlobalsFromOnlyDefs } from './change-detection/duplicate-globals-from-only-defs';
import { RoutineChange } from './change-detection/routine-change';
import {
ExecuteCodeActionsWithEditForNotebook,
ExecuteCodeActionsWithEditForPROFile,
} from './execute-code-actions-with-edits';
import { IDLDisableAllFromSettings } from './idl-disable-all-from-setting';
import { IDLDisableAllFromSettingsForNotebook } from './idl-disable-all-from-setting-for-notebook';
import {
IDLDisableAllFromComments,
IDLDisableLinesFromComments,
} from './idl-disable-from-comments';
import { IDLDisableIndividualsFromSettings } from './idl-disable-individuals-from-setting';
import { IDLDisableIndividualsFromSettingsForNotebook } from './idl-disable-individuals-from-setting-for-notebook';
import { IDLJSONInteractRight } from './idl-json-interact-right';
import { IndexIDLFolderRightAndOpenEditClose } from './index-idl-folder-right-and-open-edit-close';
import { MigrateCodeDL30, MigrateCodeDL30_2 } from './migrate-code-dl-3.0';
import { NotebookImpliedPrintProblemReporting } from './notebook-implied-print-problem-reporting';
import { NotebookProblemsTrackRight } from './notebook-problems-track-right';
import { NotebookCompletionBasic } from './notebooks-completion-basic';
import { NotebooksInteractRight } from './notebooks-interact-right';
import { NotebooksNoDuplicateRoutines } from './notebooks-no-duplicate-routines';
} from './code-actions/execute-code-actions-with-edits';
import {
ProCodeCodeActionsExisting,
ProCodeCodeActionsNoExisting,
} from './pro-code-code-actions';
import { ProCodeInteractRight } from './pro-code-interacts-right';
import { TasksInteractRight } from './tasks-interact-right';
} from './code-actions/pro-code-code-actions';
import { AddDocs } from './commands/add-docs';
import {
MigrateCodeDL30,
MigrateCodeDL30_2,
} from './commands/migrate-code-dl-3.0';
import { IDLDisableAllFromSettings } from './disable-problems/idl-disable-all-from-setting';
import { IDLDisableAllFromSettingsForNotebook } from './disable-problems/idl-disable-all-from-setting-for-notebook';
import {
IDLDisableAllFromComments,
IDLDisableLinesFromComments,
} from './disable-problems/idl-disable-from-comments';
import { IDLDisableIndividualsFromSettings } from './disable-problems/idl-disable-individuals-from-setting';
import { IDLDisableIndividualsFromSettingsForNotebook } from './disable-problems/idl-disable-individuals-from-setting-for-notebook';
import { NotebookImpliedPrintProblemReporting } from './notebooks/notebook-implied-print-problem-reporting';
import { NotebookProblemsTrackRight } from './notebooks/notebook-problems-track-right';
import { NotebookCompletionBasic } from './notebooks/notebooks-completion-basic';
import { NotebooksInteractRight } from './notebooks/notebooks-interact-right';
import { NotebooksNoDuplicateRoutines } from './notebooks/notebooks-no-duplicate-routines';

/*
* Logger to be used for tests related to debugging
Expand Down Expand Up @@ -79,6 +87,11 @@ INTERACTIONS_RUNNER.addTest({
fn: ProCodeInteractRight,
});

INTERACTIONS_RUNNER.addTest({
name: 'PRO def files interact right',
fn: DefFilesInteractRight,
});

INTERACTIONS_RUNNER.addTest({
name: 'Disable problem reporting using comments (all)',
fn: IDLDisableAllFromComments,
Expand Down Expand Up @@ -164,3 +177,23 @@ INTERACTIONS_RUNNER.addTest({
name: 'Notebooks report problems right for implied print and standalone expressions',
fn: NotebookImpliedPrintProblemReporting,
});

INTERACTIONS_RUNNER.addTest({
name: 'Detect duplicate globals from two PRO files',
fn: DuplicateGlobals,
});

INTERACTIONS_RUNNER.addTest({
name: 'Detect duplicate globals from PRO and def files',
fn: DuplicateGlobalsFromDefs,
});

INTERACTIONS_RUNNER.addTest({
name: 'Detect duplicate globals from only def files',
fn: DuplicateGlobalsFromOnlyDefs,
});

INTERACTIONS_RUNNER.addTest({
name: 'Advanced change detection from routines changing',
fn: RoutineChange,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import { GetExtensionPath, Sleep } from '@idl/shared';
import { OpenFileInVSCode, ReplaceDocumentContent } from '@idl/vscode/shared';
import expect from 'expect';
import { readFileSync } from 'fs';
import * as vscode from 'vscode';
import {
SemanticTokens,
SemanticTokensParams,
TextDocumentPositionParams,
} from 'vscode-languageserver';

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

/**
* Verifies working with notebooks does the right thing with changes and doesnt trigger
* PRO code parsing in the language server
*/
export const DefFilesInteractRight: RunnerFunction = async (init) => {
const doc = await OpenFileInVSCode(
GetExtensionPath('idl/test/client-e2e/def-files/testclente2e.pro.def')
);

// short pause to make sure we open and parse
await Sleep(CLIENT_E2E_CONFIG.DELAYS.DEFAULT);

/**
* Get URi for the notebook
*/
const uri = doc.uri.toString();

/**
* Event params for LSP user interaction
*/
const hoverParams: TextDocumentPositionParams = {
textDocument: {
uri,
},
position: {
line: 25,
character: 11,
},
};

// verify hover has return
expect(
await init.client.client.sendRequest('textDocument/hover', hoverParams)
).toBeTruthy();

// verify definition has return
expect(
await init.client.client.sendRequest('textDocument/definition', hoverParams)
).toBeFalsy();

/**
* Event params for LSP user interaction
*/
const completionParams: TextDocumentPositionParams = {
textDocument: {
uri,
},
position: {
line: 26,
character: 0,
},
};

// verify definition has return
expect(
await init.client.client.sendRequest(
'textDocument/completion',
completionParams
)
).toBeFalsy();

/**
* Event params for LSP semantic token request
*/
const tokenParams: SemanticTokensParams = {
textDocument: {
uri: uri,
},
};

// verify semantic tokens
expect(
(await init.client.client.sendRequest(
'textDocument/semanticTokens/full',
tokenParams
)) as SemanticTokens
).toBeFalsy();

/**
* Get number of original diagnostics
*/
const nOrig = vscode.languages.getDiagnostics(doc.uri).length;

// replace the content in our document
await ReplaceDocumentContent(
doc,
readFileSync(
GetExtensionPath(
'idl/test/client-e2e/def-files/testclente2e-changes.pro.def'
),
'utf-8'
)
);

// short pause
await Sleep(CLIENT_E2E_CONFIG.DELAYS.DEFAULT);

// verify problems
expect(vscode.languages.getDiagnostics(doc.uri).length).toEqual(nOrig);
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
TextDocumentPositionParams,
} from 'vscode-languageserver';

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

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

// short pause to make sure we open and parse
await Sleep(250);
await Sleep(CLIENT_E2E_CONFIG.DELAYS.DEFAULT);

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

// short pause
await Sleep(250);
await Sleep(CLIENT_E2E_CONFIG.DELAYS.DEFAULT);

// verify problems
expect(vscode.languages.getDiagnostics(doc.uri).length).toEqual(nOrig);
Expand Down
Loading

0 comments on commit 384ea4a

Please sign in to comment.