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

Run less filter on main fiber #1001

Merged
merged 1 commit into from Nov 27, 2016
Merged

Run less filter on main fiber #1001

merged 1 commit into from Nov 27, 2016

Conversation

denisdefreyne
Copy link
Member

@denisdefreyne denisdefreyne commented Nov 26, 2016

This ensures that Less is always invoked on the main fiber. Potential fix/workaround for #999.

  • Added Filter#on_main_fiber, which executes the given block on the main fiber. This is the main mechanism that makes the Less filter work again.

  • Converted all Less tests to specs. These are high-level tests (compiling using the CLI) because the Less filter is somewhat annoying to test otherwise (it now requires interaction with the compiler).

  • Two new Less specs that did not exist before are skipped for now, as I can’t get them to work. Will investigate in another PR.

@denisdefreyne
Copy link
Member Author

less_spec.rb now passes, but test_less.rb fails, with two distinct reasons:

  • Less::Error: Maximum call stack size exceeded
  • FiberError: dead fiber called

@denisdefreyne
Copy link
Member Author

False hope: less_spec.rb fails too, sometimes.

@denisdefreyne
Copy link
Member Author

Not quite working. I reported an issue to therubyracer: rubyjs/therubyracer#421.

@denisdefreyne denisdefreyne changed the title Run less filter inside same fiber Run less filter on main fiber Nov 27, 2016
@denisdefreyne
Copy link
Member Author

Added a mechanism to make code execute on the main fiber, and made the less filter use it. This seems to work!

@denisdefreyne
Copy link
Member Author

CC @RubenVerborgh — can you verify that this PR fixes your problem (#999)?

@denisdefreyne
Copy link
Member Author

Will merge because I cannot reproduce the problem on Travis CI nor locally on a Debian VM.

@denisdefreyne denisdefreyne merged commit a474462 into master Nov 27, 2016
@denisdefreyne denisdefreyne deleted the less-fiber branch November 27, 2016 08:52
@RubenVerborgh
Copy link
Contributor

That was fast 😉 I'll test later today.

@denisdefreyne
Copy link
Member Author

The two new skipped Less specs are implemented in #1003.

@RubenVerborgh
Copy link
Contributor

Looks good to me.

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

Successfully merging this pull request may close these issues.

None yet

2 participants