mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Remove server download and update checks
This commit is contained in:
parent
45d2262963
commit
d5b4aa3037
2 changed files with 2 additions and 230 deletions
|
@ -3,50 +3,5 @@ import { log } from './util';
|
|||
|
||||
export class PersistentState {
|
||||
constructor(private readonly globalState: vscode.Memento) {
|
||||
const { lastCheck, nightlyReleaseId, serverVersion } = this;
|
||||
log.info("PersistentState:", { lastCheck, nightlyReleaseId, serverVersion });
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to check for *nightly* updates once an hour.
|
||||
*/
|
||||
get lastCheck(): number | undefined {
|
||||
return this.globalState.get("lastCheck");
|
||||
}
|
||||
async updateLastCheck(value: number) {
|
||||
await this.globalState.update("lastCheck", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Release id of the *nightly* extension.
|
||||
* Used to check if we should update.
|
||||
*/
|
||||
get nightlyReleaseId(): number | undefined {
|
||||
return this.globalState.get("releaseId");
|
||||
}
|
||||
async updateNightlyReleaseId(value: number | undefined) {
|
||||
await this.globalState.update("releaseId", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Version of the extension that installed the server.
|
||||
* Used to check if we need to update the server.
|
||||
*/
|
||||
get serverVersion(): string | undefined {
|
||||
return this.globalState.get("serverVersion");
|
||||
}
|
||||
async updateServerVersion(value: string | undefined) {
|
||||
await this.globalState.update("serverVersion", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Github authorization token.
|
||||
* This is used for API requests against the Github API.
|
||||
*/
|
||||
get githubToken(): string | undefined {
|
||||
return this.globalState.get("githubToken");
|
||||
}
|
||||
async updateGithubToken(value: string | undefined) {
|
||||
await this.globalState.update("githubToken", value);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue