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

Install devonfw extension pack to vscode automatically #99

Closed
hohwille opened this issue Apr 11, 2019 · 7 comments
Closed

Install devonfw extension pack to vscode automatically #99

hohwille opened this issue Apr 11, 2019 · 7 comments
Labels
enhancement New feature or request scripts related to shell scripts (bash and CMD) software software-package with 3rd party products vscode Microsoft visual studio code
Milestone

Comments

@hohwille
Copy link
Member

Like with Eclipse we should support to automically install plugins for VS Code. The default should be our extension pack:
https://github.com/devonfw/devonfw-extension-pack-vscode

The scripting of the installation is simple:

code --install-extension «extension-ID»
@hohwille hohwille added enhancement New feature or request scripts related to shell scripts (bash and CMD) software software-package with 3rd party products labels Apr 11, 2019
@hohwille hohwille added this to the release:3.0.0 milestone Apr 11, 2019
@hohwille
Copy link
Member Author

Already figured it out from here:
https://marketplace.visualstudio.com/itemdetails?itemName=devonfw.devonfw-extension-pack
We need to call this command:

code --install-extension devonfw.devonfw-extension-pack

@hohwille
Copy link
Member Author

hohwille commented May 7, 2019

If have implemented this as planned and also fixed the VS Code for MacOS (as always MacOS is lacking compatiblity with other plattforms as Apps are handled totally different there, so we manually create a code launch script in bin folder to make it compatible with windows and linux).
The issue I am still facing is that (unlike with eclipse) the --install-extension feature is working in the foreground. Hence VS code app is started and does not even end automatically after installation. Currently the user has to shutdown the VS Code IDE to make the script continue.
We could either run the installation as a background process and consider this as a feature (devon setup will then automatically launch VS Code) or we need to try to find a way link with eclipse to tell VS Code to shut down automatically after installation and if possible even run headless.

@hohwille
Copy link
Member Author

hohwille commented May 7, 2019

IMHO running in background is a simple solution (KISS).
However, now I am seeing this error:

[main 2019-05-07T10:08:37.161Z] Error: listen EEXIST /Users/hohwille/Library/Application Support/Code/1.31.1-main.sock
    at Server.setupListenHandle [as _listen2] (net.js:1313:19)
    at listenInCluster (net.js:1378:12)
    at Server.listen (net.js:1477:5)
    at /projects/devon/software/vscode/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:186:590
    at new Promise (<anonymous>)
    at Object.t.serve (/projects/devon/software/vscode/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:186:523)
    at r (/projects/devon/software/vscode/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:531:869)
    at F (/projects/devon/software/vscode/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:534:386)
    at t.e.invokeFunction (/projects/devon/software/vscode/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:222:588)
    at /projects/devon/software/vscode/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-main/main.js:536:234

It would be lovely if users of the JS ecosystem could also test and contriubte to devon-ide.

@hohwille
Copy link
Member Author

hohwille commented May 7, 2019

Does the error mean that the extension-pack is already installed?
I just deleted the software/vscode folder and run devon vscode setup again.
Where does VS Code install its extensions?
Any help? Somebody? I am not a real user of VS Code...

@sjimenez77
Copy link
Member

Hi @hohwille,

The error says that the 1.31.1-main.sock file already exists. AFAIK this file is the socket stream file that VS Code uses to update itself. Maybe it is not removed properly or a previous update process got stuck.

In order to know where the extensions are downloaded and installed you can check this link https://vscode-docs.readthedocs.io/en/stable/extensions/install-extension/

Best regards,
Santos

@hohwille
Copy link
Member Author

hohwille commented May 7, 2019

@sjimenez77 thanks for your feedback. Valuable input that is very much apreciated!
So indeed my installation process got stuck and it seems the socket file was not cleaned. I will do some more testing and see if I can improve the behaviour to avoid others running into this error.
Otherwise I am done with this issue and will close as soon as PR is merged.

hohwille added a commit that referenced this issue May 8, 2019
#99: automatically install devonfw extension pack into vscode
#103: restored integration documentation
#70: find git or cygwin from registry
#101: fixed
#84: prepared cobigen and TM Terminal
@hohwille
Copy link
Member Author

hohwille commented May 8, 2019

Done with PR #105 now

@hohwille hohwille closed this as completed May 8, 2019
@hohwille hohwille added the vscode Microsoft visual studio code label Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scripts related to shell scripts (bash and CMD) software software-package with 3rd party products vscode Microsoft visual studio code
Projects
None yet
Development

No branches or pull requests

2 participants