trails icon indicating copy to clipboard operation
trails copied to clipboard

trails:stop event should be more forcing

Open tjwebb opened this issue 9 years ago • 5 comments

We don't really want any further events firing after trails:stop is emitted.

debug: trails event: trails:start
verbose: Trailpacks: All Validated.
debug: trails event: trailpack:all:validated
debug: trails event: trailpack:core:configured
debug: trails event: trailpack:smokesignals:configured
debug: trails event: trailpack:repl:configured
debug: trails event: trailpack:router:configured
debug: trails event: trailpack:waterline:configured
debug: trails event: trailpack:all:configured
debug: trails event: trailpack:smokesignals:initialized
debug: trails event: trailpack:repl:initialized
debug: trails event: trailpack:router:initialized
error:
 TypeError: lib.i18n.loadLocales is not a function
    at Core.initialize (/Users/tjwebb/workspace/trails/trailpack-core/index.js:55:14)
    at /Users/tjwebb/workspace/trails/trails/lib/trailpack.js:46:26
    at process._tickDomainCallback (node.js:411:9)
    at Function.Module.runMain (module.js:469:11)
    at startup (node.js:136:18)
    at node.js:963:3
debug: trails event: trails:stop
debug: trails event: trailpack:waterline:initialized

tjwebb avatar Dec 31 '15 03:12 tjwebb

I don't think this can be prevented unless the events are handed over to EventEmitter in current tick here.

I do not understand the comment there - was this done in order to fix of some specific issue?

robertrossmann avatar Mar 10 '16 23:03 robertrossmann

Ah, related - #10.

robertrossmann avatar Mar 10 '16 23:03 robertrossmann

yea, I've made some progress in removing the nextTick() requirement but I'm not completely comfortable yet without an integration test that proves it's fixed. Trails will start and function perfectly without it, but I've run into issues where errors are thrown but are buried somewhere mysterious.

We'll definitely knock this out before 1.0

tjwebb avatar Mar 11 '16 01:03 tjwebb

Would it make sense to remove the workaround and release it for broader testing while still in beta? If there's no clear indication as to why it's broken, perhaps someone will stumble upon the problem in a way that will reveal the root cause.

robertrossmann avatar Mar 11 '16 22:03 robertrossmann

I think I've resolved this, per my previous comment, I just need to manufacture a way to test it. I think reproducing it in a test will lead to better understanding.

My team has two deadlines that converge tomorrow, so I'm looking forward to having more time available starting again next week.

tjwebb avatar Apr 01 '16 06:04 tjwebb