roku-debug 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/CompileErrorProcessor.d.ts +60 -21
- package/dist/CompileErrorProcessor.js +175 -177
- package/dist/CompileErrorProcessor.js.map +1 -1
- package/dist/RendezvousTracker.js +13 -9
- package/dist/RendezvousTracker.js.map +1 -1
- package/dist/adapters/DebugProtocolAdapter.d.ts +2 -4
- package/dist/adapters/DebugProtocolAdapter.js +2 -2
- package/dist/adapters/DebugProtocolAdapter.js.map +1 -1
- package/dist/adapters/TelnetAdapter.d.ts +2 -4
- package/dist/adapters/TelnetAdapter.js +3 -7
- package/dist/adapters/TelnetAdapter.js.map +1 -1
- package/dist/debugProtocol/Debugger.d.ts +2 -0
- package/dist/debugProtocol/Debugger.js +42 -29
- package/dist/debugProtocol/Debugger.js.map +1 -1
- package/dist/debugSession/BrightScriptDebugSession.d.ts +4 -0
- package/dist/debugSession/BrightScriptDebugSession.js +32 -33
- package/dist/debugSession/BrightScriptDebugSession.js.map +1 -1
- package/dist/debugSession/Events.d.ts +102 -43
- package/dist/debugSession/Events.js +120 -30
- package/dist/debugSession/Events.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/util.d.ts +0 -2
- package/dist/util.js +0 -17
- package/dist/util.js.map +1 -1
- package/package.json +3 -3
- package/roku-debug-0.16.0.tgz +0 -0
- package/roku-debug-0.15.0.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
+
## [0.16.0](https://github.com/rokucommunity/roku-debug/compare/v0.15.0...0.16.0) - 2022-10-17
|
|
10
|
+
### Changed
|
|
11
|
+
- Emit device diagnostics instead of compile errors ([#104](https://github.com/rokucommunity/roku-debug/pull/104))
|
|
12
|
+
- Standardize custom events, add is* helpers ([#103](https://github.com/rokucommunity/roku-debug/pull/103))
|
|
13
|
+
- upgrade to [brighterscript@0.60.0](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#0600---2022-10-10). Notable changes since 0.56.0:
|
|
14
|
+
- upgrade to [roku-deploy@3.9.2](https://github.com/rokucommunity/roku-deploy/blob/master/CHANGELOG.md#392---2022-10-03). Notable changes since 3.7.1:
|
|
15
|
+
- Replace minimatch with picomatch ([roku-deploy#101](https://github.com/rokucommunity/roku-deploy/pull/101))
|
|
16
|
+
- Sync retainStagingFolder, stagingFolderPath with options. ([roku-deploy#100](https://github.com/rokucommunity/roku-deploy/pull/100))
|
|
17
|
+
- Add stagingDir and retainStagingDir. ([roku-deploy#99](https://github.com/rokucommunity/roku-deploy/pull/99))
|
|
18
|
+
- Remotedebug connect early ([roku-deploy#97](https://github.com/rokucommunity/roku-deploy/pull/97))
|
|
19
|
+
- Better compile error handling ([roku-deploy#96](https://github.com/rokucommunity/roku-deploy/pull/96))
|
|
20
|
+
### Fixed
|
|
21
|
+
- crash in rendezvous parser for missing files ([#108](https://github.com/rokucommunity/roku-debug/pull/108))
|
|
22
|
+
- better debug protocol launch handling ([#102](https://github.com/rokucommunity/roku-debug/pull/102))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
9
26
|
## [0.15.0](https://github.com/rokucommunity/roku-debug/compare/v0.14.2...0.15.0) - 2022-08-23
|
|
10
27
|
### Added
|
|
11
28
|
- support for conditional breakpoints over the debug protocol([#97](https://github.com/rokucommunity/roku-debug/pull/97))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
|
|
2
|
+
import type { Diagnostic } from 'vscode-languageserver-protocol/node';
|
|
3
3
|
export declare class CompileErrorProcessor {
|
|
4
4
|
private logger;
|
|
5
5
|
status: CompileStatus;
|
|
@@ -9,23 +9,57 @@ export declare class CompileErrorProcessor {
|
|
|
9
9
|
compileErrorTimeoutMs: number;
|
|
10
10
|
private emitter;
|
|
11
11
|
compileErrorTimer: NodeJS.Timeout;
|
|
12
|
-
on(eventName: '
|
|
12
|
+
on(eventName: 'diagnostics', handler: (params: BSDebugDiagnostic[]) => void): any;
|
|
13
13
|
private emit;
|
|
14
14
|
processUnhandledLines(responseText: string): void;
|
|
15
15
|
sendErrors(): Promise<void>;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
getErrors(lines: string[]): BSDebugDiagnostic[];
|
|
17
|
+
/**
|
|
18
|
+
* Parse generic xml errors with no further context below
|
|
19
|
+
*/
|
|
20
|
+
parseGenericXmlError(line: string): BSDebugDiagnostic[];
|
|
21
|
+
/**
|
|
22
|
+
* Parse the standard syntax and compile error format
|
|
23
|
+
*/
|
|
24
|
+
private parseSyntaxAndCompileErrors;
|
|
25
|
+
/**
|
|
26
|
+
* Handles when an error lists the filename on the first line, then subsequent lines each have 1 error.
|
|
27
|
+
* Stops on the first line that doesn't have an error line. Like this:
|
|
28
|
+
* ```
|
|
29
|
+
* Found 3 parse errors in XML file Foo.xml
|
|
30
|
+
* --- Line 2: Unexpected data found inside a <component> element (first 10 characters are "aaa")
|
|
31
|
+
* --- Line 3: Some unique error message
|
|
32
|
+
* --- Line 5: message with Line 4 inside it
|
|
33
|
+
*/
|
|
34
|
+
private processMultiLineErrors;
|
|
35
|
+
/**
|
|
36
|
+
* Parse errors that look like this:
|
|
37
|
+
* ```
|
|
38
|
+
* Error in XML component RedButton defined in file pkg:/components/RedButton.xml
|
|
39
|
+
* -- Extends type does not exist: "ColoredButton"
|
|
40
|
+
*/
|
|
41
|
+
private parseComponentDefinedInFileError;
|
|
42
|
+
/**
|
|
43
|
+
* Parse error messages that look like this:
|
|
44
|
+
* ```
|
|
45
|
+
* ------->No manifest. Invalid package.
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
private parseMissingManifestError;
|
|
49
|
+
/**
|
|
50
|
+
* Exec the regexp, and if there's a match, trim every group
|
|
51
|
+
*/
|
|
52
|
+
private execAndTrim;
|
|
53
|
+
private buildMessage;
|
|
54
|
+
/**
|
|
55
|
+
* Given a text-based line number, convert it to a number and return a range.
|
|
56
|
+
* Defaults to line number 1 (1-based) if unable to parse.
|
|
57
|
+
* @returns a zero-based vscode `Range` object
|
|
58
|
+
*/
|
|
59
|
+
private getRange;
|
|
60
|
+
/**
|
|
61
|
+
* Trim all leading junk up to the `pkg:/` in this string
|
|
62
|
+
*/
|
|
29
63
|
sanitizeCompilePath(debuggerPath: string): string;
|
|
30
64
|
resetCompileErrorTimer(isRunning: any): any;
|
|
31
65
|
onCompileErrorTimer(): void;
|
|
@@ -36,14 +70,19 @@ export declare class CompileErrorProcessor {
|
|
|
36
70
|
* @param responseText
|
|
37
71
|
*/
|
|
38
72
|
private reportErrors;
|
|
73
|
+
destroy(): void;
|
|
39
74
|
}
|
|
40
|
-
export interface
|
|
75
|
+
export interface BSDebugDiagnostic extends Diagnostic {
|
|
76
|
+
/**
|
|
77
|
+
* Path to the file in question. When emitted from a Roku device, this will be a full pkgPath (i.e. `pkg:/source/main.brs`).
|
|
78
|
+
* As it flows through the program, this may be modified to represent a source location (i.e. `C:/projects/app/source/main.brs`)
|
|
79
|
+
*/
|
|
41
80
|
path: string;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
81
|
+
/**
|
|
82
|
+
* The name of the component library this diagnostic was emitted from. Should be undefined if diagnostic originated from the
|
|
83
|
+
* main app.
|
|
84
|
+
*/
|
|
85
|
+
componentLibraryName?: string;
|
|
47
86
|
}
|
|
48
87
|
export declare enum CompileStatus {
|
|
49
88
|
none = "none",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CompileStatus = exports.CompileErrorProcessor =
|
|
3
|
+
exports.CompileStatus = exports.CompileErrorProcessor = void 0;
|
|
4
4
|
const events_1 = require("events");
|
|
5
5
|
const logging_1 = require("./logging");
|
|
6
|
-
|
|
6
|
+
const brighterscript_1 = require("brighterscript");
|
|
7
7
|
class CompileErrorProcessor {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.logger = logging_1.logger.createLogger(`[${CompileErrorProcessor.name}]`);
|
|
@@ -82,204 +82,202 @@ class CompileErrorProcessor {
|
|
|
82
82
|
setTimeout(resolve, 500);
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
getErrors() {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
getErrors(lines) {
|
|
86
|
+
const result = [];
|
|
87
|
+
//clone the lines so the parsers can manipulate them
|
|
88
|
+
lines = [...lines];
|
|
89
|
+
while (lines.length > 0) {
|
|
90
|
+
const startLength = lines.length;
|
|
91
|
+
const line = lines[0];
|
|
92
|
+
if (line) {
|
|
93
|
+
result.push(...[
|
|
94
|
+
this.processMultiLineErrors(lines),
|
|
95
|
+
this.parseComponentDefinedInFileError(lines),
|
|
96
|
+
this.parseGenericXmlError(line),
|
|
97
|
+
this.parseSyntaxAndCompileErrors(line),
|
|
98
|
+
this.parseMissingManifestError(line)
|
|
99
|
+
].flat().filter(x => !!x));
|
|
100
|
+
}
|
|
101
|
+
//if none of the parsers consumed a line, remove the first line
|
|
102
|
+
if (lines.length === startLength) {
|
|
103
|
+
lines.shift();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return result.filter(x => {
|
|
107
|
+
//throw out $livecompile errors (those are generated by REPL/eval code)
|
|
108
|
+
return x.path && !x.path.toLowerCase().includes('$livecompile');
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Parse generic xml errors with no further context below
|
|
113
|
+
*/
|
|
114
|
+
parseGenericXmlError(line) {
|
|
115
|
+
var _a;
|
|
116
|
+
let [, message, files] = (_a = this.execAndTrim(
|
|
117
|
+
// https://regex101.com/r/LDUyww/3
|
|
118
|
+
/^(?:-+\>)?\s*(Error parsing (?:multiple )?XML component[s]?)\s+\(?(.+\.xml)\)?.*$/igm, line)) !== null && _a !== void 0 ? _a : [];
|
|
119
|
+
if (message && typeof files === 'string') {
|
|
120
|
+
//use the singular xml parse message since the plural doesn't make much sense when attached to a single file
|
|
121
|
+
if (message.toLowerCase() === 'error parsing multiple xml components') {
|
|
122
|
+
message = 'Error parsing XML component';
|
|
123
|
+
}
|
|
124
|
+
//there can be 1 or more file paths, so add a distinct error for each one
|
|
125
|
+
return files.split(',')
|
|
126
|
+
.map(filePath => ({
|
|
127
|
+
path: this.sanitizeCompilePath(filePath),
|
|
128
|
+
range: brighterscript_1.util.createRange(0, 0, 0, 999),
|
|
129
|
+
message: this.buildMessage(message),
|
|
130
|
+
code: undefined
|
|
131
|
+
}))
|
|
132
|
+
.filter(x => !!x);
|
|
133
|
+
}
|
|
94
134
|
}
|
|
95
135
|
/**
|
|
96
|
-
*
|
|
97
|
-
* @param value
|
|
136
|
+
* Parse the standard syntax and compile error format
|
|
98
137
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
138
|
+
parseSyntaxAndCompileErrors(line) {
|
|
139
|
+
var _a, _b;
|
|
140
|
+
let [, message, errorType, code, trailingInfo] = (_a = this.execAndTrim(
|
|
141
|
+
// https://regex101.com/r/HHZ6dE/3
|
|
142
|
+
/(.*?)(?:\(((?:syntax|compile)\s+error)\s+(&h[\w\d]+)?\s*\))\s*in\b\s+(.+)/ig, line)) !== null && _a !== void 0 ? _a : [];
|
|
143
|
+
if (message) {
|
|
144
|
+
//split the file path, line number, and trailing context if available.
|
|
145
|
+
let [, filePath, lineNumber, context] = (_b = this.execAndTrim(/(.+)\((\d+)?\)(.*)/ig, trailingInfo
|
|
146
|
+
//default the `filePath` var to the whole `trailingInfo` string
|
|
147
|
+
)) !== null && _b !== void 0 ? _b : [null, trailingInfo, null, null];
|
|
148
|
+
return [{
|
|
149
|
+
path: this.sanitizeCompilePath(filePath),
|
|
150
|
+
message: this.buildMessage(message, context),
|
|
151
|
+
range: this.getRange(lineNumber),
|
|
152
|
+
code: code
|
|
153
|
+
}];
|
|
154
|
+
}
|
|
101
155
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
156
|
+
/**
|
|
157
|
+
* Handles when an error lists the filename on the first line, then subsequent lines each have 1 error.
|
|
158
|
+
* Stops on the first line that doesn't have an error line. Like this:
|
|
159
|
+
* ```
|
|
160
|
+
* Found 3 parse errors in XML file Foo.xml
|
|
161
|
+
* --- Line 2: Unexpected data found inside a <component> element (first 10 characters are "aaa")
|
|
162
|
+
* --- Line 3: Some unique error message
|
|
163
|
+
* --- Line 5: message with Line 4 inside it
|
|
164
|
+
*/
|
|
165
|
+
processMultiLineErrors(lines) {
|
|
166
|
+
var _a, _b;
|
|
167
|
+
const errors = [];
|
|
168
|
+
let [, count, filePath] = (_a = this.execAndTrim(
|
|
169
|
+
// https://regex101.com/r/wBMp8B/1
|
|
170
|
+
/found (\d+).*error[s]? in.*?file(.*)/gmi, lines[0])) !== null && _a !== void 0 ? _a : [];
|
|
171
|
+
filePath = this.sanitizeCompilePath(filePath);
|
|
172
|
+
if (filePath) {
|
|
173
|
+
let i = 0;
|
|
174
|
+
//parse each line that looks like it's an error.
|
|
175
|
+
for (i = 1; i < lines.length; i++) {
|
|
176
|
+
//example: `Line 1: Unexpected data found inside a <component> element (first 10 characters are "aaa")`)
|
|
177
|
+
const [, lineNumber, message] = (_b = this.execAndTrim(/^[\-\s]*line (\d*):(.*)$/gim, lines[i])) !== null && _b !== void 0 ? _b : [];
|
|
178
|
+
if (lineNumber && message) {
|
|
114
179
|
errors.push({
|
|
115
|
-
path:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
charStart: 0,
|
|
120
|
-
charEnd: 999 //TODO
|
|
180
|
+
path: filePath,
|
|
181
|
+
range: this.getRange(lineNumber),
|
|
182
|
+
message: this.buildMessage(message),
|
|
183
|
+
code: undefined
|
|
121
184
|
});
|
|
122
185
|
}
|
|
186
|
+
else {
|
|
187
|
+
//assume there are no more errors for this file
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
123
190
|
}
|
|
191
|
+
//remove the lines we consumed
|
|
192
|
+
lines.splice(0, i);
|
|
124
193
|
}
|
|
125
194
|
return errors;
|
|
126
195
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
//
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
continue;
|
|
142
|
-
}
|
|
143
|
-
let path = this.sanitizeCompilePath(match[1]);
|
|
144
|
-
let lineNumber = 1; //TODO this should iterate over all line numbers found in a file
|
|
145
|
-
let errorText = 'ERR_COMPILE:';
|
|
146
|
-
let message = fileErrorText.trim();
|
|
147
|
-
let error = {
|
|
148
|
-
path: path,
|
|
149
|
-
lineNumber: lineNumber,
|
|
150
|
-
errorText: errorText,
|
|
151
|
-
message: message,
|
|
152
|
-
charStart: 0,
|
|
153
|
-
charEnd: 999 //TODO
|
|
154
|
-
};
|
|
155
|
-
//now iterate over the lines, to see if there's any errors we can extract
|
|
156
|
-
let lineErrors = this.getLineErrors(path, fileErrorText);
|
|
157
|
-
if (lineErrors.length > 0) {
|
|
158
|
-
errors.push(...lineErrors);
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
errors.push(error);
|
|
196
|
+
/**
|
|
197
|
+
* Parse errors that look like this:
|
|
198
|
+
* ```
|
|
199
|
+
* Error in XML component RedButton defined in file pkg:/components/RedButton.xml
|
|
200
|
+
* -- Extends type does not exist: "ColoredButton"
|
|
201
|
+
*/
|
|
202
|
+
parseComponentDefinedInFileError(lines) {
|
|
203
|
+
var _a;
|
|
204
|
+
let [, message, filePath] = (_a = this.execAndTrim(/(Error in XML component [a-z0-9_-]+) defined in file (.*)/i, lines[0])) !== null && _a !== void 0 ? _a : [];
|
|
205
|
+
if (filePath) {
|
|
206
|
+
lines.shift();
|
|
207
|
+
//assume the next line includes the actual error message
|
|
208
|
+
if (lines[0]) {
|
|
209
|
+
message = lines.shift();
|
|
162
210
|
}
|
|
211
|
+
return [{
|
|
212
|
+
message: this.buildMessage(message),
|
|
213
|
+
path: this.sanitizeCompilePath(filePath),
|
|
214
|
+
range: this.getRange(),
|
|
215
|
+
code: undefined
|
|
216
|
+
}];
|
|
163
217
|
}
|
|
164
|
-
return errors;
|
|
165
|
-
}
|
|
166
|
-
getLineErrors(path, fileErrorText) {
|
|
167
|
-
let errors = [];
|
|
168
|
-
let getFileInfoRegEx = /^--- Line (\d*): (.*)$/gim;
|
|
169
|
-
let match;
|
|
170
|
-
while ((match = getFileInfoRegEx.exec(fileErrorText))) {
|
|
171
|
-
let lineNumber = parseInt(match[1]); // 1-based
|
|
172
|
-
let errorText = 'ERR_COMPILE:';
|
|
173
|
-
let message = this.sanitizeCompilePath(match[2]);
|
|
174
|
-
errors.push({
|
|
175
|
-
path: path,
|
|
176
|
-
lineNumber: lineNumber,
|
|
177
|
-
errorText: errorText,
|
|
178
|
-
message: message,
|
|
179
|
-
charStart: 0,
|
|
180
|
-
charEnd: 999 //TODO
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
return errors;
|
|
184
218
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Parse error messages that look like this:
|
|
221
|
+
* ```
|
|
222
|
+
* ------->No manifest. Invalid package.
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
parseMissingManifestError(line) {
|
|
226
|
+
var _a;
|
|
227
|
+
let [, message] = (_a = this.execAndTrim(
|
|
228
|
+
// https://regex101.com/r/ANr5xd/1
|
|
229
|
+
/^(?:-+)>(No manifest\. Invalid package\.)/i, line)) !== null && _a !== void 0 ? _a : [];
|
|
230
|
+
if (message) {
|
|
231
|
+
return [{
|
|
232
|
+
path: 'pkg:/manifest',
|
|
233
|
+
range: brighterscript_1.util.createRange(0, 0, 0, 999),
|
|
234
|
+
message: this.buildMessage(message)
|
|
235
|
+
}];
|
|
202
236
|
}
|
|
203
|
-
return errors;
|
|
204
237
|
}
|
|
205
|
-
|
|
238
|
+
/**
|
|
239
|
+
* Exec the regexp, and if there's a match, trim every group
|
|
240
|
+
*/
|
|
241
|
+
execAndTrim(pattern, text) {
|
|
206
242
|
var _a;
|
|
207
|
-
|
|
208
|
-
let getFileInfoRegEx = /Error in XML component [a-z0-9_-]+ defined in file (.*)/i;
|
|
209
|
-
for (let i = 0; i < lines.length; i++) {
|
|
210
|
-
const line = lines[i];
|
|
211
|
-
let match = getFileInfoRegEx.exec(line);
|
|
212
|
-
if (match) {
|
|
213
|
-
let errorText = 'ERR_COMPILE:';
|
|
214
|
-
let path = match[1];
|
|
215
|
-
errors.push({
|
|
216
|
-
path: path,
|
|
217
|
-
lineNumber: 1,
|
|
218
|
-
errorText: errorText,
|
|
219
|
-
message: `${line}\n${(_a = lines[i + 1]) !== null && _a !== void 0 ? _a : ''}`,
|
|
220
|
-
charStart: 0,
|
|
221
|
-
charEnd: 999 //TODO
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
return errors;
|
|
243
|
+
return (_a = pattern.exec(text)) === null || _a === void 0 ? void 0 : _a.map(x => x === null || x === void 0 ? void 0 : x.trim());
|
|
226
244
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
let errorText = 'ERR_COMPILE:';
|
|
234
|
-
let filePaths = match[1].split(',');
|
|
235
|
-
for (const path of filePaths) {
|
|
236
|
-
errors.push({
|
|
237
|
-
path: this.sanitizeCompilePath(path.trim()),
|
|
238
|
-
lineNumber: 1,
|
|
239
|
-
errorText: errorText,
|
|
240
|
-
message: exports.GENERAL_XML_ERROR,
|
|
241
|
-
charStart: 0,
|
|
242
|
-
charEnd: 999 //TODO
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
}
|
|
245
|
+
buildMessage(message, context) {
|
|
246
|
+
//remove any leading dashes or whitespace
|
|
247
|
+
message = message.replace(/^[ \t\-]+/g, '');
|
|
248
|
+
//append context to end of message (if available)
|
|
249
|
+
if ((context === null || context === void 0 ? void 0 : context.length) > 0) {
|
|
250
|
+
message += ' ' + context;
|
|
246
251
|
}
|
|
247
|
-
|
|
252
|
+
//remove trailing period from message
|
|
253
|
+
message = message.replace(/[\s.]+$/, '');
|
|
254
|
+
return message;
|
|
248
255
|
}
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
message: match[1],
|
|
260
|
-
charStart: 0,
|
|
261
|
-
charEnd: 999 //TODO
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
return errors;
|
|
256
|
+
/**
|
|
257
|
+
* Given a text-based line number, convert it to a number and return a range.
|
|
258
|
+
* Defaults to line number 1 (1-based) if unable to parse.
|
|
259
|
+
* @returns a zero-based vscode `Range` object
|
|
260
|
+
*/
|
|
261
|
+
getRange(lineNumberText) {
|
|
262
|
+
//convert the line number to an integer (if applicable)
|
|
263
|
+
let lineNumber = parseInt(lineNumberText); //1-based
|
|
264
|
+
lineNumber = isNaN(lineNumber) ? 1 : lineNumber;
|
|
265
|
+
return brighterscript_1.util.createRange(lineNumber - 1, 0, lineNumber - 1, 999);
|
|
266
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Trim all leading junk up to the `pkg:/` in this string
|
|
269
|
+
*/
|
|
267
270
|
sanitizeCompilePath(debuggerPath) {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
return debuggerPath.slice(protocolIndex);
|
|
271
|
-
}
|
|
272
|
-
return debuggerPath;
|
|
271
|
+
var _a;
|
|
272
|
+
return (_a = debuggerPath === null || debuggerPath === void 0 ? void 0 : debuggerPath.replace(/.*?(?=pkg:\/)/, '')) === null || _a === void 0 ? void 0 : _a.trim();
|
|
273
273
|
}
|
|
274
274
|
resetCompileErrorTimer(isRunning) {
|
|
275
|
-
// console.debug('resetCompileErrorTimer isRunning' + isRunning);
|
|
276
275
|
if (this.compileErrorTimer) {
|
|
277
276
|
clearInterval(this.compileErrorTimer);
|
|
278
277
|
this.compileErrorTimer = undefined;
|
|
279
278
|
}
|
|
280
279
|
if (isRunning) {
|
|
281
280
|
if (this.status === CompileStatus.compileError) {
|
|
282
|
-
// console.debug('resetting resetCompileErrorTimer');
|
|
283
281
|
this.compileErrorTimer = setTimeout(() => {
|
|
284
282
|
this.onCompileErrorTimer();
|
|
285
283
|
}, this.compileErrorTimeoutMs);
|
|
@@ -287,7 +285,6 @@ class CompileErrorProcessor {
|
|
|
287
285
|
}
|
|
288
286
|
}
|
|
289
287
|
onCompileErrorTimer() {
|
|
290
|
-
console.debug('onCompileErrorTimer: timer complete. should\'ve caught all errors ');
|
|
291
288
|
this.status = CompileStatus.compileError;
|
|
292
289
|
this.resetCompileErrorTimer(false);
|
|
293
290
|
this.reportErrors();
|
|
@@ -319,13 +316,14 @@ class CompileErrorProcessor {
|
|
|
319
316
|
* @param responseText
|
|
320
317
|
*/
|
|
321
318
|
reportErrors() {
|
|
322
|
-
|
|
323
|
-
const errors = this.getErrors().filter((e) => {
|
|
324
|
-
const path = e.path.toLowerCase();
|
|
325
|
-
return path.endsWith('.brs') || path.endsWith('.xml') || path === 'manifest';
|
|
326
|
-
});
|
|
319
|
+
const errors = this.getErrors(this.compilingLines);
|
|
327
320
|
if (errors.length > 0) {
|
|
328
|
-
this.emit('
|
|
321
|
+
this.emit('diagnostics', errors);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
destroy() {
|
|
325
|
+
if (this.emitter) {
|
|
326
|
+
this.emitter.removeAllListeners();
|
|
329
327
|
}
|
|
330
328
|
}
|
|
331
329
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompileErrorProcessor.js","sourceRoot":"","sources":["../src/CompileErrorProcessor.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;
|
|
1
|
+
{"version":3,"file":"CompileErrorProcessor.js","sourceRoot":"","sources":["../src/CompileErrorProcessor.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AAEtC,uCAAmC;AACnC,mDAAiD;AAEjD,MAAa,qBAAqB;IAAlC;QAEY,WAAM,GAAG,gBAAM,CAAC,YAAY,CAAC,IAAI,qBAAqB,CAAC,IAAI,GAAG,CAAC,CAAC;QACjE,WAAM,GAAkB,aAAa,CAAC,IAAI,CAAC;QAC3C,uBAAkB,GAAG,CAAC,CAAC,CAAC;QACxB,qBAAgB,GAAG,CAAC,CAAC,CAAC;QACtB,mBAAc,GAAG,EAAc,CAAC;QAChC,0BAAqB,GAAG,IAAI,CAAC;QAC5B,YAAO,GAAG,IAAI,qBAAY,EAAE,CAAC;IAiWzC,CAAC;IA7VU,EAAE,CAAC,SAAiB,EAAE,OAA+B;QACxD,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACpC,OAAO,GAAG,EAAE;YACR,IAA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