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

atom-ide-purescript <> pscid imcompatibility: ECONNREFUSED

Open rvion opened this issue 7 years ago • 2 comments

I always run pscid along atom but I get a lot of errors:

case 1: atom errors

I get ths in atom

image

when I "ide purescript: restart psc ide", I then get

image

then it ends up working

case 2: pscid crash

 (o,o)   (o,o)   ,,,(o,o),,,   (o,o)   (o,o)
 {`"'}   {`"'}    ';:`-':;'    {`"'}   {`"'}
 -"-"-   -"-"-                 -"-"-   -"-"-



Press b to run a full build (tries "npm run build" then "pulp build")
Press t to test (tries "npm run test" then "pulp test")
Press r to reset
Press q to quit


/Users/rvion/dev/redittor/src/Main.purs
/usr/local/lib/node_modules/pscid/output/Control.Monad.Eff.Exception/foreign.js:25
    throw e;
    ^

Error: connect ECONNREFUSED 127.0.0.1:15641
    at Object.exports._errnoException (util.js:1036:11)
    at exports._exceptionWithHostPort (util.js:1059:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)

/Users/rvion/.atom/packages:

├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
pscid --version
1.12.0
pulp --version
Pulp version 10.0.0
psc version 0.10.2 using /Users/rvion/.local/bin/psc
psc --version
0.10.2

/cc @kRITZCREEK

rvion avatar Dec 14 '16 10:12 rvion

Do you ever close pscid? As I recall both attempt to connect to the same psc-ide-server but I think pscid maybe always closes the server on exit (while the atom plugin only closes it if it was the one who started it)

nwolverson avatar Dec 14 '16 10:12 nwolverson

I usually do not, but I may be closing it from time to time. I'll pay more attention to check if I notice a correlation.

I wrote below a small scenario where the problem does not occurs, but It might also just be that it does not happens each time.

both attempt to connect to the same psc-ide-server but I think pscid maybe always closes the server on exit (while the atom plugin only closes it if it was the one who started it)

could psc-ide have a close-if-no-consumers action instead that both pscid and atom-ide-purescript ?

also, I have the impression that atom notification and/or pscid message about "starting" a pscid-server are not quite correct:

example

1: start pscid

pscid
Starting psc-ide-server
Watching /Users/rvion/dev/poney-loving-website on port 15859

2: atom: ide purescript: restart psc ide

image

3: restart pscid

pscid
Starting psc-ide-server
Watching /Users/rvion/dev/poney-loving-website on port 15194

📝 here, pscid reuse the server started by atom-ide-server

4: I close pscid, atom-ide-purescript keeps working

rvion avatar Dec 14 '16 11:12 rvion