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

@ddfreyne
Copy link
Member

@ddfreyne ddfreyne 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.

@ddfreyne ddfreyne added this to the 4.4.1 milestone Nov 26, 2016
@ddfreyne ddfreyne added this to the 4.4.2 milestone Nov 26, 2016
@ddfreyne ddfreyne removed this from the 4.4.1 milestone Nov 26, 2016
@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented Nov 26, 2016

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

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented Nov 26, 2016

False hope: less_spec.rb fails too, sometimes.

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented Nov 26, 2016

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

Loading

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

@ddfreyne ddfreyne commented Nov 27, 2016

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

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented Nov 27, 2016

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

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented Nov 27, 2016

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

Loading

@ddfreyne ddfreyne merged commit a474462 into master Nov 27, 2016
1 check passed
Loading
@ddfreyne ddfreyne deleted the less-fiber branch Nov 27, 2016
@RubenVerborgh
Copy link
Contributor

@RubenVerborgh RubenVerborgh commented Nov 27, 2016

That was fast 😉 I'll test later today.

Loading

@ddfreyne
Copy link
Member Author

@ddfreyne ddfreyne commented Nov 27, 2016

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

Loading

@RubenVerborgh
Copy link
Contributor

@RubenVerborgh RubenVerborgh commented Nov 27, 2016

Looks good to me.

Loading

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

Successfully merging this pull request may close these issues.

None yet

2 participants