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

Conversation

Projects
None yet
2 participants
@ddfreyne
Member

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 modified the milestones: 4.4.1, 4.4.2 Nov 26, 2016

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Nov 26, 2016

Member

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
Member

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

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Nov 26, 2016

Member

False hope: less_spec.rb fails too, sometimes.

Member

ddfreyne commented Nov 26, 2016

False hope: less_spec.rb fails too, sometimes.

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Nov 26, 2016

Member

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

Member

ddfreyne commented Nov 26, 2016

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

@ddfreyne ddfreyne changed the title from Run less filter inside same fiber to Run less filter on main fiber Nov 27, 2016

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Nov 27, 2016

Member

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

Member

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!

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Nov 27, 2016

Member

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

Member

ddfreyne commented Nov 27, 2016

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

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Nov 27, 2016

Member

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

Member

ddfreyne commented Nov 27, 2016

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

@ddfreyne ddfreyne merged commit a474462 into master Nov 27, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ddfreyne ddfreyne deleted the less-fiber branch Nov 27, 2016

@RubenVerborgh

This comment has been minimized.

Show comment
Hide comment
@RubenVerborgh

RubenVerborgh Nov 27, 2016

Member

That was fast 😉 I'll test later today.

Member

RubenVerborgh commented Nov 27, 2016

That was fast 😉 I'll test later today.

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Nov 27, 2016

Member

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

Member

ddfreyne commented Nov 27, 2016

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

@RubenVerborgh

This comment has been minimized.

Show comment
Hide comment
@RubenVerborgh

RubenVerborgh Nov 27, 2016

Member

Looks good to me.

Member

RubenVerborgh commented Nov 27, 2016

Looks good to me.

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