-
Notifications
You must be signed in to change notification settings - Fork 56
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
Streamline 1.0 issues (many of them) #298
Comments
Okay! I found the issue behind half my tests failing — I had replaced one too many My tests are now almost back to 100%! I'll continue debugging the last few failures, but wanted to note one other thing: Mocha's reporter now doesn't output the list of errors at the end properly:
(Normally, after the summary, Mocha prints all the errors + full stack traces.) My tests are written in the standard Mocha + Streamline style (which has always worked): describe 'Transactions', ->
it 'should support foo', (_) ->
# ...
# ...
it '(delete test graph)', (_) ->
fixtures.deleteTestGraph module, _ I think Streamline + Mocha's It's obv. not your domain to debug Mocha, but FYI. I'm on Mocha 2.0.1 (and Node 0.12); I'll see if upgrading to the latest Mocha 2.3.3 helps. |
@aseemk Here are some first answers, with links to the issues that I have created to track their resolution.
|
Thanks for being so receptive to feedback as always, @bjouhier. Much appreciated! Btw, the CS comprehension issue was a legit issue; not related to extra |
Also, thanks for the heads-up that fibers is the new default. Agreed it'd be good to document that explicitly in the runtimes section. |
I just published 1.0.9 to NPM. So I'm closing this one and I'll be following up in the specific issues. |
Awesome, I'll (try to) try again later today and let you know how it goes. Thanks again! |
I'm excited to try out Streamline 1.0, but I haven't been able to get it working.
—
First, I got these npm peer dependency warnings and Babel errors.
The root cause seems to be that Streamline asks for Babel
>=5.8.0
— as opposed to a safer^5.8.0
— and Babel 6 indeed introduced breaking changes:http://babeljs.io/blog/2015/10/29/6.0.0/
I can fix by explicitly installing Babel 5.8.x first:
—
Even when I fix that (as well as
npm install streamline-runtime
), my code (which ran fine on Streamline 0.x) won't run.For starters, I'm surprised it's using Fibers! (And even then, I get this error.) Why?
Here's my
test/mocha.opts
(which worked without issue in Streamline 0.x):And I have no
.streamline.json
file (neither in this project directory or my home directory). (And in general, I don't use Fibers, so I doubt I've specified it somewhere.)—
Even if I add a
.streamline.json
file and manually specify{"runtime":"callbacks"}
, I then get this error about theregenerator
module.Indeed, if I compile my code manually, I see that the generated JS has this at the top:
So I guess I need to manually
npm install regenerator
too? The docs don't mention that; only that it's used for the compilation. Any reasonstreamline-runtime
couldn't encapsulate this?—
Finally, even when I do manually install
regenerator
, now I'm back to the same error as with fibers:I debugged this by trying to compile that file manually, which gives a more helpful error:
Here's the source CoffeeScript for that line of JS (which worked in Streamline 0.x):
And here's the JS that compiles to:
I think you previously had special-case checks for these CoffeeScript idioms?
—
For now, I rewrote those comprehensions to use explicit loops, so my code finally compiles now! =)
Unfortunately, one more break — with Node,
this
at the top level refers tomodule.exports
, so I frequently use that in all my CoffeeScript modules to define my public exports:Unfortunately, it looks like Streamline 1.0 compilation now breaks this!
Indeed, manually compiling with Streamline and looking at the bottom of the file:
Why the
undefined
? Why not maintain whateverthis
happens to be at the top level? (E.g. whetherexports
in Node orwindow
in the browser.)—
I worked around that by manually replacing my
@
s withexports.
everywhere... and finally, my code ran!! =)Unfortunately, over half of my tests are failing now, and they're all failing by timing out — which suggests something related to Streamline and callbacks not getting called. =/
I'm exhausted at this point, so haven't debugged this further. But I wanted to file at least these issues.
Hope this helps, suggestions welcome, etc. Thanks @bjouhier.
The text was updated successfully, but these errors were encountered: