Skip to content
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

Support new vscode 'in' operator for 'when' clauses #8691

Closed
ronabet opened this issue Nov 2, 2020 · 17 comments · Fixed by #9492
Closed

Support new vscode 'in' operator for 'when' clauses #8691

ronabet opened this issue Nov 2, 2020 · 17 comments · Fixed by #9492
Labels
help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility

Comments

@ronabet
Copy link

ronabet commented Nov 2, 2020

Feature Description:

There is a new in operator for when clauses that vscode added. This new operator allows for a dynamic lookup of a context key's value within another context key's value. For example, if you wanted to add a context menu command to folders that contain a certain type of file (or something that can't be statically known), you can now use the in operator to achieve it.

Example:

Capture

For more info:
https://code.visualstudio.com/updates/v1_49#_in-operator-for-when-clauses

@vince-fugnitto vince-fugnitto added help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility labels Nov 2, 2020
@amiramw
Copy link
Member

amiramw commented Nov 4, 2020

@danarad05 will look into it

@danarad05
Copy link
Contributor

danarad05 commented Nov 5, 2020

Hi @vince-fugnitto , @akosyakov
Cc: @amiramw @DoroNahari

Seems like we need to update @theia/monaco-editor-core with latest changes in regard to support "in" in keybind "when" clause.
What I understand currently is that @theia/monaco-editor-core is npm package which references microsoft/vscode/.../standalone/0.20.x version. I see that there exists already a branch microsoft/vscode/.../standalone/0.21.x which as far as I understand needs to be updated to @Theia version (similar to 0.20.x version - like usage of ContextKeyExpr instead of ContextKeyExpression.

I also found theia-ide/vscode/.../standalone/0.20.x which is referenced in theia code - but it isn't exact version used in theia (when debugged - check screen caps below)

Please advise what is process for updating monaco-editor-core?

Thanks
Dan

contextkey.ts used in theia (screen cap when debugging) is same as microsoft/vscode/../0.20.x version:
image
image

@vince-fugnitto
Copy link
Member

@danarad05 I have never done it myself, but there is some documentation regarding the overall structure and migration steps necessary:

I believe it is still involving by looking at the last update: #8010.

@danarad05
Copy link
Contributor

Thanks @vince-fugnitto , seems to me thought that https://github.com/eclipse-theia/theia/wiki/LSP-and-Monaco-integration is not current - @typefox/monaco-editor-core doesn't look like its maintained:
image

I think that maybe we switched to working with @theia/monaco-editor-core instead of typefox.

@akosyakov Please advise

Thanks

fyi: @amiramw

@danarad05
Copy link
Contributor

@akosyakov Please advise as we are not sure what is flow for updating 0.20x or should it be 0.21.x version? Are you supposed to fork 0.21x?

@RomanNikitenko
Copy link
Contributor

@danarad05
Some steps are described here #7697 (comment)

@RomanNikitenko
Copy link
Contributor

what is flow for updating 0.20x or should it be 0.21.x version?

The question was not to me - sorry - but I believe the answer is:
If required changes exist in 0.21.x of Monaco and doesn't exist in 0.20x (so they came in 0.21.x version) then the Monaco version should be updated to 0.21: #7697 (comment) + adaptation on Theia side, like #8010

@danarad05
Copy link
Contributor

Thanks @RomanNikitenko , you are welcome to give your input.

Who will update @theia/monaco-editor-core version to 0.21x?

@RomanNikitenko
Copy link
Contributor

RomanNikitenko commented Nov 10, 2020

Who will update @theia/monaco-editor-core version to 0.21x?

I did previous two updates of @theia/monaco-editor-core: #7149 and #8010 with @akosyakov great help.

Unfortunately I'm not sure I can provide the next update in the near future - it's not planned in our sprint plan.

@azatsarynnyy could you take a look ^^

@azatsarynnyy
Copy link
Member

Who will update @theia/monaco-editor-core version to 0.21x?

Hello @danarad05
as Eclipse Theia is a result of the community efforts - it can be anyone 🙂
Last a couple of times it was @RomanNikitenko who took that responsibility.
Before that, it was @akosyakov

If you wish, you can contribute by doing the next upgrade of Monaco editor 😉
I believe, @RomanNikitenko and @akosyakov can guide you. But keep in mind that it's very time-consuming task.

@danarad05
Copy link
Contributor

@RomanNikitenko @azatsarynnyy not sure it is planned for my sprint plan either.

@amiramw Please advise

@danarad05
Copy link
Contributor

@RomanNikitenko
Hi Roman,
I might be able to go forward with creating the 0.21.x version. Are you available to support questions as they come up? I presume there is more to go through than explained in link you provided - and so I want to know I have someone to reference - so I will waste as little time as possible.
Thanks.

@RomanNikitenko
Copy link
Contributor

@danarad05
Hello, Dan!
I can provide required steps and share my experience related to upgrade Monaco version.
At the same time as I mentioned above I did the previous updates with @akosyakov great help.
Anton expedited process on each step, his help especially important on the review step.
So I believe it would be really nice to gain Anton's support before planing the next upgrade.

@danarad05
Copy link
Contributor

@RomanNikitenko Thanks for mentioning that - it's important to know that Anton's support is critical here.

@akosyakov - do you think you would be available for some support on the matter? - I do not know how much support is needed from your side - you and Roman know best.

Thanks
cc: @amiramw

@marcdumais-work
Copy link
Contributor

@danarad05 Thanks for bringing-up the Monaco update issue to the dev-meeting.

Would you open an issue for this specific Monaco update that we need, where we can discuss it? Then I suggest you attempt a PR, even if not everything is clear from the get-go, and let committers help guide you, to refine it. We collectively have all the required knowledge to do this.

@azatsarynnyy
Copy link
Member

I agree with @marcdumais-work.
@danarad05 please, open a dedicated issue for upgrading the Monaco editor, as we had for one of the previous upgrades, e.g. #6900
And @RomanNikitenko could share his knowledge and experience there.

@danarad05
Copy link
Contributor

@danarad05 please, open a dedicated issue for upgrading the Monaco editor, as we had for one of the previous upgrades, e.g. #6900

@azatsarynnyy @marcdumais-work @amiramw
Opened #8969. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants