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

Vue Support - #83 #1241

Merged
merged 1 commit into from Jun 28, 2023
Merged

Conversation

zulus
Copy link
Contributor

@zulus zulus commented Jun 7, 2023

I wasn't sure howto correctly register other language files defined in https://github.com/vuejs/language-tools/blob/master/packages/vscode-vue/package.json

*.java classes are mostly copy-paste from typescript server

@zulus
Copy link
Contributor Author

zulus commented Jun 11, 2023

what now?

@vrubezhny
Copy link
Contributor

what now?

@zulus Thanks for contributing!

It would be great if you add at least some simple JUnit tests with vue.js cases (like to see if vue.js specific diagnostic/code assist/etc. is provided by the LS),

@vrubezhny
Copy link
Contributor

/request-license-review

@github-actions
Copy link

/request-license-review

⚠️ Failed to request review of not vetted licenses.

Workflow run (with attached summary files):
https://github.com/eclipse/wildwebdeveloper/actions/runs/5237919073

@vrubezhny
Copy link
Contributor

/request-license-review

@github-actions
Copy link

/request-license-review

⚠️ Failed to request review of not vetted licenses.

Workflow run (with attached summary files):
https://github.com/eclipse/wildwebdeveloper/actions/runs/5237945044

@zulus
Copy link
Contributor Author

zulus commented Jun 12, 2023

what now?

@zulus Thanks for contributing!

It would be great if you add at least some simple JUnit tests with vue.js cases (like to see if vue.js specific diagnostic/code assist/etc. is provided by the LS),

Sure!

@zulus
Copy link
Contributor Author

zulus commented Jun 12, 2023

I prepared basic tests, similar to angular:

  1. Test marker inside method
  2. Test marker inside template
  3. Completion proposal based on component javascript source
  4. Completion proposal based on broken template

@zulus
Copy link
Contributor Author

zulus commented Jun 12, 2023

BTW: during playing with tests, I realized that TestAngular and TestESLint might use system node, rather than built-in

@vrubezhny
Copy link
Contributor

BTW: during playing with tests, I realized that TestAngular and TestESLint might use system node, rather than built-in

Why do you think so? They both use NodeJSManager.getNpmLocation().getAbsolutePath() to get an npm executable location, then add arguments for options.

In case of your test, you're generating a command that runs Node.js executable, which gets a path to NPM executable as first argument, then arguments for options...

[D:\a\wildwebdeveloper\wildwebdeveloper\org.eclipse.wildwebdeveloper.tests\target\work\.node\node-v18.16.0-win-x64\node.exe, D:\a\wildwebdeveloper\wildwebdeveloper\org.eclipse.wildwebdeveloper.tests\target\work\.node\node-v18.16.0-win-x64\npm.cmd, install, --no-bin-links, --ignore-scripts

not sure how this supposed to work...

@zulus
Copy link
Contributor Author

zulus commented Jun 13, 2023

BTW: during playing with tests, I realized that TestAngular and TestESLint might use system node, rather than built-in

Why do you think so? They both use NodeJSManager.getNpmLocation().getAbsolutePath() to get an npm executable location, then add arguments for options.

In case of your test, you're generating a command that runs Node.js executable, which gets a path to NPM executable as first argument, then arguments for options...

[D:\a\wildwebdeveloper\wildwebdeveloper\org.eclipse.wildwebdeveloper.tests\target\work\.node\node-v18.16.0-win-x64\node.exe, D:\a\wildwebdeveloper\wildwebdeveloper\org.eclipse.wildwebdeveloper.tests\target\work\.node\node-v18.16.0-win-x64\npm.cmd, install, --no-bin-links, --ignore-scripts

not sure how this supposed to work...

On mac, this code produces me only path to NPM location. NPM for *nix have /bin/env node, but tests ignore PATH produced by NodeJSManager

@zulus
Copy link
Contributor Author

zulus commented Jun 13, 2023

On mac, this code produces me only path to NPM location. NPM for *nix have /bin/env node, but tests ignore PATH produced by NodeJSManager

See https://github.com/eclipse/wildwebdeveloper/blob/e52e0990f609f3dcbac5648a4bd012ecf9d753a5/org.eclipse.wildwebdeveloper.embedder.node/src/org/eclipse/wildwebdeveloper/embedder/node/NodeJSManager.java#L120, on *nix will return true, +x should be removed from npm script files, or just remove "can execute" checking for npm.

This is also reason why windows build not working. So I dropped attaching node path in Vue tests.

@vrubezhny
Copy link
Contributor

vrubezhny commented Jun 13, 2023

, on *nix will return true, +x should be removed from npm script files, or just remove "can execute" checking for npm.

I wonder why nobody else did complain about Mac & Win NPM run failures until now...
Unfortunately I cannot verify in locally on Mac, but previously ran tests for Angular and ESLint stuff successfully execute NPM install using the embedded NPM executable.

If it's true then it's worth reporting it as an issue

But looking at the GitHub/Jenkins check logs I see NPM executable started from

D:\a\wildwebdeveloper\wildwebdeveloper\org.eclipse.wildwebdeveloper.tests\target\work\.node\node-v18.16.0-win-x64\npm.cmd

on Windows and

/home/jenkins/agent/workspace/Wildwebdeveloper_PR-1241/org.eclipse.wildwebdeveloper.tests/target/work/.node/node-v18.16.0-linux-x64/bin/npm

on Linux - which are surely the Embedded versions, not the system ones.
Probably we have to add MacOS to the test OS matrix

@zulus
Copy link
Contributor Author

zulus commented Jun 13, 2023

Maybe because I've run tests via Junit plugin launcher inside eclipse, not by mvn verify, or other contributors have node inside main PATH (so tests just uses it), my PATH for JUnit Launcher is always fresh ;) I'll prepare ticket.

As I see build fail on mvn-license-check, can I do something?

Npm licenses has been successfully resolved by IP Team as I see.

Any other suggestions for my contribution? I act intuitively now and probably haven't enough experience with LSP4E/TM4E, so just tell me what I should do :D ( this patch is an initiation before I start some PDT improvements :P )

@vrubezhny
Copy link
Contributor

Maybe because I've run tests via Junit plugin launcher inside eclipse, not by mvn verify, or other contributors have node inside main PATH (so tests just uses it), my PATH for JUnit Launcher is always fresh ;) I'll prepare ticket.

That's a question, but, imho, yes the system Node.js/Npm may be used in this case (and that's expected)

As I see build fail on mvn-license-check, can I do something?

Just give me some time to review the PR.

Npm licenses has been successfully resolved by IP Team as I see.

Yes, and that's great.

Any other suggestions for my contribution? I act intuitively now and probably haven't enough experience with LSP4E/TM4E, so just tell me what I should do :D ( this patch is an initiation before I start some PDT improvements :P )

If you have nothing to add to the PR at this moment we can merge it (after review) as is and then improve the code later. Imho, this is a great improvement.

@vrubezhny vrubezhny closed this Jun 13, 2023
@vrubezhny vrubezhny reopened this Jun 13, 2023
@vrubezhny
Copy link
Contributor

(Sorry, closed unintentionally by clicking the wrong button. Everything is restored and open)

Copy link
Contributor

@vrubezhny vrubezhny left a comment

Choose a reason for hiding this comment

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

Overall looks good. Please see the requested changes to be fixed before we can merge

@vrubezhny
Copy link
Contributor

@zulus Could you please rebase and resolve the requested changes?

@zulus
Copy link
Contributor Author

zulus commented Jun 28, 2023

@zulus Could you please rebase and resolve the requested changes?

Done, I updated license headers, added missing one, and rebased to current HEAD (I see license problems now :/)

BTW, in the meantime vue-language server has been upgraded (1.7.0 to 1.8.3 - https://github.com/vuejs/language-tools/blob/master/CHANGELOG.md), so after merge I'll prepare another pull request with new version

@vrubezhny
Copy link
Contributor

/request-license-review

@vrubezhny
Copy link
Contributor

Done, I updated license headers, added missing one, and rebased to current HEAD (I see license problems now :/)

I created the Review requests for the updated modules, hope they will be resolved soon.

BTW, in the meantime vue-language server has been upgraded (1.7.0 to 1.8.3 - https://github.com/vuejs/language-tools/blob/master/CHANGELOG.md), so after merge I'll prepare another pull request with new version

Actually you can add this change right now - it will require an additional review for the LS (as it's minor version is changed), but we haven't had any problems with the IP Team review for the previous version, so I don't expect any with the latest one.

@zulus
Copy link
Contributor Author

zulus commented Jun 28, 2023

Actually you can add this change right now - it will require an additional review for the LS (as it's minor version is changed), but we haven't had any problems with the IP Team review for the previous version, so I don't expect any with the latest one.

Done

@vrubezhny
Copy link
Contributor

/request-license-review

@vrubezhny
Copy link
Contributor

I've started the IP Team review for Vue.js LS 1.8.3 - so need to wait until it finshes

@zulus please follow #1241 (comment)

Copy link
Contributor

@vrubezhny vrubezhny left a comment

Choose a reason for hiding this comment

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

The code looks good to me.

@zulus Thank you for the contribution!

@vrubezhny vrubezhny merged commit dd3bab2 into eclipse-wildwebdeveloper:master Jun 28, 2023
6 checks passed
@vrubezhny vrubezhny mentioned this pull request Jun 29, 2023
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.

None yet

2 participants