ember-tooling / ember-language-server

Language Server Protocol implementation for Ember.js projects
MIT License
100 stars 39 forks source link

resolvePackageRoot logic is incorrect #414

Closed NullVoxPopuli closed 2 weeks ago

NullVoxPopuli commented 2 weeks ago

image

This will traverse back to the root of the disk -- and we want to stop at a git-boundary.

I guess, if there is a git boundary -- not every project will use git

lifeart commented 2 weeks ago

It's expected behaviour, because packageRoot is not equal to projectRoot, npm may lookup till user homedir for global node_modules.

It’s because we have to work in virtual env, like browsers, we can’t rely on project root dir, for monorepo case package may be under project (on top-level node-modules)

NullVoxPopuli commented 2 weeks ago

I think, development wise, i way need to work in tmp then! Lol

lifeart commented 2 weeks ago

@NullVoxPopuli it's better to always be in web-container, because there no trust for js ecosystem!

NullVoxPopuli commented 2 weeks ago

how do you do that locally? in stackblitz-based things, perf seems kinda slow 😅

lifeart commented 2 weeks ago

@NullVoxPopuli no web containers on my side, just crossing my fingers once doing npm install! 😂