Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global spago repl #168

Closed
FintanH opened this issue Apr 1, 2019 · 3 comments

Comments

@FintanH
Copy link
Contributor

commented Apr 1, 2019

Something I often do with stack is just open a terminal and do stack ghci or stack ghci --package text --package bifunctors and play around with types and what not.

This doesn't seem possible with spago at the moment, would it be worth implementing this?

@f-f

This comment has been minimized.

Copy link
Member

commented Apr 1, 2019

Yeah this is a cool idea!

As it happens with stack, spago needs a package set to refer to. So it's possible to do stack ghci --package text --package bifunctors because stack has the concept of "global project".

If you want to do this with spago now you would do (assuming you want to play with bifunctors):

$ mkdir temp-whatever && cd temp-whatever
$ spago init
$ spago install bifunctors
$ spago repl

I wouldn't like to have a "global project" as stack has (the usual problem is that it's stuck on an old lts version), so a global repl could just be implemented like the above sequence of commands (but transparently to the user):

  • detect if the packages.dhall is there, if not:
  • make a temporary directory somewhere like /tmp (or the equivalent on windows)
  • run init
  • install the needed packages
  • open a repl

I won't get around to do this for a while, so I'll mark it as "help needed" and I'm available to provide guidance on the implementation 🙂 (which should be fairly simple)

@f-f f-f added this to the 0.8 milestone Apr 18, 2019

@f-f f-f modified the milestones: 0.8, 0.9 May 7, 2019

@f-f

This comment has been minimized.

Copy link
Member

commented May 7, 2019

While #133 is not strictly necessay to have this, a global repl that has to download dependencies every time is not that nice, so it's better to wait for #188

@f-f

This comment has been minimized.

Copy link
Member

commented May 28, 2019

Update: #188 went in, so this is not blocked anymore

@f-f f-f removed this from the 0.9 milestone May 28, 2019

@f-f f-f added this to the 1.0 milestone Jun 12, 2019

@eahlberg eahlberg referenced this issue Jun 17, 2019

Merged

Add support for global REPL #280

1 of 3 tasks complete

@f-f f-f added the in progress label Jun 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.