nwolverson / vscode-ide-purescript

PureScript IDE support for VS Code
https://marketplace.visualstudio.com/items/nwolverson.ide-purescript
MIT License
189 stars 35 forks source link

Build error(maybe psc-package related) #54

Closed RAbraham closed 7 years ago

RAbraham commented 7 years ago

Hi, This may very well be due to a lack of understanding of how psc-package works but I'm getting a build error while trying to build in vscode from a psc-package created personal project

Details:

Steps:

Result: Shows Error message Build Error. I don't see any specific errors being reported in the bottom status ribbon.

nwolverson commented 7 years ago

How did you configure your build command? By default the command is something like pulp build -- --json-errors, but pulp doesn't yet support psc-package.

You can set a custom build command but as the config doesn't support shell syntax, you may want to use a wrapper script.

(If you build externally then rely on rebuild on save, things should be fine with psc-package, but you will need to configure appropriate file globs if you want goto-definition)

RAbraham commented 7 years ago

my bad, I should have mentioned that I'm not using pulp. I tried updating my settings.json with the following addition:

"[purescript]": {
            "purescript.buildCommand": "psc-package build"
    }

psc-package is in my path. But when I build, I get the following warning:

file: 'file:///../settings.json'
severity: 'Warning'
message: 'Unknown Identifier. Use language identifiers'
nwolverson commented 7 years ago

Try not nesting under [purescript], I think that is just for editor settings. At least I only see autocomplete in settings.json for purescript.blah at the top level

RAbraham commented 7 years ago

Unnesting worked +1. But I could have misinterpreted your suggestion but "purescript.buildCommand": "psc-package build" should have worked?

nwolverson commented 7 years ago

Also you'll need to run a build command that runs psc with --json-errors flag, if you want to get error results, I don't think psc-package can do this. Otherwise you can run purs compile with some globs directly, or wrap in a script which uses psc-package sources to get the correct globs to pass in.

But again, mostly the rebuild on save which uses purs ide server directly