atom-ide-purescript icon indicating copy to clipboard operation
atom-ide-purescript copied to clipboard

Errors when PureScript project is not at Atom project root

Open lexun opened this issue 7 years ago • 2 comments

I believe this is a regression as the issue is not present if I roll back to v0.19.1. It appears as early as v0.19.0-lsp3, and is still present in v0.20.3. So it seems something went wrong somewhere in here: https://github.com/nwolverson/atom-ide-purescript/compare/v0.19.1...v0.19.0-lsp3.

Given a directory structure like this:

my-project
├── README.md
├── client
│   ├── bower.json
│   ├── bower_components
│   ├── output
│   ├── src
│   └── test
└── server
    └── main.ex

When I open Atom at my-project, I get the following errors:

Module Prelude was not found. Make sure the source file exists, and that it has been provided as an input to the compiler.

If I open Atom at my-project/client, there are no errors and things work as expected.

Screenshot

image

Thanks for the great :atom: 📦 ! 🥇

lexun avatar Jan 11 '18 22:01 lexun

For now I'd suggest opening atom at the project root, but ultimately I'd like to at least start multiple language server processes, 1 per project, as the vscode plugin currently does, shouldn't be too hard I think.

nwolverson avatar Jan 12 '18 22:01 nwolverson

Actually I take it back, I don't see a way of making this work without changes to atom-languageclient , as servers are associated with project roots, and I don't think searching subdirectories recursively for a PureScript project is a good idea.

However I think there's a simple workaround (which also makes things a bit more explicit) if you have atom open at a level above your PureScript project: add an additional project folder and move it above the parent in the list:

screen shot 2018-01-13 at 20 49 16

nwolverson avatar Jan 13 '18 20:01 nwolverson