-
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
Tests API implementation #12175
Tests API implementation #12175
Conversation
If you look at the CI output there are compilation errors, please fix. |
Thank you for the feedback. Like you both said, it was related to the package file in plugin-ext. |
b1a05e8
to
6df2f2e
Compare
6df2f2e
to
4295b68
Compare
22fb217
to
1bfe5b8
Compare
Can anybody confirm that this kind of import is ok in Theia? see in packages/plugin-ext/src/plugin/type-converters.ts @colin-grant-work , @paul-marechal Also, after doing the |
Yes, that should work fine, assuming the corresponding function is in fact available in the |
You currently have errors related to some import: Note the |
import { cloneAndChange } from '@theia/monaco-editor-core/esm/vs/base/common/objects'; | ||
import * as languages from '@theia/monaco-editor-core/esm/vs/editor/common/languages'; | ||
import { Location } from '../common/plugin-api-rpc-model'; | ||
import * as marked from '@theia/monaco-editor-core/src/vs/base/common/marked/marked'; |
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.
import * as marked from '@theia/monaco-editor-core/src/vs/base/common/marked/marked'; | |
import * as marked from '@theia/monaco-editor-core/esm/vs/base/common/marked/marked'; |
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.
Hi @paul-marechal, we have in fact tried importing marked
with the JavaScript file from esm
instead of the Typescript from src
like the other imports but that generates compilation errors (as shown in the screenshot below) suggesting to add the marked.d.ts file in the marked directory where marked.js
is found following the esm
path which is a temporary fix as it would result in the same error with a fresh build. We don't know the reason of this and we still didn't find a permanent solution :
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.
The reason is that the marked
files in esm
have no sourcemap because marked
isn't compiled from source. marked
is a library that VSCode has in-sourced by adding the compiled JS from a particular commit of marked
. That means there's no source map in esm
, so TS can't find its way back to the d.ts
in the sources. There may be some TS mechanism to import from esm
(definitely the correct idea) and still point to the d.ts
in the src
directory. though.
0a1a182
to
f4cba51
Compare
394f2d4
to
0a95655
Compare
Could it be possible to launch the pipeline again? We just rebased origin/master and it is working locally for |
sure, running! |
7cf4930
to
0392ca7
Compare
Thanks for the reply. It is always appreciated and most responses lead us to helping solve the problems that we face. However, as discussed in the dev-meeting as of 2023-03-21, some tests now fails due to imports like this from At this point, we are not sure if we should replace all By the way, once Theia compiled, whether it is with |
41e929b
to
9aa320c
Compare
About the plugin host crash, I get the following error in my console when trying this PR:
Something is trying to import a CSS file from the plugin host and it is causing this problem. Note that Theia frontend code can import |
@colin-grant-work do I guess correctly that |
@mathblin whatever you import from that package you need to make sure to not import |
@mathblin I put a breakpoint in
The fix would be to not import symbols from |
Not exclusively. It includes a number of folders from the Code OSS repo in import { IRange, Range } from '@theia/monaco-editor-core/esm/vs/editor/common/core/range';
import { IPosition } from '@theia/monaco-editor-core/esm/vs/editor/common/core/position';
import { URI as Uri, UriComponents } from '@theia/monaco-editor-core/esm/vs/base/common/uri';
import { IMarkdownString } from '@theia/monaco-editor-core/esm/vs/base/common/htmlContent'; |
dcafad9
to
6e2bacb
Compare
Hello @paul-marechal @colin-grant-work @marcdumais-work , I was curious to know if anyone could help us fix this issue with The error is also reproductible with a test file. One can go in export class TestService ... Important: You'll have to use this fork of eclipse theia : https://github.com/D-Zaq/theia Edit: the branch is Well, any help would be appreciated. |
@mathblin I only quickly looked over why the From constructor(
@inject(IContextKeyService) contextKeyService: IContextKeyService,
@inject(IInstantiationService) instantiationService: IInstantiationService,
@inject(IStorageService) private readonly storage: IStorageService,
// @IEditorService private readonly editorService: IEditorService,
@inject(ITestProfileService) private readonly testProfiles: ITestProfileService,
@inject(INotificationService) private readonly notificationService: INotificationService,
// @IConfigurationService private readonly configurationService: IConfigurationService,
@inject(ITestResultService) private readonly testResults: ITestResultService,
@inject(IWorkspaceTrustRequestService) private readonly workspaceTrustRequestService: IWorkspaceTrustRequestService,
) { This is all the dependencies of your components, and all need to have a valid binding for |
Now I'm also a bit queasy about some of the service identifiers you are using: edit: Note that even if you try to inject using these symbols, unless you have them bound in this runtime's Inversify container then nothing will happen and Inversify will fail to resolve the injections and instantiations. In this specific case we have a |
Tried looking at the
For better or for worse, we define and implement our own APIs/abstractions instead of directly using what third-party libraries might use (e.g. I think it's especially important when creating whole new components like |
To supplement what @paul-marechal has said, it is possible to integrate services available from |
Thank you all for the quick responses. We'll look into them in the next few days and we'll also try to answer your comments (which are helpful) as fast as possible. |
I think we can use the |
I think you are absolutely right about avoiding the use of For the first point, I don't think we should try the |
fd89e98
to
40dc5ba
Compare
How do we re-trigger? the ECA looks fixed. |
I triggered |
4ad15e0
to
fa2f4d7
Compare
@JonasHelming can we re-triggre again 🙏🏼 ? |
f60dc65
to
8321caf
Compare
There was an update to the function declaration called |
…t API Project lead: Kevin Clapperton Developers: Zakaria Diabi, Mathieu Bussières Testers: Kevin Clapperton, Théo St-Denis Signed-off-by: Zakaria Diabi <d.zaki2396@gmail.com> Signed-off-by: Mathieu Bussières <mathblin@hotmail.com> Signed-off-by: Théo St-Denis <theo.st-denis@polymtl.ca> Signed-off-by: Kevin Clapperton <keclapperton@gmail.com> Co-authored-by: Mathieu Bussières <mathblin@hotmail.com> Co-authored-by: Théo St-Denis <theo.st-denis@polymtl.ca> Co-authored-by: Kevin Clapperton <keclapperton@gmail.com>
8321caf
to
f0e219f
Compare
I restored the commit before the changes from the new Test API stub, but keep the correction of headers, comments and links to imported code. Also, made sure to double check the build, tests and lint. |
Incorporated and superseded by #12935 |
What it does
Initial setup for the VSCode tests API implementation by the students team from Polytechnique Montreal.
Issue adressed
Feature description of the issue: Add tests namespace from VSCode API #10669
Review checklist
Reminder for reviewers