Skip to content

Commit 198b050

Browse files
author
James Pogran
authored
Merge pull request #441 from glennsarti/gh-440-add-modulepath
(GH-447)(GH-440)(GH-446) Add modulepath setting and deprecate enable-file-cache
2 parents be2fae8 + 3e24d22 commit 198b050

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
66

77
## Unreleased
88

9+
- ([GH-446](https://github.com/lingua-pupuli/puppet-vscode/issues/446)) Remove deprecated --enable-file-cache option for Editor Services
10+
- ([GH-440](https://github.com/lingua-pupuli/puppet-vscode/issues/440)) Add a setting for additional modulepath
11+
- ([GH-447](https://github.com/lingua-pupuli/puppet-vscode/issues/447)) Update puppet-editor-services to [0.17.0](https://github.com/lingua-pupuli/puppet-editor-services/blob/master/CHANGELOG.md#0170---2018-12-14)
12+
913
## [0.14.0] - 2018-12-03
1014

1115
### Changed

editor-services.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"release": "0.16.0"
2+
"release": "0.17.0"
33
}

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@
280280
"verbose"
281281
]
282282
},
283+
"puppet.editorService.modulePath": {
284+
"type": "string",
285+
"default": "",
286+
"description": "Additional module paths to use when starting the Editor Services. On Windows this is delimited with a semicolon, and on all other platforms, with a colon. For example C:\\Path1;C:\\Path2"
287+
},
283288
"puppet.editorService.protocol": {
284289
"type": "string",
285290
"default": "stdio",

src/configuration.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export class ConnectionConfiguration implements IConnectionConfiguration {
1111
public host: string;
1212
public port: number;
1313
public timeout: number;
14-
public enableFileCache: boolean;
1514
public debugFilePath: string;
1615
private settings: ISettings;
1716

@@ -21,7 +20,6 @@ export class ConnectionConfiguration implements IConnectionConfiguration {
2120
this.host = this.settings.editorService.tcp.address;
2221
this.port = this.settings.editorService.tcp.port;
2322
this.timeout = this.settings.editorService.timeout;
24-
this.enableFileCache = (this.settings.editorService.featureflags.indexOf('filecache') !== -1);
2523
this.debugFilePath = this.settings.editorService.debugFilePath;
2624

2725
this._puppetInstallType = this.settings.installType;
@@ -187,10 +185,6 @@ export class ConnectionConfiguration implements IConnectionConfiguration {
187185
args.push('--local-workspace=' + vscode.workspace.workspaceFolders[0].uri.fsPath);
188186
}
189187

190-
if (this.enableFileCache) {
191-
args.push('--enable-file-cache');
192-
}
193-
194188
if (this.debugFilePath !== undefined && this.debugFilePath !== '') {
195189
args.push('--debug=' + this.debugFilePath);
196190
}

src/helpers/commandHelper.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class CommandEnvironmentHelper {
1414
): Executable {
1515
let exe: Executable = {
1616
command: this.buildExecutableCommand(settings, config),
17-
args: this.buildLanguageServerArguments(languageServerpath, settings, config),
17+
args: this.buildLanguageServerArguments(languageServerpath, settings),
1818
options: {},
1919
};
2020

@@ -64,7 +64,6 @@ export class CommandEnvironmentHelper {
6464
private static buildLanguageServerArguments(
6565
serverPath: string,
6666
settings: ISettings,
67-
config: IConnectionConfiguration,
6867
): string[] {
6968
let args = [serverPath];
7069

@@ -90,8 +89,8 @@ export class CommandEnvironmentHelper {
9089
if (vscode.workspace.workspaceFolders !== undefined) {
9190
args.push('--local-workspace=' + vscode.workspace.workspaceFolders[0].uri.fsPath);
9291
}
93-
if (config.enableFileCache) {
94-
args.push('--enable-file-cache');
92+
if (settings.editorService.modulePath !== undefined && settings.editorService.modulePath !== '') {
93+
args.push('--puppet-settings=--modulepath,' + settings.editorService.modulePath);
9594
}
9695
if (settings.editorService.debugFilePath !== undefined && settings.editorService.debugFilePath !== '') {
9796
args.push('--debug=' + settings.editorService.debugFilePath);

src/interfaces.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export interface IConnectionConfiguration {
3939
host: string;
4040
port: number;
4141
timeout: number;
42-
enableFileCache: boolean;
4342
debugFilePath: string;
4443
puppetBaseDir: string;
4544
puppetDir: string;

src/settings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface IEditorServiceSettings {
1717
docker?: IEditorServiceDockerSettings;
1818
enable?: boolean;
1919
featureflags?: string[];
20+
modulePath?: string;
2021
loglevel?: string;
2122
protocol?: ProtocolType;
2223
tcp?: IEditorServiceTCPSettings;
@@ -119,6 +120,7 @@ export function settingsFromWorkspace(): ISettings {
119120
enable: true,
120121
featureflags: [],
121122
loglevel: "normal",
123+
modulePath: "",
122124
protocol: ProtocolType.STDIO,
123125
timeout: 10,
124126
};

0 commit comments

Comments
 (0)