-
Notifications
You must be signed in to change notification settings - Fork 161
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
ember fastboot --watch #200
Conversation
I'd argue that |
I'm thinking
|
|
||
ui.writeLine("Installing FastBoot npm dependencies"); | ||
if (this._fastBootListener) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recall some issues in the past where programmatically restarting a server required I also flush require.cache otherwise stale modules were loaded. I could be wrong, just jotting down something that came to mind.
Likely only a cause for concern if we plan to support adding custom middleware.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, now I remember where this was an issue: https://github.com/ember-cli/ember-cli/blob/da4749d3b27a2ce7c529de0d07c0ac3e702e7d47/lib/tasks/server/express-server.js#L238-L250
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'm adding that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue would affect dist/fastboot/node_modules
, which we require
in buildWhitelistedRequire
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
unit tests for lib/commands/fastboot
@danmcclain Great idea! And it should be disabled if the |
I would really like it if fastboot and normal serve could be united during development. An early discussion I started about making app.js the same regardless of fastboot or browser would nicely enable this. |
@stefanpenner We actually talked about this during the last FastBoot Sync meeting |
return; | ||
} | ||
debug('restart'); | ||
this.restartPromise = this.stop() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should try to avoid stopping and starting the server for each reload. With some tweaks to our usage of fastboot-express-middleware we should be able to make this restartPromise
closer to:
this.restartPromise = RSVP.resolve()
.then(() => this.clearRequireCache(options.outputPath))
.then(() => this._fastboot.reload())
.finally(() => { /* snip from existing */ })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Faster restart will be a separate task.
I left a few inline comments, but overall this looks very good. Also, stylistic nit RE: |
Per discussion, we will leave the
|
I'm going to add homu.io use that to merge this, will do so tonight |
Homu has been dead for days 😢 |
Allow to require module path from whitelisted dependency
@rwjblue Tests coming soon, just want to open the PR for some early feedback. Does this approach look reasonable?