fix: textmate service is not compatible with monaco 0.47#3847
Conversation
Walkthrough对 Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
|
🚅 Previously deployed to Railway in the core project. Environment has been deleted. |
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/editor/src/browser/monaco-contrib/tokenizer/textmate.service.ts (1 hunks)
Additional comments not posted (2)
packages/editor/src/browser/monaco-contrib/tokenizer/textmate.service.ts (2)
916-920: 改进了处理_requestedRichLanguages服务的逻辑新代码在清除
_requestedRichLanguages服务时进行了条件检查,并在服务未找到时记录警告日志。这提高了代码的健壮性。
922-926: 改进了处理_requestedBasicLanguages服务的逻辑新代码在清除
_requestedBasicLanguages服务时进行了条件检查,并在服务未找到时记录警告日志。这提高了代码的健壮性。
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3847 +/- ##
=======================================
Coverage 54.99% 54.99%
=======================================
Files 1556 1556
Lines 94793 94800 +7
Branches 19402 19406 +4
=======================================
+ Hits 52131 52138 +7
+ Misses 35448 35447 -1
- Partials 7214 7215 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Types
Background or solution
dispose textmate service 的时候会报错
0.35.x 中 ILanguageService 中的 _encounteredLanguages 在 0.47.x 中已经被移除
等价的是 _requestedBasicLanguages 和 _requestedRichLanguages
Changelog
fix textmate service is not compatible with monaco 0.47
Summary by CodeRabbit
TextmateService类的dispose方法,现在在清除_requestedRichLanguages和_requestedBasicLanguages时添加了条件处理,并在未找到服务时记录警告日志。