Giter VIP home page Giter VIP logo

Comments (12)

JordanMartinez avatar JordanMartinez commented on July 25, 2024 1

There's already an issue for this, but it doesn't quite address this particular problem: purescript/spago#550

from purescript-book.

hdgarrood avatar hdgarrood commented on July 25, 2024 1

This is apparently a bug in spago which should be fixed as of the next release.

from purescript-book.

milesfrain avatar milesfrain commented on July 25, 2024 1

To close this, we should update the repo to use that version of Spago in its instructions.

Do we need to specify specific tool versions?
Any reader who runs the suggested:

npm install -g spago

will get the latest version (0.15.2 currently).

https://book.purescript.org/chapter2.html#installing-tools

from purescript-book.

hdgarrood avatar hdgarrood commented on July 25, 2024

This is strange - an explicit spago install psci-support shouldn't be necessary, especially since psci-support already appears to be listed in the dependencies section in exercises/chapter2/spago.dhall.

from purescript-book.

JordanMartinez avatar JordanMartinez commented on July 25, 2024

So, funnily enough, if one just runs spago repl in a directory that doesn't have a spago.dhall file in it, this will work fine.

However, if one runs spago init and then spago repl, it will produce this error because a spago install was never ran. Thus, while it may be listed as a dependency, psci-support is never installed into that local folder, so that spago repl can function correctly.

from purescript-book.

hdgarrood avatar hdgarrood commented on July 25, 2024

Interesting, good find! Perhaps spago repl should ensure that all dependencies are installed before attempting to start the repl, then?

from purescript-book.

JordanMartinez avatar JordanMartinez commented on July 25, 2024

It should only if a spago.dhall file exists in the directory in which it runs. Otherwise, it should work as it currently does when there isn't such a file.

from purescript-book.

hdgarrood avatar hdgarrood commented on July 25, 2024

I opened purescript/spago#611

from purescript-book.

JordanMartinez avatar JordanMartinez commented on July 25, 2024

This bug no longer appears if one uses Spago v0.15.2.

To close this, we should update the repo to use that version of Spago in its instructions. However, the Spago release is a breaking change, so I don't know whether that would be problematic in other areas.

from purescript-book.

hdgarrood avatar hdgarrood commented on July 25, 2024

The only breaking change is the removal of an obscure CLI flag which I doubt this repo was using, so I think updating will be fine.

from purescript-book.

hdgarrood avatar hdgarrood commented on July 25, 2024

Yeah, I'd be tempted to just leave this. I think asking people to try updating their tools if things go wrong is the correct approach in general.

from purescript-book.

JordanMartinez avatar JordanMartinez commented on July 25, 2024

Do we need to specify specific tool versions?

At one point, I didn't specify the version of tools in my learning repo. Then, breaking releases were made that messed up a number of the commands I listed. So, I think it's better to list a specific tool version. That way, one can ensure that entire repo is updated before upgrading.

However, some tools (e.g. Spago) are more mature now than when I made that decision. So, I don't know whether that's really desirable at this point either.

Regardless, I don't think we should specify tool versions until it becomes an issue.

from purescript-book.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.