purescript-deprecated / gulp-purescript

Gulp plugin providing PureScript compiler tasks
34 stars 8 forks source link

Inconsistent truncated error messages #26

Closed hoodunit closed 9 years ago

hoodunit commented 9 years ago

Hi. After updating from 0.3.1 to 0.4.1, this seems to be swallowing my error messages. I will sometimes get no error message or sometimes part of the message and the part varies.

Example case that fails with a normal error message with 0.3.1 but gives truncated messages in 0.4.1:

gulpfile.js:

gulp.task('server', function(){
  return gulp.src([paths.server, paths.dependencies])
    .pipe(purescript.psc({
      main: 'Server.Main', 
      output: 'server.js',
      module: ['Server.Main']
    }))
    .pipe(gulp.dest('build'));
});

src/Server.Main:

module Server.Main where 
import Debug.Trace

main = do
     fail

0.3.1 error message:

[17:38:25] Using gulpfile gulpfile.js
[17:38:25] Starting 'server'...

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Error in module Server.Main:
Error at src/server/main.purs line 48, column 6 - line 48, column 6:
  Unknown value fail
See https://github.com/purescript/purescript/wiki/Error-Code-UnknownValue for more information, or to contribute content related to this error.

0.4.1 error message:

[17:33:37] Using gulpfile gulpfile.js
[17:33:37] Starting 'server'...
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: r.

    at ChildProcess.<anonymous> (node_modules/gulp-purescript/index.js:2215:32)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

Gulp version: 3.8.11 Purescript version: 0.6.9.3

ethul commented 9 years ago

Thanks for the report. I will take a look.

ethul commented 9 years ago

Should be okay in version 0.4.2. Can you please confirm when you have a chance? Thanks

hoodunit commented 9 years ago

That seems to fix it, thanks!

ethul commented 9 years ago

Great! Welcome

On Thursday, April 30, 2015, Nicholas Kariniemi notifications@github.com wrote:

That seems to fix it, thanks!

— Reply to this email directly or view it on GitHub https://github.com/purescript-contrib/gulp-purescript/issues/26#issuecomment-97819676 .