nwolverson / atom-ide-purescript

Atom package for PureScript build, completion, etc support

Home Page:https://atom.io/packages/ide-purescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Output directory missing intermediate folder delimiter

matthewspeck opened this issue · comments

On one Windows machine (to which I synced my Atom settings with sync-settings), ide-purescript is trying to find the output directory seemingly by combining %USERPROFILE% (which appears to be C:\Users\matth with .atom\<rest>, resulting in C:\Users\matth.atom\<rest>. There doesn't seem to be any setting for either the profile root or the relative path for the output. As a result, I get the errors as seen in the attached image the first time I load a .purs file.

ide-purescript_error

Interestingly, "View Code" in the ide-purescript settings correctly loads from C:\Users\matth\.atom<rest>.

The path that you reference is a stack trace, if the paths are not correct there I think either they are being printed badly, or your atom setup is more broken yet.

To check paths actually being used by the ide-purescript package the dev tools console output would be a better bet, an example from my console is:

Starting IDE server on port 15815 with cwd /Users/nicholaw/git/purescript-hello

The output is being looked for in the default compiler location, which is output in your project root directory - if you have opened as folder in atom the directory containing output and bower.json at the root, you should be fine in this regard

Okay, it looks like the error formatting created the red herring. It was, in fact, a missing output folder. Seems like ide-purescript could have a graceful way of dealing with a project that hadn't yet been built locally, such as immediately after cloning a repo. At minimum, it could report a missing output folder explicitly, as I'd imagine many people would open code without having built it. Imagine someone [very much like myself] who had just started going through Purescript by Example. ;)

Glad you sorted it out. Definitely on the roadmap to improve support for projects that need to be built (should already be tracked under another issue) but needs changes in the compiler side first.