-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update monaco editor to 0.12.x #1681
Conversation
There is some movement in the upstream, microsoft/monaco-editor#779 was fixed. Let's see if there is a new release on its way. |
packages/monaco/package.json
Outdated
@@ -1,58 +1,51 @@ | |||
{ | |||
"name": "@theia/monaco", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexTugarev please could you fix formatting in json files, should be 2 spaces
3cfc723
to
b62caff
Compare
|
global.monaco.modes = modes; | ||
global.monaco.cancellation = cancellation; | ||
debugger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity; what's that and what does this line do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debugger is a leftover here. it's a breakpoint in code. bad habit, I know, but it was helpful, as chrome was not willing to install breakpoint here.
I'll remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad habit
Not at all, it was in WIP anyway. I wanted to squeeze some knowledge. Thanks!
@@ -209,7 +209,7 @@ export namespace EditorDecorationStyle { | |||
const index = styleSheet.insertRule('.' + selector + '{}', 0); | |||
const rules = styleSheet.cssRules || styleSheet.rules; | |||
const rule = rules.item(index); | |||
if (rule.type === CSSRule.STYLE_RULE) { | |||
if (rule && rule.type === CSSRule.STYLE_RULE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is your tsc --version
? Is this related: #1621?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's 2.7.2
, but code-insiders
is ahead and sometimes it fails to pick ts
from node_modules
. that change would still be ok with 2.7.x
, I'll check that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, and please, ignore me; I was curious. Thanks!
@@ -39,7 +39,7 @@ const { mode } = yargs.option('mode', { | |||
const development = mode === 'development';${this.ifMonaco(() => ` | |||
|
|||
const monacoEditorPath = development ? '${this.resolve('monaco-editor-core', 'dev/vs')}' : '${this.resolve('monaco-editor-core', 'min/vs')}'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to take a look at #1542 and the referenced microsoft/monaco-editor#18. Basically, this means we no longer need to copy all the monaco files separately, but bundle it into our main artefact.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but it is out of the scope of this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How out of scope? This is only available on Monaco 0.11+ and we should do it upon the upgrade. I'm aware that this is not a blocker, but this is not out of scope either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do it with another PR, there are things to consider before switching from AMD to ESM, like the build speed. We had bad experience in monaco-languageclient. We want to consider it separately without blocking usage of the latest Monaco.
54bfb15
to
04b983a
Compare
@kittaakos, have dealt with keybindings before? I think
|
Did we consider cc. @akosyakov |
@AlexTugarev logging warning instead of throwing is fine with me |
@akosyakov, I did not get that.
which error do you refer to? |
created PR TypeFox/monaco-languageclient#74 to resolve issues with suggest widget. |
96a0a52
to
a85ef4a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, Alex! Thank you :)
f40627a
to
b88e2db
Compare
/// <reference types='monaco-editor-core/monaco'/> | ||
|
||
declare module monaco.instantiation { | ||
export interface IInstantiationService { | ||
} | ||
} | ||
|
||
declare module monaco.editor { | ||
declare namespace monaco.editor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexTugarev Could you explain why it should be changed? (just out of curiosity)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a left over. I just tried out something while fixing typings. The monaco.editor
is just a global spread and it should not be necessary to declare it a module. We also never import it, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akosyakov maybe we need to change it with the transition to ESM version of monaco. I've reverted it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
monaco
is module, not namespace, it is a way how to augment modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akosyakov it used to be declare module monaco
but they changed it to declare namespace monaco
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was changed sometimes between 0.11.1 and 0.11.6, I don't remember
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, then it makes sense :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reverted it, but it won't be a problem. We'll revise it when it comes to using ESM.
f684585
to
14bdac0
Compare
2f6f158
to
8ac3dd6
Compare
Signed-off-by: Alex Tugarev <[email protected]>
3d822bf
to
27550b4
Compare
Signed-off-by: Alex Tugarev <[email protected]>
Signed-off-by: Alex Tugarev <[email protected]>
Signed-off-by: Alex Tugarev <[email protected]>
Signed-off-by: Alex Tugarev <[email protected]>
b12a682
to
2ad6d75
Compare
Signed-off-by: Alex Tugarev <[email protected]>
Tested again. Looks still good to me. |
I've started to update monaco, also because this includes updates of libraries and fixes issues like the broken java model sync. The work is suspended now due to some critical monaco issues, cf [1]. Especially the broken find references [2] is a show stopper.
[1] https://github.com/Microsoft/monaco-editor/milestone/11
[2] microsoft/monaco-editor#779
monaco-languageclient
, see update monaco editor to 0.12.x #1681 (comment)