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

[vscode][proposed] Stub onWillCreateEditSessionIdentity #12533

Merged
merged 2 commits into from
May 19, 2023

Conversation

marcdumais-work
Copy link
Contributor

What it does

This event was recently added to proposed API EditSessionIdentityProvider. For now we add a stub that will allow [email protected] and more recent to activate and be successfully used in Theia applications.

Fixes #12521

How to test

You can use the vscode.git 1.77.0 extensions below:
git-.zip

  • Extract the git extensions and copy them in the "plugins" folder.
  • start the example application, open a workspace
  • vscode.git should activate, not complaining about onWillCreateEditSessionIdentity not existing. Built-in git will not ultimately work, unless @theia/git is removed from the app - but that's no necessary for this PR)

Review checklist

Reminder for reviewers

@marcdumais-work marcdumais-work added vscode issues related to VSCode compatibility builtins Issues related to VS Code builtin extensions labels May 15, 2023
@marcdumais-work marcdumais-work self-assigned this May 15, 2023
@marcdumais-work marcdumais-work force-pushed the onWillCreateEditSessionIdentity branch 4 times, most recently from e7b4dab to 94d275f Compare May 15, 2023 20:28
Copy link
Contributor

@tsmaeder tsmaeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woudn't the simplest stub implementation just be an empty function function? No need for emitters and such.

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
I confirmed that the builtin activates as expected, and the error is not thrown:

Activating extension 'Git (built-in)' failed: r.workspace.onWillCreateEditSessionIdentity is not a function

@marcdumais-work
Copy link
Contributor Author

Woudn't the simplest stub implementation just be an empty function function? No need for emitters and such.

That's correct. I went a bit further than the simplest. I would not mind going with something simpler.

@marcdumais-work marcdumais-work force-pushed the onWillCreateEditSessionIdentity branch from 94d275f to f6cb9db Compare May 16, 2023 17:55
@marcdumais-work
Copy link
Contributor Author

@tsmaeder as discussed I updated the 1st commit to use a separate proposed.d.ts file instead of adding to theia-proposed.d.ts. I took a fresh copy from [email protected], only slightly modifying it to adapt to our namespace.

Then I added commits on top to simplify the stub and tidy-up.

@marcdumais-work
Copy link
Contributor Author

I will resolve the conflicts locally after the other proposed API stubs are merged.

@vince-fugnitto
Copy link
Member

@marcdumais-work it should be fine to rebase now 👍

This event was recently added to proposed API EditSessionIdentityProvider.
For now we add a stub that will allow `[email protected]` and more recent
to activate and be successfully used in Theia applications.

Fixes #12521

Signed-off-by: Marc Dumais <[email protected]>
@marcdumais-work marcdumais-work force-pushed the onWillCreateEditSessionIdentity branch from 011429c to 7f631a3 Compare May 18, 2023 15:15
Remove trailing space that trips the linter

Co-authored-by: Vincent Fugnitto <[email protected]>
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@marcdumais-work marcdumais-work merged commit 248f6b6 into master May 19, 2023
@marcdumais-work marcdumais-work deleted the onWillCreateEditSessionIdentity branch May 19, 2023 13:46
@github-actions github-actions bot added this to the 1.38.0 milestone May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins Issues related to VS Code builtin extensions vscode issues related to VSCode compatibility
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[proposed API][builtins] Theia misses part of proposed API: EditSessionIdentityProvider
4 participants