Skip to content

Add eslint support - #307

Merged
mickaelistria merged 1 commit into
eclipse-wildwebdeveloper:masterfrom
AObuchow:add_eslint_support_rebased
Jan 14, 2020
Merged

mickaelistria merged 1 commit into
eclipse-wildwebdeveloper:masterfrom
AObuchow:add_eslint_support_rebased

Conversation

@AObuchow

Copy link
Copy Markdown
Contributor

No description provided.

@mickaelistria

Copy link
Copy Markdown
Contributor

ESLint tests fail for me similarly to how they fail on CI.

@AObuchow

Copy link
Copy Markdown
Contributor Author

I enabled logging of the tsserver to try and see if there's any hints as to why the tests are failing.

@AObuchow
AObuchow force-pushed the add_eslint_support_rebased branch 3 times, most recently from f48ae78 to a5dc534 Compare November 29, 2019 16:03
@AObuchow

Copy link
Copy Markdown
Contributor Author

It turns out the dependencies ([email protected], @typescript-eslint/[email protected], @typescript-eslint/[email protected]) need to be installed in the language_servers in order for the typescript-eslint-language-service plugin to be loaded correctly (despite the fact the test project will have them).

The TestDebug.testFindThreadsAndHitsBreakpoint is still failing, although I'm not sure if this is related to my patch.

@AObuchow
AObuchow force-pushed the add_eslint_support_rebased branch 2 times, most recently from fe9ad11 to 5b579eb Compare November 29, 2019 16:59

@mickaelistria mickaelistria left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The TestJSON is also failing for me locally, and the JSON language server seems actually broken by that change: I cannot use it manually. The reason is that the serverCapabilities aren't returned properly by the LS, instead, the LS says {"jsonrpc":"2.0","id":"1","error":{"code":-32603,"message":"Request initialize failed with message: Cannot read property 'provideFormatter' of undefined"}}

@AObuchow

AObuchow commented Dec 3, 2019

Copy link
Copy Markdown
Contributor Author

The TestJSON is also failing for me locally, and the JSON language server seems actually broken by that change: I cannot use it manually. The reason is that the serverCapabilities aren't returned properly by the LS, instead, the LS says {"jsonrpc":"2.0","id":"1","error":{"code":-32603,"message":"Request initialize failed with message: Cannot read property 'provideFormatter' of undefined"}}

Ok, I'm going to look into it right now.

@AObuchow

AObuchow commented Dec 3, 2019

Copy link
Copy Markdown
Contributor Author

It looks like the newest version of the JSON LS (1.2.2) expects intialization options. The JSON LS was updated to 1.2.2 in #306. See eclipse-theia/theia#6393 & vscode-langservers/vscode-json-languageserver-bin#3.

What confuses me is why the JSON LS tests passed during the build of #306 but not for this change (or why they passed at all).

@AObuchow
AObuchow force-pushed the add_eslint_support_rebased branch from 5b579eb to 54479c3 Compare December 3, 2019 19:41
@AObuchow

AObuchow commented Dec 3, 2019

Copy link
Copy Markdown
Contributor Author

I reverted #306 but left some of the language server updates that should be okay (eg. Angular) - this might cause problems however so it might be best to leave all language servers which aren't relevant to this patch alone.

Also the XML test for testLanguageServer was giving a java.lang.ClassCastException: org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart cannot be cast to org.eclipse.ui.texteditor.ITextEditor for some reason. We'll see if it occurs on the CI.

@mickaelistria

Copy link
Copy Markdown
Contributor

I reverted #306 but left some of the language server updates that should be okay (eg. Angular) - this might cause problems however so it might be best to leave all language servers which aren't relevant to this patch alone.

If it cause problem, just ignore all other language servers, and upgrade only the dependencies that are necessary for ESLint to work.
This will also be easier in term of IP, as the CQ for language servers is taking some time, while ESLint is already approved. The least dependencies we change, the faster it will be to get all CQs approved and the patch merged.

Also the XML test for testLanguageServer was giving a java.lang.ClassCastException: org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart cannot be cast to org.eclipse.ui.texteditor.ITextEditor for some reason. We'll see if it occurs on the CI.

This is because in your IDE/Launch Configuration, webtools XML editor is included and it takes priority of Generic Editor. On CI and in the Maven build, WebTools isn't part of the target-platform, so this shouldn't happen.

@AObuchow

AObuchow commented Dec 3, 2019

Copy link
Copy Markdown
Contributor Author

This will also be easier in term of IP, as the CQ for language servers is taking some time, while ESLint is already approved. The least dependencies we change, the faster it will be to get all CQs approved and the patch merged.

This is enough of a reason for me to leave the other language servers unchanged.

Also the XML test for testLanguageServer was giving a java.lang.ClassCastException: org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart cannot be cast to org.eclipse.ui.texteditor.ITextEditor for some reason. We'll see if it occurs on the CI.

This is because in your IDE/Launch Configuration, webtools XML editor is included and it takes priority of Generic Editor. On CI and in the Maven build, WebTools isn't part of the target-platform, so this shouldn't happen.

Ok good to know - this is due to having m2e in the TP (related to XML LS work)

@AObuchow

AObuchow commented Dec 3, 2019

Copy link
Copy Markdown
Contributor Author

Also do we need a version bump? Maybe +0.1.0?

@mickaelistria

Copy link
Copy Markdown
Contributor

No, it should be fine for versions. The build is configured so that if we need a version bump, it should fail with an explicit error message.

@AObuchow
AObuchow force-pushed the add_eslint_support_rebased branch 2 times, most recently from 393113d to e7979e7 Compare December 4, 2019 15:28
Signed-off-by: Andrew Obuchowicz <[email protected]>
@AObuchow
AObuchow force-pushed the add_eslint_support_rebased branch from e7979e7 to 901f179 Compare December 4, 2019 15:40
@AObuchow

AObuchow commented Dec 4, 2019 •

Copy link
Copy Markdown
Contributor Author

All tests are now passing. I had to do a +0.1.0 on the testing plugin for the build to be successful.

@mickaelistria

Copy link
Copy Markdown
Contributor

@AObuchow I've added you as a cc. of CQ https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21224 so you'll receive notifications. If this gets marked as fixed, then feel free to merge the patch whenever you think it's ready (I see a test failing, I'll retrigger to see it green).

@AObuchow

Copy link
Copy Markdown
Contributor Author

@AObuchow I've added you as a cc. of CQ https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21224 so you'll receive notifications. If this gets marked as fixed, then feel free to merge the patch whenever you think it's ready

Ok sounds good.

(I see a test failing, I'll retrigger to see it green)

I see that as well, I'm not sure why more tests are now failing when they were passing 2 builds ago (no code change IIRC). I'll have to investigate.

@AObuchow

Copy link
Copy Markdown
Contributor Author

@mickaelistria The latest build passed all tests. I guess the previous 2 builds failed due to timing issues.

@mickaelistria

Copy link
Copy Markdown
Contributor

Despite the test failures on CI, I could test the testTSFile scenario locally from this commit (after a build and installation from p2 repo in a vanilla IDE) and see it work. Other failures seem to happen only sporadically.
I think that this patch is good, but legacy tests should be improved at some point. I'm merging it.

@mickaelistria
mickaelistria merged commit e30b879 into eclipse-wildwebdeveloper:master Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants