Open andrew-paterson opened 1 year ago
Hi @andrew-paterson! Thank you for report! Could you specify:
Project details:
Project structure:
My apologies some data was missing above.
vsCode version 1.77.0
UELS version v3.0.48
Project details
Ember version 3.28
ember-template-lint version 3.16.0
There are no in-repo addons or in-repo engines.
Project structure
There is only 1 ember project in the repo. The ember app is at the root of the repo. npm is used for package management, via Node version manager. I've tried both with linked packages and without. Sometimes I also have nested linked packages.
@andrew-paterson thank you for details!
Could you send output of this window:
Hi @lifeart
Thank you!
Here it is. In case it helps, /home/paddy/test/monolith
is the path to an Elixir project, not an Ember project.
"Initializing Ember Language Server at /home/paddy/test/monolith"
[Info - 18:04:59] UELS: executeInitializers
To run Ember locally, please first run export EMBER_SERVE=true
[Info - 18:05:00] Ember CLI project added at /home/paddy/test/test-ember-assets
[Info - 18:05:01] Connection to server got closed. Server will restart.
[Error - 18:05:01] Request workspace/executeCommand failed.
Error: Connection got disposed.
at Object.dispose (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:62879)
at Object.dispose (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:142962)
at w.handleConnectionClosed (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:143175)
at w.handleConnectionClosed (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:203521)
at t (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:141264)
at r.invoke (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:64492)
at o.fire (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:65253)
at Y (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:52137)
at r.invoke (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:64492)
at o.fire (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:65253)
at d.fireClose (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:73134)
at ChildProcess.<anonymous> (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:84095)
at ChildProcess.emit (node:events:538:35)
at maybeClose (node:internal/child_process:1092:16)
at Socket.<anonymous> (node:internal/child_process:451:11)
at Socket.emit (node:events:526:28)
at Pipe.<anonymous> (node:net:687:12)
[Error - 18:05:01] Request workspace/executeCommand failed.
Error: Connection got disposed.
at Object.dispose (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:62879)
at Object.dispose (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:142962)
at w.handleConnectionClosed (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:143175)
at w.handleConnectionClosed (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:203521)
at t (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:141264)
at r.invoke (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:64492)
at o.fire (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:65253)
at Y (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:52137)
at r.invoke (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:64492)
at o.fire (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:65253)
at d.fireClose (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:73134)
at ChildProcess.<anonymous> (/home/paddy/.vscode/extensions/lifeart.vscode-ember-unstable-3.0.48/dist/node/client/nodeClientMain.js:1:84095)
at ChildProcess.emit (node:events:538:35)
at maybeClose (node:internal/child_process:1092:16)
at Socket.<anonymous> (node:internal/child_process:451:11)
at Socket.emit (node:events:526:28)
at Pipe.<anonymous> (node:net:687:12)
[Info - 18:05:02] lazy init enabled, waiting for config from VSCode
"Initializing Ember Language Server at /home/paddy/test/monolith"
It looks like server is going mad right after this line:
[Info - 18:05:00] Ember CLI project added at /home/paddy/test/test-ember-assets
If we temporary remove this folder (/home/paddy/test/test-ember-assets
) is all works fine?
I've tracked down the issue via the output tab. One or two ember projects run process.exit
and thus stop the ember server if a certain environment variable is not set, or if the post is not set to a specific number.
Is it possible to have the UELS run a command like export FOO=bar
before it runs ember serve?
@andrew-paterson, you mean inside ember-cli-build.js
there is smf is exiting process?
There is few possible solutions:
init
hook (https://github.com/lifeart/ember-language-server/blob/component-context-info-origin/src/project.ts#L208)ember-cli-build.js
to not failIn scope of this conversation https://github.com/lifeart/ember-language-server/issues/342
We agreed on environment name, specified by language server to be able to detect inside ember-cli-build is it executed by ls or ember-cli, if it may be a case - let me know, it's relatively simple to ship
Thank you, that clarifies things.
I can definitely find a sane workaround based on those 3 options.
@andrew-paterson let me know if I can help you somehow, also, if issue may be fixed if uELS introduce it's own env variable (EMBER_LANGUAGE_SERVER
) - I could simply add it
Would that allow me to set custom env vars inside that?
Another option would be if the settings could allow commands to be specified to run on the environment before ember serve
.
@andrew-paterson uELS does not run ‘ember serve’ command, it’s only loads config/environment.js file
@lifeart, I found a good workaround to avoid the need for ENV vars before loading the environment file. It would be good to be able to set those though.
@andrew-paterson in general, we need environment.js
file only for podModulePrefix
, and it seems easier to allow users specify it manually for projects, or allow to disable such discovery case. One more option - is just get value using AST parsing.
I see the above error in the runtime status tab for the extension settings, and it seems that the language server is nt starting up.
No linting hints are showing up in my template files. I have confirmed that running
npm run lint:hbs:fix
from my project directory works.I've also tried with only one Ember project in a workspace and the same issue occurred.
Ubuntu 22.04.2 LTS