Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-Analyze project or all projects #3089

Merged
merged 75 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
d9ede2e
Initial harsh version of analyze commands that can re-analyze full so…
savpek May 25, 2019
14baae3
Reverted invalid changes from settings.json.
savpek May 26, 2019
f5d0162
Merge remote-tracking branch 'upstream/master' into feature/analyze-c…
savpek May 26, 2019
170d18f
Updated to match new events.
savpek May 26, 2019
d6163a8
Fixes to work with newer eventing.
savpek May 26, 2019
bf70916
Temporary ignore of validate project.
savpek May 28, 2019
f31c723
Added dummy statusbar for analyze progress.
savpek May 31, 2019
97e16d0
Status bar works as expected.
savpek May 31, 2019
08ae6be
Implemented diagnostic provider in to of rxjs.
savpek May 31, 2019
b6d6965
Testing tests against local build.
savpek May 31, 2019
42779b5
Tweaks for provider.
savpek May 31, 2019
53420cb
Streamlined large vs small workspace analysis.
savpek May 31, 2019
204e7de
Restored latest as version.
savpek May 31, 2019
b46d8d1
Fix for test settings.json.
savpek May 31, 2019
3a9e9f1
Merge branch 'master' into feature/analyze-commands
savpek May 31, 2019
060560c
Comment tweaks.
savpek May 31, 2019
76eea45
Merge branch 'feature/analyze-commands' of https://github.com/savpek/…
savpek May 31, 2019
750c253
Merge remote-tracking branch 'upstream/master' into feature/analyze-c…
savpek Jul 7, 2019
9b715cc
Merge.
savpek Jul 7, 2019
640b4cc
npm fix.
savpek Jul 7, 2019
158b4c0
Enabled skipped test.
savpek Jul 7, 2019
975e610
Test tweak.
savpek Jul 7, 2019
c22f6bd
Tweaked test poll routine.
savpek Jul 7, 2019
2a0e0e5
Enable roslyn analyzers for diag tests.
savpek Jul 7, 2019
0fc52b0
Enabled analyzers with sln.
savpek Jul 7, 2019
5cd74d0
Updated request to match latest version of o-roslyn side.
savpek Jul 7, 2019
9c1bb31
First dummy version of re-analysis test.
savpek Jul 7, 2019
50bf6e2
Temporary local omnisharp.exe.
savpek Jul 7, 2019
77ebd2f
ISomeInterface in correct form.
savpek Jul 8, 2019
8e39cfe
Implemented tests based on events from analyzers.
savpek Jul 8, 2019
ddb92f4
Restored non local build for testing.
savpek Jul 8, 2019
dd0438f
Added unit tests for background work observer.
savpek Jul 8, 2019
0cdec6c
Review fixes.
savpek Jul 10, 2019
8c873c6
Temporary enable of local build.
savpek Jul 10, 2019
b65fbfd
Added missing file for tests.
savpek Jul 10, 2019
cadd127
Added tests for small and large workspace.
savpek Jul 10, 2019
2a5c764
Enable default build instead of local one.
savpek Jul 10, 2019
9843d19
Test tweaks.
savpek Jul 10, 2019
77156bd
Added missing test assets to sln tests.
savpek Jul 10, 2019
87e9b35
Removed accidently added configurations.
savpek Jul 10, 2019
e797bec
Enabled skipped tests because re-analyze is merged in omnisharp-roslyn.
savpek Jul 11, 2019
884fa30
Fix for test.
savpek Jul 11, 2019
0cf278d
Attempt to make tests more robust.
savpek Jul 11, 2019
4d6e2ac
Added poll with better messages and improved cleanup robustness.
savpek Jul 11, 2019
674273f
Made robuster version of restore routine during testing.
savpek Jul 11, 2019
e03e280
Fixes for git cleanup.
savpek Jul 11, 2019
0148843
Testing if travis is just slow during tests.
savpek Jul 11, 2019
d8b9d4f
Disabled git logging.
savpek Jul 11, 2019
9c20469
Expect that after diagnostic event there may be throttling before dia…
savpek Jul 11, 2019
9b51e58
Testing build robustnes.
savpek Jul 11, 2019
9d33808
Merge branch 'master' into feature/analyze-commands
savpek Jul 13, 2019
d4a8a6b
Attempt to make test more robust.
savpek Jul 13, 2019
0d5f90e
Merge branch 'feature/analyze-commands' of https://github.com/savpek/…
savpek Jul 13, 2019
0552631
Testing test robustnes.
savpek Jul 13, 2019
131c4c5
Testing test robustnes.
savpek Jul 13, 2019
2e75ec7
Added missing await.
savpek Jul 14, 2019
cf71b0b
Merge branch 'master' into feature/analyze-commands
savpek Jul 16, 2019
e576af5
Merge branch 'master' into feature/analyze-commands
savpek Jul 28, 2019
7dedf21
Merge branch 'master' into feature/analyze-commands
savpek Jul 30, 2019
5b91ff9
Merge branch 'master' into feature/analyze-commands
savpek Aug 5, 2019
5260bef
Merge branch 'master' into feature/analyze-commands
savpek Aug 30, 2019
edb3ebf
Merge branch 'master' into feature/analyze-commands
savpek Sep 5, 2019
d3d7f2b
Merge branch 'master' into feature/analyze-commands
savpek Sep 22, 2019
074bf66
Rebuild
savpek Sep 29, 2019
b51c7ba
Merge branch 'master' into feature/analyze-commands
savpek Oct 12, 2019
3f1c9a1
Testing stability
savpek Oct 12, 2019
76536af
Testing stability
savpek Oct 12, 2019
cd96edd
Merge
savpek Dec 1, 2019
482878f
Fix for invalid json at tsconfig.json
savpek Dec 1, 2019
0f75a9c
Mergefixes
savpek Dec 1, 2019
c6e0976
Fixes to make linter happy
savpek Dec 5, 2019
180be70
Testfixes
savpek Dec 5, 2019
69a7bc3
Review fixes for naming
savpek Dec 5, 2019
d7fe9af
Merge branch 'master' into feature/analyze-commands
JoeRobich Dec 5, 2019
431326b
Merge branch 'master' into feature/analyze-commands
JoeRobich Dec 5, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@

"tslint.rulesDirectory": "node_modules/tslint-microsoft-contrib",
"typescript.tsdk": "./node_modules/typescript/lib",
"mocha.enabled": true
"mocha.enabled": true,
"omnisharp.autoStart": false
}
30 changes: 20 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,12 @@
"items": {
"type": "string"
},
"description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
"description": "Array of symbol server URLs (example: http://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
"default": []
},
"searchMicrosoftSymbolServer": {
"type": "boolean",
"description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
"description": "If 'true' the Microsoft Symbol server (https://msdl.microsoft.com/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
"default": false
},
"cachePath": {
Expand Down Expand Up @@ -798,6 +798,16 @@
"title": "Select Project",
"category": "OmniSharp"
},
{
"command": "o.reanalyze.allProjects",
"title": "Analyze all projects",
"category": "OmniSharp"
},
{
"command": "o.reanalyze.currentProject",
"title": "Analyze current project",
"category": "OmniSharp"
},
{
"command": "dotnet.generateAssets",
"title": "Generate Assets for Build and Debug",
Expand Down Expand Up @@ -1355,12 +1365,12 @@
"items": {
"type": "string"
},
"description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
"description": "Array of symbol server URLs (example: http://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
"default": []
},
"searchMicrosoftSymbolServer": {
"type": "boolean",
"description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
"description": "If 'true' the Microsoft Symbol server (https://msdl.microsoft.com/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
"default": false
},
"cachePath": {
Expand Down Expand Up @@ -1766,12 +1776,12 @@
"items": {
"type": "string"
},
"description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
"description": "Array of symbol server URLs (example: http://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
"default": []
},
"searchMicrosoftSymbolServer": {
"type": "boolean",
"description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
"description": "If 'true' the Microsoft Symbol server (https://msdl.microsoft.com/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
"default": false
},
"cachePath": {
Expand Down Expand Up @@ -2423,12 +2433,12 @@
"items": {
"type": "string"
},
"description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
"description": "Array of symbol server URLs (example: http://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
"default": []
},
"searchMicrosoftSymbolServer": {
"type": "boolean",
"description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
"description": "If 'true' the Microsoft Symbol server (https://msdl.microsoft.com/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
"default": false
},
"cachePath": {
Expand Down Expand Up @@ -2834,12 +2844,12 @@
"items": {
"type": "string"
},
"description": "Array of symbol server URLs (example: http\u200b://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
"description": "Array of symbol server URLs (example: http://MyExampleSymbolServer) or directories (example: /build/symbols) to search for .pdb files. These directories will be searched in addition to the default locations -- next to the module and the path where the pdb was originally dropped to.",
"default": []
},
"searchMicrosoftSymbolServer": {
"type": "boolean",
"description": "If 'true' the Microsoft Symbol server (https\u200b://msdl.microsoft.com\u200b/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
"description": "If 'true' the Microsoft Symbol server (https://msdl.microsoft.com/download/symbols) is added to the symbols search path. If unspecified, this option defaults to 'false'.",
"default": false
},
"cachePath": {
Expand Down
13 changes: 13 additions & 0 deletions src/features/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export default function registerCommands(server: OmniSharpServer, platformInfo:
disposable.add(vscode.commands.registerCommand('dotnet.restore.project', async () => pickProjectAndDotnetRestore(server, eventStream)));
disposable.add(vscode.commands.registerCommand('dotnet.restore.all', async () => dotnetRestoreAllProjects(server, eventStream)));

disposable.add(vscode.commands.registerCommand('o.reanalyze.allProjects', async () => reAnalyzeAllProjects(server, eventStream)));
disposable.add(vscode.commands.registerCommand('o.reanalyze.currentProject', async () => reAnalyzeCurrentProject(server, eventStream)));

// register empty handler for csharp.installDebugger
// running the command activates the extension, which is all we need for installation to kickoff
disposable.add(vscode.commands.registerCommand('csharp.downloadDebugger', () => { }));
Expand Down Expand Up @@ -132,6 +135,16 @@ async function pickProjectAndDotnetRestore(server: OmniSharpServer, eventStream:
}
}

async function reAnalyzeAllProjects(server: OmniSharpServer, eventStream: EventStream): Promise<void> {
await serverUtils.reAnalyze(server, {});
}

async function reAnalyzeCurrentProject(server: OmniSharpServer, eventStream: EventStream): Promise<void> {
await serverUtils.reAnalyze(server, {
fileName: vscode.window.activeTextEditor.document.uri.fsPath
});
}

async function dotnetRestoreAllProjects(server: OmniSharpServer, eventStream: EventStream): Promise<void> {
let descriptors = await getProjectDescriptors(server);
eventStream.post(new CommandDotNetRestoreStart());
Expand Down
Loading