Skip to content

Commit 6020e90

Browse files
author
Feiyang Liu
committed
update patches to fix build error
1 parent db61954 commit 6020e90

File tree

6 files changed

+62
-4
lines changed

6 files changed

+62
-4
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Fix textMate type errors for vscode 1.108.2 upgrade
2+
3+
Type incompatibilities between IFontInfo[]/IFontToken[] and
4+
IRawThemeSetting[]/ITextMateThemingRule[] after upstream changes.
5+
6+
---
7+
src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts | 4 ++--
8+
src/vs/workbench/services/textMate/browser/tokenizationSupport/textMateTokenizationSupport.ts | 4 ++--
9+
2 files changed, 4 insertions(+), 4 deletions(-)
10+
11+
Index: third-party-src/src/vs/workbench/services/textMate/browser/tokenizationSupport/textMateTokenizationSupport.ts
12+
===================================================================
13+
--- third-party-src.orig/src/vs/workbench/services/textMate/browser/tokenizationSupport/textMateTokenizationSupport.ts
14+
+++ third-party-src/src/vs/workbench/services/textMate/browser/tokenizationSupport/textMateTokenizationSupport.ts
15+
@@ -62,7 +62,7 @@ export class TextMateTokenizationSupport
16+
if (textMateResult.stoppedEarly) {
17+
console.warn(`Time limit reached when tokenizing line: ${line.substring(0, 100)}`);
18+
// return the state at the beginning of the line
19+
- return new EncodedTokenizationResult(textMateResult.tokens, textMateResult.fonts, state);
20+
+ return new EncodedTokenizationResult(textMateResult.tokens, textMateResult.fonts as any, state);
21+
}
22+
23+
if (this._containsEmbeddedLanguages) {
24+
@@ -89,6 +89,6 @@ export class TextMateTokenizationSupport
25+
endState = textMateResult.ruleStack;
26+
}
27+
28+
- return new EncodedTokenizationResult(textMateResult.tokens, textMateResult.fonts, endState);
29+
+ return new EncodedTokenizationResult(textMateResult.tokens, textMateResult.fonts as any, endState);
30+
}
31+
}
32+
Index: third-party-src/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts
33+
===================================================================
34+
--- third-party-src.orig/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts
35+
+++ third-party-src/src/vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts
36+
@@ -337,15 +337,15 @@ export class TextMateTokenizationFeature
37+
}
38+
39+
private _updateTheme(colorTheme: IWorkbenchColorTheme, forceUpdate: boolean): void {
40+
- if (!forceUpdate && this._currentTheme && this._currentTokenColorMap && equalsTokenRules(this._currentTheme.settings, colorTheme.tokenColors)
41+
+ if (!forceUpdate && this._currentTheme && this._currentTokenColorMap && equalsTokenRules(this._currentTheme.settings as any, colorTheme.tokenColors)
42+
&& equalArray(this._currentTokenColorMap, colorTheme.tokenColorMap) && this._currentTokenFontMap && equalArray(this._currentTokenFontMap, colorTheme.tokenFontMap)) {
43+
return;
44+
}
45+
- this._currentTheme = { name: colorTheme.label, settings: colorTheme.tokenColors };
46+
+ this._currentTheme = { name: colorTheme.label, settings: colorTheme.tokenColors as any };
47+
this._currentTokenColorMap = colorTheme.tokenColorMap;
48+
this._currentTokenFontMap = colorTheme.tokenFontMap;
49+
50+
- this._grammarFactory?.setTheme(this._currentTheme, this._currentTokenColorMap);
51+
+ this._grammarFactory?.setTheme(this._currentTheme!, this._currentTokenColorMap);
52+
const colorMap = toColorMap(this._currentTokenColorMap);
53+
const colorCssRules = generateTokensCSSForColorMap(colorMap);
54+
const fontCssRules = generateTokensCSSForFontMap(this._currentTokenFontMap);

patches/sagemaker.series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ common/proposed-api.diff
1717
common/build.diff
1818
common/integration.diff
1919
common/replace-gulp-untar.diff
20+
common/fix-textmate-type-errors.diff
2021
web-server/suppress-known-errors-build-integration.diff
2122
web-server/local-storage.diff
2223
web-server/base-path.diff

patches/web-embedded-with-terminal.series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ common/proposed-api.diff
1717
common/build.diff
1818
common/integration.diff
1919
common/replace-gulp-untar.diff
20+
common/fix-textmate-type-errors.diff
2021
web-embedded/readd-workbench.diff
2122
web-embedded/suppress-known-errors-build-integration.diff
2223
web-embedded/disable-built-in-walkthroughs-from-c.diff

patches/web-embedded.series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ common/proposed-api.diff
1717
common/build.diff
1818
common/integration.diff
1919
common/replace-gulp-untar.diff
20+
common/fix-textmate-type-errors.diff
2021
web-embedded/readd-workbench.diff
2122
web-embedded/suppress-known-errors-build-integration.diff
2223
web-embedded/disable-built-in-walkthroughs-from-c.diff

patches/web-embedded/revise-help-about-modal-content-and-buttons.diff

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Index: third-party-src/src/vs/workbench/browser/parts/dialogs/dialog.web.contrib
1515
} else {
1616
const aboutDialogDetails = createBrowserAboutDialogDetails(this.productService);
1717
- await this.impl.value.about(aboutDialogDetails.title, aboutDialogDetails.details, aboutDialogDetails.detailsToCopy);
18-
+ await this.impl.value.about(aboutDialogDetails.title, aboutDialogDetails.details);
18+
+ await this.impl.value.about(aboutDialogDetails.title, aboutDialogDetails.details, aboutDialogDetails.details);
1919
}
2020
} catch (error) {
2121
result = error;
@@ -28,7 +28,7 @@ Index: third-party-src/src/vs/workbench/browser/parts/dialogs/dialogHandler.ts
2828
}
2929

3030
- async about(title: string, details: string, detailsToCopy: string): Promise<void> {
31-
+ async about(title: string, details: string): Promise<void> {
31+
+ async about(title: string, details: string, _detailsToCopy: string): Promise<void> {
3232

3333
- const { button } = await this.doShow(
3434
+ await this.doShow(
@@ -61,7 +61,7 @@ Index: third-party-src/src/vs/platform/dialogs/browser/dialog.ts
6161
import { localize } from '../../../nls.js';
6262
import { IKeybindingService } from '../../keybinding/common/keybinding.js';
6363
import { ResultKind } from '../../keybinding/common/keybindingResolver.js';
64-
@@ -43,24 +42,13 @@ export function createWorkbenchDialogOpt
64+
@@ -43,24 +42,14 @@ export function createWorkbenchDialogOpt
6565
};
6666
}
6767

@@ -90,4 +90,4 @@ Index: third-party-src/src/vs/platform/dialogs/browser/dialog.ts
9090
+ details: details
9191
};
9292
}
93-
-
93+

patches/web-server.series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ common/proposed-api.diff
1717
common/build.diff
1818
common/integration.diff
1919
common/replace-gulp-untar.diff
20+
common/fix-textmate-type-errors.diff
2021
web-server/suppress-known-errors-build-integration.diff
2122
web-server/local-storage.diff
2223
web-server/base-path.diff

0 commit comments

Comments
 (0)