Skip to content

Commit b33cc30

Browse files
author
Alberto Iannaccone
committed
remove language server log preference
1 parent a090dfe commit b33cc30

File tree

4 files changed

+0
-59
lines changed

4 files changed

+0
-59
lines changed

Diff for: arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx

-19
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,6 @@ export class ArduinoFrontendContribution
261261
}
262262
};
263263
this.boardsServiceClientImpl.onBoardsConfigChanged(start);
264-
this.arduinoPreferences.onPreferenceChanged((event) => {
265-
if (
266-
event.preferenceName === 'arduino.language.log' &&
267-
event.newValue !== event.oldValue
268-
) {
269-
start(this.boardsServiceClientImpl.boardsConfig);
270-
}
271-
});
272264
this.arduinoPreferences.ready.then(() => {
273265
const webContents = remote.getCurrentWebContents();
274266
const zoomLevel = this.arduinoPreferences.get('arduino.window.zoomLevel');
@@ -330,16 +322,6 @@ export class ArduinoFrontendContribution
330322
return;
331323
}
332324
this.logger.info(`Starting language server: ${fqbn}`);
333-
const log = this.arduinoPreferences.get('arduino.language.log');
334-
let currentSketchPath: string | undefined = undefined;
335-
if (log) {
336-
const currentSketch = await this.sketchServiceClient.currentSketch();
337-
if (currentSketch) {
338-
currentSketchPath = await this.fileService.fsPath(
339-
new URI(currentSketch.uri)
340-
);
341-
}
342-
}
343325
const { clangdUri, cliUri, lsUri } = await this.executableService.list();
344326
const [clangdPath, cliPath, lsPath, cliConfigPath] = await Promise.all([
345327
this.fileService.fsPath(new URI(clangdUri)),
@@ -362,7 +344,6 @@ export class ArduinoFrontendContribution
362344
lsPath,
363345
cliPath,
364346
clangdPath,
365-
log: currentSketchPath ? currentSketchPath : log,
366347
cliConfigPath,
367348
board: {
368349
fqbn,

Diff for: arduino-ide-extension/src/browser/arduino-preferences.ts

-9
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ import { CompilerWarningLiterals, CompilerWarnings } from '../common/protocol';
1212
export const ArduinoConfigSchema: PreferenceSchema = {
1313
type: 'object',
1414
properties: {
15-
'arduino.language.log': {
16-
type: 'boolean',
17-
description: nls.localize(
18-
'arduino/preferences/language.log',
19-
"True if the Arduino Language Server should generate log files into the sketch folder. Otherwise, false. It's false by default."
20-
),
21-
default: false,
22-
},
2315
'arduino.compile.verbose': {
2416
type: 'boolean',
2517
description: nls.localize(
@@ -164,7 +156,6 @@ export const ArduinoConfigSchema: PreferenceSchema = {
164156
};
165157

166158
export interface ArduinoConfiguration {
167-
'arduino.language.log': boolean;
168159
'arduino.compile.verbose': boolean;
169160
'arduino.compile.warnings': CompilerWarnings;
170161
'arduino.upload.verbose': boolean;

Diff for: arduino-ide-extension/src/browser/settings.tsx

-29
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ const WINDOW_SETTING = `${ARDUINO_SETTING}.window`;
4444
// const IDE_SETTING = `${ARDUINO_SETTING}.ide`;
4545
const COMPILE_SETTING = `${ARDUINO_SETTING}.compile`;
4646
const UPLOAD_SETTING = `${ARDUINO_SETTING}.upload`;
47-
const LANGUAGE_SETTING = `${ARDUINO_SETTING}.language`;
4847
const SKETCHBOOK_SETTING = `${ARDUINO_SETTING}.sketchbook`;
4948
const AUTO_SCALE_SETTING = `${WINDOW_SETTING}.autoScale`;
5049
const ZOOM_LEVEL_SETTING = `${WINDOW_SETTING}.zoomLevel`;
@@ -53,7 +52,6 @@ const COMPILE_VERBOSE_SETTING = `${COMPILE_SETTING}.verbose`;
5352
const COMPILE_WARNINGS_SETTING = `${COMPILE_SETTING}.warnings`;
5453
const UPLOAD_VERBOSE_SETTING = `${UPLOAD_SETTING}.verbose`;
5554
const UPLOAD_VERIFY_SETTING = `${UPLOAD_SETTING}.verify`;
56-
const LANGUAGE_LOG_SETTING = `${LANGUAGE_SETTING}.log`;
5755
const SHOW_ALL_FILES_SETTING = `${SKETCHBOOK_SETTING}.showAllFiles`;
5856

5957
export interface Settings extends Index {
@@ -69,7 +67,6 @@ export interface Settings extends Index {
6967
compilerWarnings: CompilerWarnings; // `arduino.compile.warnings`
7068
verboseOnUpload: boolean; // `arduino.upload.verbose`
7169
verifyAfterUpload: boolean; // `arduino.upload.verify`
72-
enableLsLogs: boolean; // `arduino.language.log`
7370
sketchbookShowAllFiles: boolean; // `arduino.sketchbook.showAllFiles`
7471

7572
sketchbookPath: string; // CLI
@@ -127,7 +124,6 @@ export class SettingsService {
127124
compilerWarnings,
128125
verboseOnUpload,
129126
verifyAfterUpload,
130-
enableLsLogs,
131127
sketchbookShowAllFiles,
132128
cliConfig,
133129
] = await Promise.all([
@@ -151,7 +147,6 @@ export class SettingsService {
151147
this.preferenceService.get<any>(COMPILE_WARNINGS_SETTING, 'None'),
152148
this.preferenceService.get<boolean>(UPLOAD_VERBOSE_SETTING, true),
153149
this.preferenceService.get<boolean>(UPLOAD_VERIFY_SETTING, true),
154-
this.preferenceService.get<boolean>(LANGUAGE_LOG_SETTING, true),
155150
this.preferenceService.get<boolean>(SHOW_ALL_FILES_SETTING, false),
156151
this.configService.getConfiguration(),
157152
]);
@@ -169,7 +164,6 @@ export class SettingsService {
169164
compilerWarnings,
170165
verboseOnUpload,
171166
verifyAfterUpload,
172-
enableLsLogs,
173167
sketchbookShowAllFiles,
174168
additionalUrls,
175169
sketchbookPath,
@@ -249,7 +243,6 @@ export class SettingsService {
249243
compilerWarnings,
250244
verboseOnUpload,
251245
verifyAfterUpload,
252-
enableLsLogs,
253246
sketchbookPath,
254247
additionalUrls,
255248
network,
@@ -315,11 +308,6 @@ export class SettingsService {
315308
verifyAfterUpload,
316309
PreferenceScope.User
317310
),
318-
this.preferenceService.set(
319-
LANGUAGE_LOG_SETTING,
320-
enableLsLogs,
321-
PreferenceScope.User
322-
),
323311
this.preferenceService.set(
324312
SHOW_ALL_FILES_SETTING,
325313
sketchbookShowAllFiles,
@@ -581,17 +569,6 @@ export class SettingsComponent extends React.Component<
581569
'Editor Quick Suggestions'
582570
)}
583571
</label>
584-
<label className="flex-line">
585-
<input
586-
type="checkbox"
587-
checked={this.state.enableLsLogs}
588-
onChange={this.enableLsLogsDidChange}
589-
/>
590-
{nls.localize(
591-
'arduino/preferences/languageServerLogging',
592-
'Enable language server logging'
593-
)}
594-
</label>
595572
<div className="flex-line">
596573
{nls.localize(
597574
'arduino/preferences/additionalManagerURLs',
@@ -814,12 +791,6 @@ export class SettingsComponent extends React.Component<
814791
this.setState({ autoScaleInterface: event.target.checked });
815792
};
816793

817-
protected enableLsLogsDidChange = (
818-
event: React.ChangeEvent<HTMLInputElement>
819-
) => {
820-
this.setState({ enableLsLogs: event.target.checked });
821-
};
822-
823794
protected interfaceScaleDidChange = (
824795
event: React.ChangeEvent<HTMLInputElement>
825796
) => {

Diff for: i18n/en.json

-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"debuggingNotSupported": "Debugging is not supported by '{0}'"
2626
},
2727
"preferences": {
28-
"language.log": "True if the Arduino Language Server should generate log files into the sketch folder. Otherwise, false. It's false by default.",
2928
"compile.verbose": "True for verbose compile output. False by default",
3029
"compile.warnings": "Tells gcc which warning level to use. It's 'None' by default",
3130
"upload.verbose": "True for verbose upload output. False by default.",
@@ -60,7 +59,6 @@
6059
"verifyAfterUpload": "Verify code after upload",
6160
"checkForUpdates": "Check for updates on startup",
6261
"editorQuickSuggestions": "Editor Quick Suggestions",
63-
"languageServerLogging": "Enable language server logging",
6462
"additionalManagerURLs": "Additional Boards Manager URLs",
6563
"noProxy": "No proxy",
6664
"manualProxy": "Manual proxy configuration",

0 commit comments

Comments
 (0)