Skip to content

Commit 55daecf

Browse files
authored
Remove obsolete flags, stop terminating debug processes (microsoft#3016)
For microsoft#80
1 parent 724bcce commit 55daecf

File tree

16 files changed

+22
-728
lines changed

16 files changed

+22
-728
lines changed

.vscode/launch.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@
126126
"sourceMaps": true,
127127
"outFiles": [
128128
"${workspaceFolder}/out/**/*.js"
129-
]
129+
],
130+
"env": {
131+
"MOCHA_REPORTER_JUNIT": "true"
132+
}
130133
},
131134
{
132135
"name": "Unit Tests (without VS Code, *.unit.test.ts)",

build/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ exports.ExtensionRootDir = path.join(__dirname, '..');
88
const jsonFileWithListOfOldFiles = path.join(__dirname, 'existingFiles.json');
99
function getListOfExcludedFiles() {
1010
const files = JSON.parse(fs.readFileSync(jsonFileWithListOfOldFiles).toString());
11-
return files.map(file => path.join(exports.ExtensionRootDir, file));
11+
return files.map(file => path.join(exports.ExtensionRootDir, file.replace(/\//g, path.sep)));
1212
}
1313
exports.filesNotToCheck = getListOfExcludedFiles();

build/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const ExtensionRootDir = path.join(__dirname, '..');
1111
const jsonFileWithListOfOldFiles = path.join(__dirname, 'existingFiles.json');
1212
function getListOfExcludedFiles() {
1313
const files = JSON.parse(fs.readFileSync(jsonFileWithListOfOldFiles).toString()) as string[];
14-
return files.map(file => path.join(ExtensionRootDir, file));
14+
return files.map(file => path.join(ExtensionRootDir, file.replace(/\//g, path.sep)));
1515
}
1616

1717
export const filesNotToCheck: string[] = getListOfExcludedFiles();

build/tslint-rules/baseRuleWalker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the MIT License.
33
'use strict';
44
Object.defineProperty(exports, "__esModule", { value: true });
5+
const path = require("path");
56
const Lint = require("tslint");
67
const constants_1 = require("../constants");
78
class BaseRuleWalker extends Lint.RuleWalker {
@@ -11,7 +12,7 @@ class BaseRuleWalker extends Lint.RuleWalker {
1112
}
1213
sholdIgnoreCcurrentFile(node) {
1314
const sourceFile = node.getSourceFile();
14-
return sourceFile && sourceFile.fileName && this.filesToIgnore.indexOf(sourceFile.fileName) >= 0;
15+
return sourceFile && sourceFile.fileName && this.filesToIgnore.indexOf(sourceFile.fileName.replace(/\//g, path.sep)) >= 0;
1516
}
1617
}
1718
exports.BaseRuleWalker = BaseRuleWalker;

build/tslint-rules/baseRuleWalker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
'use strict';
55

6+
import * as path from 'path';
67
import * as Lint from 'tslint';
78
import * as ts from 'typescript';
89
import { filesNotToCheck } from '../constants';
@@ -11,6 +12,6 @@ export class BaseRuleWalker extends Lint.RuleWalker {
1112
private readonly filesToIgnore = filesNotToCheck;
1213
protected sholdIgnoreCcurrentFile(node: ts.Node) {
1314
const sourceFile = node.getSourceFile();
14-
return sourceFile && sourceFile.fileName && this.filesToIgnore.indexOf(sourceFile.fileName) >= 0;
15+
return sourceFile && sourceFile.fileName && this.filesToIgnore.indexOf(sourceFile.fileName.replace(/\//g, path.sep)) >= 0;
1516
}
1617
}

build/tslint-rules/messagesMustBeLocalizedRule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const methodNames = [
1212
// From IOutputChannel (vscode.OutputChannel)
1313
'appendLine', 'appendLine'
1414
];
15-
const failureMessage = 'Messages must be localized in the Python Extension';
15+
const failureMessage = 'Messages must be localized in the Python Extension (use src/client/common/utils/localize.ts)';
1616
class NoStringLiteralsInMessages extends baseRuleWalker_1.BaseRuleWalker {
1717
visitCallExpression(node) {
1818
const prop = node.expression;

gulpfile.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const copyrightHeaders = [copyrightHeader.join('\n'), copyrightHeader.join('\r\n
8484

8585
gulp.task('precommit', (done) => run({ exitOnError: true, mode: 'staged' }, done));
8686

87-
gulp.task('hygiene-watch', () => gulp.watch(tsFilter, debounce(() => run({ mode: 'changes', skipFormatCheck: true, skipIndentationCheck: true, skipCopyrightCheck: true }), 100)));
87+
gulp.task('hygiene-watch', () => gulp.watch(tsFilter, gulp.series('hygiene-modified')));
8888

8989
gulp.task('hygiene', (done) => run({ mode: 'all', skipFormatCheck: true, skipIndentationCheck: true }, done));
9090

@@ -533,15 +533,15 @@ function getModifiedFilesSync() {
533533
.split(/\r?\n/)
534534
.filter(l => !!l)
535535
.filter(l => l.length > 0)
536-
.map(l => l.trim())
536+
.map(l => l.trim().replace(/\//g, path.sep))
537537
.map(l => path.join(__dirname, l));
538538
} else {
539539
const out = cp.execSync('git status -u -s', { encoding: 'utf8' });
540540
return out
541541
.split(/\r?\n/)
542542
.filter(l => !!l)
543543
.filter(l => _.intersection(['M', 'A', 'R', 'C', 'U', '?'], l.substring(0, 2).trim().split('')).length > 0)
544-
.map(l => path.join(__dirname, l.substring(2).trim()));
544+
.map(l => path.join(__dirname, l.substring(2).trim().replace(/\//g, path.sep)));
545545
}
546546
}
547547

@@ -562,11 +562,13 @@ function getFileListToProcess(options) {
562562

563563
// If we need only modified files, then filter the glob.
564564
if (options && options.mode === 'changes') {
565-
return getModifiedFilesSync();
565+
return getModifiedFilesSync()
566+
.filter(file => fs.existsSync(file));
566567
}
567568

568569
if (options && options.mode === 'staged') {
569-
return getStagedFilesSync();
570+
return getStagedFilesSync()
571+
.filter(file => fs.existsSync(file));
570572
}
571573

572574
return all;

src/client/debugger/debugAdapter/DebugClients/localDebugClientV2.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'use strict';
55

66
import { DebugSession } from 'vscode-debugadapter';
7-
import { IKnownLaunchRequestArguments, LaunchRequestArguments } from '../../types';
7+
import { LaunchRequestArguments } from '../../types';
88
import { IDebugLauncherScriptProvider } from '../types';
99
import { LocalDebugClient } from './LocalDebugClient';
1010

@@ -18,11 +18,6 @@ export class LocalDebugClientV2 extends LocalDebugClient {
1818
if (this.args.noDebug) {
1919
additionalPtvsdArgs.push('--nodebug');
2020
}
21-
const multiProcessPropety: keyof IKnownLaunchRequestArguments = 'multiProcess';
22-
const multiProcess = (this.args as Object).hasOwnProperty(multiProcessPropety) ? this.args.multiProcess : true;
23-
if (multiProcess) {
24-
additionalPtvsdArgs.push('--multiprocess');
25-
}
2621
return [launcher, ...additionalPtvsdArgs, '--client', '--host', 'localhost', '--port', debugPort.toString()];
2722
}
2823
protected buildStandardArguments() {

src/client/debugger/extension/hooks/processTerminationHandler.ts

Lines changed: 0 additions & 102 deletions
This file was deleted.

src/client/debugger/extension/hooks/processTerminationService.ts

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)