Giter Site home page Giter Site logo

Comments (5)

codygman avatar codygman commented on September 26, 2024

I had some packages missing somehow. I found this out by running:

npm -g ls

My fix was to reinstall the only globally installed packages I had:

npm install -g grunt
npm install -g pulp

it showed me a bunch of packages were missing. I'd post the exact error but I didn't have much scrollback in that shell.

from pulp.

codygman avatar codygman commented on September 26, 2024

And it's not working again...

from pulp.

codygman avatar codygman commented on September 26, 2024

Irony keeps you going... and there is no greater irony than not being able to use Purescript because of a type error 😃

I found this out by making the child process spawned in exec.js write to stdout:

cody@cody-G46VW:/tmp/hello-sailor$ diff node_modules/pulp/exec.js ~/.nvm/versions/node/v0.12.5/lib/node_modules/pulp/exec.js 
9c9
<     stdio: [process.stdin, process.stdout, process.stderr],
---
>     stdio: [process.stdin, quiet ? "pipe" : process.stdout, process.stderr],
/tmp/hello-sailor/node_modules/pulp/exec.js:36
    c.stdout.pipe(require("concat-stream")(function(data) {
            ^
TypeError: Cannot read property 'pipe' of null
    at exec (/tmp/hello-sailor/node_modules/pulp/exec.js:36:13)
    at /tmp/hello-sailor/node_modules/pulp/exec.js:47:7
    at it (/tmp/hello-sailor/node_modules/pulp/files.js:21:7)
    at /tmp/hello-sailor/node_modules/pulp/files.js:27:11
    at f (/tmp/hello-sailor/node_modules/pulp/node_modules/glob/node_modules/once/once.js:17:25)
    at Glob.<anonymous> (/tmp/hello-sailor/node_modules/pulp/node_modules/glob/glob.js:132:7)
    at Glob.emit (events.js:107:17)
    at Glob._finish (/tmp/hello-sailor/node_modules/pulp/node_modules/glob/glob.js:171:8)
    at done (/tmp/hello-sailor/node_modules/pulp/node_modules/glob/glob.js:158:12)
    at Glob._processReaddir2 (/tmp/hello-sailor/node_modules/pulp/node_modules/glob/glob.js:353:12)

from pulp.

codygman avatar codygman commented on September 26, 2024

Okay, figuring this out now.

pulp build -t main.js

Running the above, the following is the value of r in the context of the function on line 28 of exec.js:

Reading ./output/Prelude.Unsafe/externs.purs
Reading ./output/Data.Function/externs.purs
Reading ./output/Control.Monad.Eff/externs.purs
Reading ./output/Control.Monad.Eff.Unsafe/externs.purs
Reading ./output/Control.Monad.ST/externs.purs
Reading ./output/Debug.Trace/externs.purs
Reading ./output/Main/externs.purs

If I add the seemingly unrelated -O (dead code elimination) I get a file as I should. The value of r is the file itself.

So the bug here is that a file is only written if the seemingly unrelated -O flag is specified.

from pulp.

bodil avatar bodil commented on September 26, 2024

Yes, sorry, I noticed the same thing yesterday. Essentially, pulp calls psc-make to build normally, which generates output, and psc if you specify -O. --to is specifically an argument for psc. I think I'd rather have --to be the determinant and -O the extra argument, so that if you specify --to it calls psc regardless, and if you specify -O without --to it terminates with an error.

from pulp.

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.