-
Notifications
You must be signed in to change notification settings - Fork 60
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
finish startup on error #56 #57
Conversation
Hi @paulpflug, thanks for getting on this so quickly. One issue with this fix that I noticed when I run in debug mode is that that I get the output "debugger listening on port 5858" from node/express. I have no idea why, but this message displays to stderr. This causes Grunt to regain control too early, as you can see from the output of my Grunt task execution with your code change:
As you can see, my open and watch tasks ran before my Express server was actually ready. |
@mhchen You must be running What you may want to consider is modifying the
|
As for @paulpflug's PR, it passes on my machine & travis. @mhchen Can you post your Gruntfile config (the |
I am indeed running my dev version of express in Coffeescript. Here's the relevant portion of my gruntfile (also in Coffeescript):
Maybe it might make sense for @paulpflug's PR to instead listen for any instances of the word "error" (case-insensitive) on stderr? I think that should cast a pretty wide net over at least 99% of what makes this change useful. |
That's what the |
New commit looks good to me @ericclemmons. Thanks @paulpflug (note that there is a missing semicolon on line 103 though) |
Well, in #56 I indicated that with a Coffeescript compile error you get no output from stdout, that's why we need to monitor stderr too. Does that make sense? |
There's no output from the compile error? That's unpossible! |
Yup, it all goes to stderr unfortunately (probably not unfortunately, but unfortunately for this case) |
Yep it does indeed. |
So you're saying maybe the default Has someone tried modifying that option with success, or are y'all waiting on me? |
no. it has nothing to do with |
Ok. |
finish startup on error #56
@paulpflug I merged this down trying to resolve #66, but the tests are immediately failing on BTW, I've made you a collaborator since you've been so helpful :) |
@paulpflug I'm an idiot. My other node project was still running ) |
Hey guys, just letting you know that this change introduces some unexpected behavior, at least in my case. Scenario: I've been living with a couple of body-parser related deprecation warnings since upgrading to Express 4. Basically, the new body-parser middleware writes the following to stderr right before I start my Express server: Thu, 14 Aug 2014 22:33:29 GMT body-parser deprecated bodyParser: use individual json/urlencoded middlewares at server/server.coffee:314:24 This triggers the server.stderr.on 'data' event and finished() gets called so the grunt process ends and my server never really starts. Since I had been using "grunt-express-server": "^0.4.17" in my package.json, 0.4.18 got picked up when I deleted node_modules and npm install'ed. Not a big deal to fix on my end, but just a heads up that this could throw off folks that are using '^' or '~' and expecting semantic versioning. |
That's good to know. Since most of my effort on this has been merging others' work ( much thanks! ), and the tests didn't reflect any changes, I assumed a patch release was sufficient. I'll create a test, revert, and minor bump. |
ok. the problem is we need to call |
I created a dev branch. I fixed a bug and converted from I'm not very familiar to nodeunit and I see no way in testing syntax errors with it. |
Should I continue reverting this break, patch, bump to |
I think dev branch is stable. There are also no breaking changes, so a minor bump would suffice. Maybe we wait for #48 and then merge and bump ? |
No description provided.