Comments (7)
Firstly, do you mean to run psc-ide-server
rather than the combined purs
executable that recent compiler versions use?
The code for launching the IDE server is here: https://github.com/kRITZCREEK/purescript-psc-ide/blob/master/src/PscIde/Server.purs
You could write a wrapper script to start a server in docker, but you'd need to do a dance to ensure that works with the randomly chosen port number - instead I'd suggest starting the server yourself.
So e.g. start a purs ide server -p 54321
in docker exposing some port 54321
, and echo -n 54321 > .psc-ide-port
before starting. The cwd of the server has to match the project directory, so I'd imagine that may be an issue to running inside docker in general.
How are you consuming this package?
from purescript-ide-purescript-core.
I picked the first ps-docker image I found (https://github.com/Risto-Stevcev/purescript-docker) and ran with it, seems to be using recent enough PS but I didn't see the purs
executable.
Thanks! Starting the server separately should be a viable solution, will try that.
The use case is using VSCode with PS in a class setting and attempting to provide an OS-agnostic turn-key development environment to the participants. Docker mounts the project directory as a volume. If file paths that VSCode and PS executables see have to match this could be a problem, but an addressable one, I think.
This package: not consuming it, was just poking around the plugin code to see how the IDE server is started and found this.
from purescript-ide-purescript-core.
Looks like it's ultimately easier to install npm
natively and do it the regular way.
from purescript-ide-purescript-core.
from purescript-ide-purescript-core.
Apologies for obscurity! I was referring to my use case and the original idea of having students work in VSCode/Atom with a self-contained development environment (with PS, node for running web servers, etc.) instead of installing the npm/node/PS stack natively on their platform. The IDE server was just the first stumbling block I encountered.
TL;DR the attempt to simplify environment setup using VSCode and docker was flawed and this issue can be closed or become a low-priority feature request.
from purescript-ide-purescript-core.
No problem, I'll certainly leave the issue open as it's a valid use case, just has several issues to solve. I had a similar experience doing Advent of Code in multiple languages, getting a compiler running inside Docker was straightforward but tooling assumes a native installation
from purescript-ide-purescript-core.
Using the docker image from https://github.com/codewars/purescript this works perfectly for me:
docker run --name pscript --net=host -v $PWD:/$PWD -it --entrypoint bash --rm ghcr.io/codewars/purescript -c "cd $PWD; purs ide server -p 1234"
I have to set the extension settings to use port 1234 and also change the build command to docker exec -it pscript bash -c "cd $PWD; spago build --purs-args --json-errors"
.
from purescript-ide-purescript-core.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript-ide-purescript-core.