Skip to content
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

Freeze execution on iteration while error. #2006

Closed
M-O-Z-G opened this issue Jun 26, 2015 · 4 comments
Closed

Freeze execution on iteration while error. #2006

M-O-Z-G opened this issue Jun 26, 2015 · 4 comments

Comments

@M-O-Z-G
Copy link

M-O-Z-G commented Jun 26, 2015

If for one reason or another error occurs in the syntax of the iteration, it freezes the compiler process forever.

It's happening everywhere, even on Demo Page hang up browser process
It would be good to display the error to console in such cases, otherwise I have to kill the browser process and/or restart the watchers in Gulp.

For example:

- var n = 0
ul
  while n < 4
    //- Freeze process forever
    li= n
@TimothyGu
Copy link
Member

If for one reason or another error occurs in the syntax of the iteration

- var n = 0
ul
  while n < 4
    //- Freeze process forever
    li= n

How is this a syntax error?

@M-O-Z-G
Copy link
Author

M-O-Z-G commented Jun 26, 2015

For example: if type by hands "while" in real-time preview, you typing:

...
while i < #and compiler hangs process (browser/terminal etc.), you just can't finish string.

Or if using auto-save and watcher with live-preview.

It's clear that in fact it is not a error, just an infinite loop. But it would be nice not run it if occurs, and provide warning to console, like other errors. Otherwise, just don't monitor the situation, why the task in the stack hangs infinitely and where.

It's just an idea, I'm not saying that it is life-saving option. I noticed that when testing some outputs.

@jeromew
Copy link
Contributor

jeromew commented Jun 27, 2015

the closest i have seen so far relates to https://github.com/ForbesLindesay/halting-problem ; I am not sure where you would integrate this in the tool chain.
it would not catch all the halting scenarios but could maybe catch some of the editing scenario that you mention.

@TimothyGu
Copy link
Member

Duplicate of #1825.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants