Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

reintroduce CDX LSP #6

Merged
merged 7 commits into from
Dec 20, 2017
Merged

reintroduce CDX LSP #6

merged 7 commits into from
Dec 20, 2017

Conversation

xtough
Copy link
Contributor

@xtough xtough commented Dec 13, 2017

No description provided.

@CLAassistant
Copy link

CLAassistant commented Dec 13, 2017

CLA assistant check
All committers have signed the CLA.

@xtough
Copy link
Contributor Author

xtough commented Dec 13, 2017

@amiramw @manwithafox please review. I am not sure about the launcher paths in language_server_node_cdx.yml

version: 0.0.+
repository_root: "https://buildpackcomponentrepositorycdx.cfapps.sap.hana.ondemand.com"
version: 1.*.*
repository_root: "https://lsp-component-cds.cfapps.eu10.hana.ondemand.com/"
env:
workdir: language_server_node_cdx/
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Where does that workdir come from? I don't see it in our lsp.zip inside of the app.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ahh, I see: resources dir of the buildpack

version: 0.0.+
repository_root: "https://buildpackcomponentrepositorycdx.cfapps.sap.hana.ondemand.com"
version: 1.*.*
repository_root: "https://lsp-component-cds.cfapps.eu10.hana.ondemand.com/"
env:
workdir: language_server_node_cdx/
exec: language_server_node_cdx/launcher.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

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

same for the launcher.sh -- is this a framework thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same

Copy link
Contributor Author

@xtough xtough left a comment

Choose a reason for hiding this comment

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

how to call node binary?

exec npm start
echo 'Starting server.js using node...' >launcher.log
./link_logs.sh &>/dev/null </dev/null &
exec ./nodejs/bin/node ./src/server.js --stdio --strict-code-completion
Copy link
Contributor Author

Choose a reason for hiding this comment

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

would nodejs be found like that? or would it be better to push this invocation down into the "start" script of our lsp.zip?

Copy link
Contributor

Choose a reason for hiding this comment

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

Executing node or npm (or trying to locate it via 'which') in the ssh console does not find it. So I guess this is a contract that node is located at ./nodejs/bin/node i.e. starting it via npm start will also not improve things.
The link_logs.sh was a try out but did never work (=>remove). Guess we have no permission to write something in the ~/logs directory. Nevermind. Would be interesting if the LSP infrastructure does support telemetry/event request. Log file is currently reset upon restart of LS.

@@ -0,0 +1,4 @@
#!/bin/bash
rm ~/logs/cdx.log
echo '' >~/app/.java-buildpack/language_server_node_cdx/cdx_lsp_server.log
Copy link
Contributor

Choose a reason for hiding this comment

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

remove whole file


exec npm start
echo 'Starting server.js using node...' >launcher.log
./link_logs.sh &>/dev/null </dev/null &
Copy link
Contributor

Choose a reason for hiding this comment

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

remove line

version: 0.0.+
repository_root: "https://buildpackcomponentrepositorycdx.cfapps.sap.hana.ondemand.com"
version: 1.*.*
repository_root: "https://lsp-component-cds.cfapps.eu10.hana.ondemand.com/"
env:
workdir: language_server_node_cdx/
Copy link
Contributor

Choose a reason for hiding this comment

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

Change section below - we are now using stdio instead of sockets:
ipc:
protocol: "stream"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@amiramw amiramw merged commit 329b2f7 into SAP-archive:master Dec 20, 2017
amiramw pushed a commit that referenced this pull request Jun 5, 2018
* Update deploy buildpack job URL.

* Update launcher.sh for jdt 0.18.0 (#26)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants