From 30bd0dd7f447a668be3825efd9bbc5b71155db93 Mon Sep 17 00:00:00 2001 From: Noah Santschi-Cooney Date: Fri, 12 Feb 2021 03:23:43 +0000 Subject: [PATCH] v0.9.2 --- client/src/extension.ts | 14 ++++++++++++-- client/src/net.ts | 4 ++-- package-lock.json | 2 +- package.json | 6 ++---- server/Cargo.lock | 2 +- server/Cargo.toml | 2 +- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/client/src/extension.ts b/client/src/extension.ts index 9ba64ee..9060829 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -83,24 +83,34 @@ export class Extension { if (!exists) await this.state.updateServerVersion(undefined) const release = await getReleaseInfo(this.package.version) + log.info(`got release info from Github:\n\t`, JSON.stringify(release)) const platform = platforms[`${process.arch} ${process.platform}`] if (platform === undefined) { vscode.window.showErrorMessage('Unfortunately we don\'t ship binaries for your platform yet.') + log.warn(`incompatible architecture/platform:\n\t${process.arch} ${process.platform}`) return } - if (release.tag_name === this.state.serverVersion) return + if (release.tag_name === this.state.serverVersion) { + log.info(`server version is same as extension:\n\t`, this.state.serverVersion) + return + } const artifact = release.assets.find(artifact => artifact.name === `mcshader-lsp-${platform}${(process.platform === 'win32' ? '.exe' : '')}`) + log.info(`artifact with url ${artifact.browser_download_url} found`) + const userResponse = await vscode.window.showInformationMessage( this.state.serverVersion == undefined ? `Language server version ${this.package.version} is not installed.` : `An update is available. Upgrade from ${this.state.serverVersion} to ${release.tag_name}?`, 'Download now' ) - if (userResponse !== 'Download now') return + if (userResponse !== 'Download now') { + log.info('user chose not to download server...') + return + } await download(artifact.browser_download_url, dest) diff --git a/client/src/net.ts b/client/src/net.ts index 7bd2887..14e1242 100644 --- a/client/src/net.ts +++ b/client/src/net.ts @@ -29,7 +29,7 @@ export async function getReleaseInfo(releaseTag: string): Promise const json = await response.json() if(!isRelease(json)) { - throw new TypeError('Received malformed request from Github Release API') + throw new TypeError('Received malformed request from Github Release API ' + JSON.stringify(json)) } return json } @@ -72,7 +72,7 @@ async function downloadFile( const totalBytes = Number(res.headers.get('content-length')) - log.debug('downloading file of', totalBytes, 'bytes size from', url, 'to', destFilePath) + log.debug('downloading file with', totalBytes, 'bytes size from', url, 'to', destFilePath) let readBytes = 0 res.body.on('data', (chunk: Buffer) => { diff --git a/package-lock.json b/package-lock.json index 6825759..b148cd0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vscode-mc-shader", - "version": "0.9.0", + "version": "0.9.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5ebe949..05f740c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-mc-shader", "displayName": "Minecraft GLSL Shaders", "description": "A Visual Studio Code extension for linting/etc Minecraft GLSL Shaders", - "version": "0.9.1", + "version": "0.9.2", "publisher": "Strum355", "author": "Noah Santschi-Cooney (Strum355)", "license": "MIT", @@ -19,9 +19,7 @@ ], "activationEvents": [ "onLanguage:glsl", - "workspaceContains:**/*.fsh", - "workspaceContains:**/*.vsh", - "workspaceContains:**/*.gsh" + "workspaceContains:shaders/" ], "extensionDependencies": [ "slevesque.shader" diff --git a/server/Cargo.lock b/server/Cargo.lock index e5805fd..bc5b733 100644 --- a/server/Cargo.lock +++ b/server/Cargo.lock @@ -701,7 +701,7 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "mcshader-lsp" -version = "0.1.0" +version = "0.9.2" dependencies = [ "anyhow", "bit-set", diff --git a/server/Cargo.toml b/server/Cargo.toml index 5b7f063..02d6163 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mcshader-lsp" -version = "0.1.0" +version = "0.9.2" authors = ["Noah Santschi-Cooney "] edition = "2018"