Skip to content

Commit

Permalink
Revert "feat: add opcodes profile information (#45)"
Browse files Browse the repository at this point in the history
This reverts commit 78e529a.
  • Loading branch information
kobyhallx authored Nov 24, 2023
1 parent 78e529a commit 33bb1f5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 280 deletions.
7 changes: 1 addition & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"cSpell.words": [
"acir",
"brillig",
"nargo"
]
}
}
24 changes: 0 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,8 @@
{
"command": "noir.restart",
"title": "Noir: Restart Language Server"
},
{
"command": "nargo.profile.hide",
"title": "Noir: Hide Profile information",
"when": "noir.profileInfoPresent == true"
}
],
"menus": {
"commandPalette": [
{
"command": "nargo.profile.hide",
"when": "noir.profileInfoPresent == true"
}
]
},
"snippets": [
{
"language": "noir",
Expand All @@ -73,17 +60,6 @@
"path": "./syntaxes/noir.tmLanguage.json"
}
],
"keybindings": [{
"command": "nargo.profile.hide",
"key": "shift+alt+ctrl+n, shift+p",
"mac": "shift+alt+cmd+n shift+p",
"when": "noir.profileInfoPresent"
},
{
"command": "nargo.profile",
"key": "shift+alt+ctrl+n p",
"mac": "shift+alt+cmd+n p"
}],
"configuration": {
"type": "object",
"title": "Noir Language Server configuration",
Expand Down
162 changes: 0 additions & 162 deletions src/EditorLineDecorationManager.ts

This file was deleted.

33 changes: 1 addition & 32 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
ServerCapabilities,
ServerOptions,
TextDocumentFilter,

} from "vscode-languageclient/node";

import { extensionName, languageId } from "./constants";
Expand All @@ -47,30 +46,6 @@ type NargoTests = {
}[];
};

export type FileId = number;
export type FileInfo = {
path: string;
source: string;
};

export type Span = {
start: number;
end: number;
};
export type SpanInFile = {
file: FileId;
span: Span;
};
export type OpcodesCounts = {
acir_size: number;
brillig_size: number;
};

export type NargoProfileRunResult = {
file_map: Map<FileId, FileInfo>;
opcodes_counts: [[SpanInFile, OpcodesCounts]];
};

type RunTestResult = {
id: string;
result: "pass" | "fail" | "error";
Expand Down Expand Up @@ -106,7 +81,7 @@ export default class Client extends LanguageClient {
#command: string;
#args: string[];
#output: OutputChannel;
profileRunResult: NargoProfileRunResult;

// This function wasn't added until vscode 1.81.0 so fake the type
#testController: TestController & {
invalidateTestResults?: (item: TestItem) => void;
Expand Down Expand Up @@ -200,12 +175,6 @@ export default class Client extends LanguageClient {
});
}

async refreshProfileInfo() {
const response = await this.sendRequest<NargoProfileRunResult>("nargo/profile/run", { package: ""});

this.profileRunResult = response;
}

async #fetchTests() {
const response = await this.sendRequest<NargoTests[]>("nargo/tests", {});

Expand Down
Loading

0 comments on commit 33bb1f5

Please sign in to comment.