cucumber / language-server

Cucumber Language Server
MIT License
33 stars 19 forks source link

Support cjs/mjs/cts/mts glue extensions #85

Closed surc54 closed 1 year ago

surc54 commented 1 year ago

πŸ€” What's changed?

This PR adds support for glue files with the following file extensions:

⚑️ What's your motivation?

I wanted to use *.mjs glue files to keep consistency with the rest of my repository.

Fixes #78

🏷️ What kind of change is this?

♻️ Anything particular you want feedback on?

I decided not to edit the default settings since I'm not aware of what it might affect.

πŸ“‹ Checklist:

mpkorstanje commented 1 year ago

LGTM. Though I'm not an expert.

@xeger can you release this along with VS code?

mpkorstanje commented 1 year ago

@surc54 looks like CI disagrees.

surc54 commented 1 year ago

@mpkorstanje Hmmm, those crashes are quite interesting...

I believe I tracked it down to this line in vscode-languageserver: https://github.com/microsoft/vscode-languageserver-node/blob/07b9d293ea775dfd263562da3e8321d40397a3d0/server/src/node/main.ts#L89

That piece of code seems to be responsible for watching the parent process, and in the event that the parent process seems to have been killed, it will kill the current process as well.

If this is the culprit, that means this PR just exposed the problem by pushing the test running time past the 3s barrier.

I've tried to mitigate this by changing the processId parameter to a string (58d0705f25400e474883b8085a2c49ced4ed3882) -- but please note that I'm not aware of the consequences of this change (this is my first dabble into vscode extensions)

mpkorstanje commented 1 year ago

Thanks for the explanation! I don't know much about VSCode either. This project is pretty much all made up by contributions from drive-by-volunteers. Looking at the code though it seems this is the intended solution.

aslakhellesoy commented 1 year ago

Hi @surc54,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

On behalf of the Cucumber core team, Aslak HellesΓΈy Creator of Cucumber