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

Stub vscode 'Tests' API #11717

Merged
merged 1 commit into from Oct 19, 2022
Merged

Stub vscode 'Tests' API #11717

merged 1 commit into from Oct 19, 2022

Conversation

alvsan09
Copy link
Contributor

@alvsan09 alvsan09 commented Sep 29, 2022

What it does

This enables the possibility to load and start plugins which depend on the 'Tests' API.
The 'Tests' functionality will not be operational but the rest of
the functionality offered by the plugin will be.

How to test

  1. Update the supported vscode API version in theia to 1.68.0, at:

dev-packages/application-package/src/api.ts

  1. Reproduce the problem in the theia instance before switching to this PR, by installing the following vscode sample: https://github.com/alvsan09/vscode-extension-samples/releases/download/test-provider-prel-0.0.1/test-provider-sample-0.0.1.vsix
  • Open a workspace folder containing markdown files (extension .md)
  • you shall see the following failure message:
    image
  1. Update your theia repository to use this PR
  • Open the same workspace and make sure the message above is no longer displayed and the '.md' files open fine.

A more realistic test can be achieved using the latest ms-python.python extension, version 2022.14.0.,
however additional API support is needed in addition to this change.
A test branch is provided for this purpose:

  1. Update your theia repository to load this PR on top of the branch offering additional missing API as follows:

git fetch
git checkout asl/tests_api_python_test
git cherry-pick asl/test_api_stub
build it and start it.

  1. Download the latest python extension via openVSX registry:
    https://open-vsx.org/api/ms-python/python/2022.14.0/file/ms-python.python-2022.14.0.vsix

  2. Using the extensions view install the vsix above

  3. The extension will attempt to install 4 python related extensions, the ones related to jupyter notes will not be successful however the core python extension will install and be functional, see the following video clip.

tests_api_stub.mp4

The stubbed API has been marked intheia.d.ts with the special tag @stubbed in order to reflect it is as such in the report generated by the eclipse-theia/vscode-theia-comparator

See a portion of the generated report when running it locally:
image

Review checklist

Reminder for reviewers

@alvsan09 alvsan09 added plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility stub issues related to functionality being stubbed labels Sep 29, 2022
@JonasHelming
Copy link
Contributor

Relates to #10669

@JonasHelming
Copy link
Contributor

@alvsan09 Is this ready for a re review?

@alvsan09
Copy link
Contributor Author

@alvsan09 Is this ready for a re review?
Yes, I had missed requesting it, thanks for catching it !!

Copy link
Contributor

@colin-grant-work colin-grant-work left a comment

Choose a reason for hiding this comment

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

The implementations appear sound for stubs (where applicable) and the plugins activate successfully, and the API is correctly evaluated as either newly supported or newly stubbed by the comparator.

@JonasHelming
Copy link
Contributor

@alvsan09 Let's merge this if possible :-)

This enables the possibility to load and start plugins which
depend on the 'Tests' API.
  The 'Tests' functionality will not be operational but the rest of
the functionality offered by the plugin will be.

Signed-off-by: Alvaro Sanchez-Leon <alvaro.sanchez-leon@ericsson.com>
@alvsan09
Copy link
Contributor Author

The commits were squashed and then re-based to latest master just before merging.

@alvsan09 alvsan09 merged commit 7e753f4 into master Oct 19, 2022
@alvsan09 alvsan09 deleted the asl/test_api_stub branch October 19, 2022 16:20
@github-actions github-actions bot added this to the 1.31.0 milestone Oct 19, 2022
@alvsan09
Copy link
Contributor Author

The implementations appear sound for stubs (where applicable) and the plugins activate successfully, and the API is correctly evaluated as either newly supported or newly stubbed by the comparator.

@colin-grant-work , thanks for the review and testing !!

@alvsan09
Copy link
Contributor Author

@alvsan09 Let's merge this if possible :-)
@JonasHelming, Done !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system stub issues related to functionality being stubbed vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants