Skip to content

Commit

Permalink
Enable always using the latest nightly Dafny release (#196)
Browse files Browse the repository at this point in the history
### Changes

Add an option "latest nightly" at the end of the "Preferred version" list, that will cause the IDE to download and use the latest nightly Dafny release

### Testing

Manually configured the IDE to use the latest nightly and used that, and the same for 3.7.
  • Loading branch information
keyboardDrummer authored Jul 12, 2022
1 parent bea5906 commit dc0ada8
Show file tree
Hide file tree
Showing 9 changed files with 224 additions and 45 deletions.
155 changes: 147 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@
"3.5.0",
"3.4.2",
"3.3.0",
"3.2.0"
"3.2.0",
"latest nightly"
],
"default": "latest",
"description": "The preferred Dafny version to use (overriden by custom compiler and language server paths, requires restart)."
Expand Down Expand Up @@ -275,7 +276,7 @@
"devDependencies": {
"@types/glob": "^7.1.4",
"@types/mocha": "^9.1.0",
"@types/node": "^12.12.70",
"@types/node": "^16.11.43",
"@types/promise.any": "^2.0.0",
"@types/proxyquire": "^1.3.28",
"@types/vscode": "^1.68.0",
Expand All @@ -286,10 +287,11 @@
"eslint": "^7.32.0",
"glob": "^7.1.7",
"mocha": "^9.2.0",
"node-fetch": "^3.2.6",
"ts-loader": "^9.2.5",
"typescript": "^4.4.3",
"webpack": "^5.52.1",
"webpack-cli": "^4.5.0"
"webpack-cli": "^4.10.0"
},
"dependencies": {
"extract-zip": "^2.0.1",
Expand Down
3 changes: 2 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export namespace DotnetConstants {
}

export namespace LanguageServerConstants {
export const Latest = 'latest';
export const LatestStable = 'latest';
export const LatestNightly = 'latest nightly';
export const LatestVersion = '3.7.0';
export const UnknownVersion = 'unknown';
export const DafnyGitUrl = 'https://github.com/dafny-lang/dafny.git';
Expand Down
3 changes: 1 addition & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export async function deactivate(): Promise<void> {
export async function restartServer(): Promise<void> {
await extensionRuntime?.restart();
}

class ExtensionRuntime {
private readonly installer: DafnyInstaller;
private client?: DafnyLanguageClient;
Expand All @@ -58,7 +57,7 @@ class ExtensionRuntime {
return;
}
await createAndRegisterDafnyIntegration(this.context, this.client!, this.languageServerVersion!);
commands.registerCommand(DafnyCommands.RestartServer, restartServer),
commands.registerCommand(DafnyCommands.RestartServer, restartServer);
this.statusOutput.appendLine('Dafny is ready');
}

Expand Down
Loading

0 comments on commit dc0ada8

Please sign in to comment.