Open bela53 opened 3 years ago
The pursExe
config is only used for the extension itself. If your build command is spago
, then spago
also uses the purs
in its path to build - you should ensure that spago
is getting the correct PATH
to build there.
I don't think your build outside of the IDE is related to purs version etc - but there is no info here to determine otherwise. Possibly the versions are not matching and you're getting an externs version issue though
I see. What about telling purescript.buildCommand
, if purescript.pursExe
executable is set explicitly? Like prepending the pursExe
directory to PATH
, when spago
is invoked via extension:
PATH="${<parent dir of 'purescript.pursExe'>}:$PATH" /path/to/spago build --purs-args --json-errors
Alternative: The purescript.buildCommand
string might be parsed for any prefixed command environment variables.
IMO that would make sense, as the user already requested to use a custom purs
version.
Not sure how I feel about that, it's a bit of a niche case and I'd find that behaviour surprising - but hard to imagine a situation where it would go far wrong either.
(at least for now) I'd recommend either launching vscode with the correct PATH, or extracting the build command to a shell script or makefile if it starts becoming problematic - just make sure the json errors are passed through.
Providing a custom path to
purs
andspago
executables makes the extension not work properly anymore (e.g.Go to definition
in a.purs
file).settings.json
:Output panel ->
PureScript IDE
log, when navigated to first.purs
file:I also tried
spago build
via CLI followed byPureScript: Restart/Reconnect purs IDE Server
, which now has no effect. TriggeringPureScript: Build
directly from IDE emits following error:The next-to-last line hints, that the custom
purescript.pursExe
path is not respected and searchespurs
inPATH
.PS: Hopefully, my interpretation of above settings to set custom
purs
/spago
paths is correct so far.Original discourse post