From fcf9f5d9d73f83d6d15ff54ab275b3920e60410a Mon Sep 17 00:00:00 2001 From: Linard Arquint Date: Mon, 19 Jul 2021 14:21:46 +0200 Subject: [PATCH 1/2] fixes escaping of path to JAVA installation and to log directory --- server/src/Settings.ts | 2 ++ server/src/ViperServerService.ts | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/src/Settings.ts b/server/src/Settings.ts index aa105407..21bae0f8 100644 --- a/server/src/Settings.ts +++ b/server/src/Settings.ts @@ -728,11 +728,13 @@ export class Settings { return this.buildDependencyString(jarFiles); } + /* returns an escaped string */ public static viperServerJars(): string { let jarFiles = this.getAllJarsInPaths(this.settings.viperServerSettings.serverJars, false); return this.buildDependencyString(jarFiles); } + /** all paths get escaped */ public static buildDependencyString(jarFiles: string[]): string { let dependencies = ""; let concatenationSymbol = Settings.isWin ? ";" : ":"; diff --git a/server/src/ViperServerService.ts b/server/src/ViperServerService.ts index d7a60a21..63a0564d 100644 --- a/server/src/ViperServerService.ts +++ b/server/src/ViperServerService.ts @@ -194,9 +194,10 @@ export class ViperServerService extends BackendService { const customArgs = Settings.settings.viperServerSettings.customArguments; const logLevel = this.logLevelToStr(Settings.settings.preferences.logLevel); const logFile = Settings.logDirPath == null ? os.tmpdir() : Settings.logDirPath; - let command = `${javaPath} ${javaArgs} ${customArgs} --logLevel ${logLevel} --logFile ${logFile}`; + // escape `javaPath` and `logFile`: + let command = `"${javaPath}" ${javaArgs} ${customArgs} --logLevel ${logLevel} --logFile "${logFile}"`; - command = command.replace(/\$backendPaths\$/g, Settings.viperServerJars()) + command = command.replace(/\$backendPaths\$/g, Settings.viperServerJars()) // `viperServerJars()` already returns an escaped string command = command.replace(/\$backendSpecificCache\$/g, (Settings.settings.viperServerSettings.backendSpecificCache === true ? "--backendSpecificCache" : "")) command = command.replace(/\$mainMethod\$/g, "viper.server.ViperServerRunner") return command From 85a086cbc00cb5be56070ec13d24314713b3bd56 Mon Sep 17 00:00:00 2001 From: Linard Arquint Date: Mon, 19 Jul 2021 16:53:14 +0200 Subject: [PATCH 2/2] updates client/README to match the release notes of the Viper release --- client/README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/client/README.md b/client/README.md index 6c2af410..ee7c984e 100644 --- a/client/README.md +++ b/client/README.md @@ -4,11 +4,17 @@ ### Changelog -#### v.2.3.0 -* Major internal refactoring and stability improvements. -* Sound effects can now be enabled via ```viperSettings.preferences.enableSoundEffects``` (disabled by default). +#### v.2.3.0 (part of Viper v.21.07-release) +* Compatibility with latest versions of Silicon and Carbon incl. latest Viper features (e.g. `Map` types and anonymous axioms). +* Mono is no longer a requirement. +* The JAVA installation has to be version 1.8 or higher and 64-bit. * The IDE now shows non-critical warning messages. -* The syntax grammar has been updated to support the latest Viper features, e.g. ```Map``` types and anonymous axioms. +* Build version of Viper Tools (i.e. the dependencies) can be configured in the VSCode settings: + * `Stable` / `Nightly`: the latest Viper Tools in the corresponding build configuration will be used. The [Preferences](https://github.com/viperproject/viper-ide/wiki/Settings:-Preferences) specify from which URL the Viper Tools will be downloaded. The Viper Tools are not automatically updated. They only get installed when they are not present yet or when a manual update is triggered (via the command palette). The installation folder has changed for these two build versions: They always get installed to `/User/globalStorage/viper-admin.viper` where `` corresponds to `~/Library/Application Support/Code` (on macOS), `c:\Users\\AppData\Roaming\Code` (on Windows), and `~/.config/Code` (on Linux). + * `Local`: uses the Viper Tools located at the path specified as `viperSettings.paths.viperToolsPath`. +* Locating the JAVA installation has been improved. A warning appears if it cannot be uniquely identified. A fixed path to a Java installation can be provided in the settings as `viperSettings.javaSettings.javaBinary` ([more details](https://github.com/viperproject/viper-ide/wiki/Settings:-Java-Settings)). +* Sounds for a successful or failed verification can be enabled by setting `viperSettings.preferences.enableSoundEffects` to true. +* Minor bug fixes ([#23](https://github.com/viperproject/viperserver/issues/23)) #### v.2.2.5 * Introducing sound effects! 🔊 To disable or change the sounds, use ```viperSettings.paths.sfxPrefix```