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

Remove unnecessary `ensure` in LiquidRenderer #3811

Merged
merged 1 commit into from Jun 23, 2015

Conversation

Projects
None yet
5 participants
@fw42
Contributor

fw42 commented Jun 23, 2015

Fixes #3808.

Problem is that the block that is being yielded can raise an exception (Liquid::SyntaxError for example), in which case str is nil and the ensure part will try to call nil.bytesize. This makes it harder to debug the Liquid Errors.

The ensure is actually unnecessary, this PR removes it. A Liquid::SyntaxError should now just bubble up like we want to.

@parkr @envygeeks

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jun 23, 2015

Contributor

:shipit:

Contributor

envygeeks commented Jun 23, 2015

:shipit:

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jun 23, 2015

Member

Thanks a million, @fw42!

Member

parkr commented Jun 23, 2015

Thanks a million, @fw42!

parkr added a commit that referenced this pull request Jun 23, 2015

@parkr parkr merged commit fcb882e into jekyll:master Jun 23, 2015

1 check passed

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

parkr added a commit that referenced this pull request Jun 23, 2015

@Lewiscowles1986

This comment has been minimized.

Show comment
Hide comment
@Lewiscowles1986

Lewiscowles1986 Jun 23, 2015

Contributor

👍 thx @fw42

Contributor

Lewiscowles1986 commented Jun 23, 2015

👍 thx @fw42

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jul 15, 2015

Contributor

We still aren't getting liquid errors passed to us for some reason, even on beta8, for example if I mess up a CSS file and sprockets processes it, nothing is raised, but if I restart the app then something is finally raised, something somewhere is still trapping errors.

Contributor

envygeeks commented Jul 15, 2015

We still aren't getting liquid errors passed to us for some reason, even on beta8, for example if I mess up a CSS file and sprockets processes it, nothing is raised, but if I restart the app then something is finally raised, something somewhere is still trapping errors.

@Lewiscowles1986

This comment has been minimized.

Show comment
Hide comment
@Lewiscowles1986

Lewiscowles1986 Jul 15, 2015

Contributor

to be fair on this issue, has everyone experiencing these issues run jekyll clean, and checked their liquid syntax? The reason I ask is I know I found some really strange errors, but after checking the liquid and ensuring found errors were fixed, and jekyll clean command was run; these errors went away and I could not reproduce.

Contributor

Lewiscowles1986 commented Jul 15, 2015

to be fair on this issue, has everyone experiencing these issues run jekyll clean, and checked their liquid syntax? The reason I ask is I know I found some really strange errors, but after checking the liquid and ensuring found errors were fixed, and jekyll clean command was run; these errors went away and I could not reproduce.

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jul 15, 2015

Contributor

That is the opposite of this issue, this issue is about not being shown liquid errors.

Contributor

envygeeks commented Jul 15, 2015

That is the opposite of this issue, this issue is about not being shown liquid errors.

@Lewiscowles1986

This comment has been minimized.

Show comment
Hide comment
@Lewiscowles1986

Lewiscowles1986 Jul 15, 2015

Contributor

@envygeeks I wasnt shown the errors buddy, and 2.5.3 used to work just fine, the problem probably stems from back then. I am not saying that Jekyll reported any liquid errors, on the contrary it made files with issues like not outputting variables, but when I got deep enough into it, it was because of small typo's, and the code went back to working as it did in 2.5.3. I even tried re-creating the bugs after clearing and it did not work. I tried the code in 2.5.3 and there was no problem parsing the fixed code, it was just a ghost in the code somewhere...

Contributor

Lewiscowles1986 commented Jul 15, 2015

@envygeeks I wasnt shown the errors buddy, and 2.5.3 used to work just fine, the problem probably stems from back then. I am not saying that Jekyll reported any liquid errors, on the contrary it made files with issues like not outputting variables, but when I got deep enough into it, it was because of small typo's, and the code went back to working as it did in 2.5.3. I even tried re-creating the bugs after clearing and it did not work. I tried the code in 2.5.3 and there was no problem parsing the fixed code, it was just a ghost in the code somewhere...

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jul 15, 2015

Member

@Lewiscowles1986 What error did you see.

@envygeeks This PR was to fix the undefined method 'bytesize' for NilClass errors we were seeing. What errors aren't being passed?

Member

parkr commented Jul 15, 2015

@Lewiscowles1986 What error did you see.

@envygeeks This PR was to fix the undefined method 'bytesize' for NilClass errors we were seeing. What errors aren't being passed?

@Lewiscowles1986

This comment has been minimized.

Show comment
Hide comment
@Lewiscowles1986

Lewiscowles1986 Jul 15, 2015

Contributor

@parkr it was what caused #3810 , which we now know is resolved

Since upgrading to 3 beta7 and experiencing some minor changes to code it has all been positive for me

Contributor

Lewiscowles1986 commented Jul 15, 2015

@parkr it was what caused #3810 , which we now know is resolved

Since upgrading to 3 beta7 and experiencing some minor changes to code it has all been positive for me

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Jul 15, 2015

Member

@parkr it was what caused #3810 , which we now know is resolved

@Lewiscowles1986 You mean #3808? #3810 seems unrelated, based on the lack of linkage and Florian's PR body above.

Since upgrading to 3 beta7 and experiencing some minor changes to code it has all been positive for me

Cool.

Member

parkr commented Jul 15, 2015

@parkr it was what caused #3810 , which we now know is resolved

@Lewiscowles1986 You mean #3808? #3810 seems unrelated, based on the lack of linkage and Florian's PR body above.

Since upgrading to 3 beta7 and experiencing some minor changes to code it has all been positive for me

Cool.

@Lewiscowles1986

This comment has been minimized.

Show comment
Hide comment
@Lewiscowles1986

Lewiscowles1986 Jul 15, 2015

Contributor

@parkr actually #3808 and #3810 turned out to have the same cause... Jekyll was clearly being too kind to me in 2.5.3, and shopify seems even more permissive as it is where I was first exposed to liquid syntax. It may not be a Jekyll problem at all, but a Shopify Liquid one...

Contributor

Lewiscowles1986 commented Jul 15, 2015

@parkr actually #3808 and #3810 turned out to have the same cause... Jekyll was clearly being too kind to me in 2.5.3, and shopify seems even more permissive as it is where I was first exposed to liquid syntax. It may not be a Jekyll problem at all, but a Shopify Liquid one...

@fw42

This comment has been minimized.

Show comment
Hide comment
@fw42

fw42 Jul 16, 2015

Contributor

FYI if this is about Liquid being too strict (more strict than in Jekyll 2.x), you can change the error mode from strict (default) back to lax (the old default).

Contributor

fw42 commented Jul 16, 2015

FYI if this is about Liquid being too strict (more strict than in Jekyll 2.x), you can change the error mode from strict (default) back to lax (the old default).

@fw42

This comment has been minimized.

Show comment
Hide comment
@fw42

fw42 Jul 16, 2015

Contributor

We still aren't getting liquid errors passed to us for some reason, even on beta8

can you give me an example site please where I can see this behaviour? or some other way how to reproduce this problem?

Contributor

fw42 commented Jul 16, 2015

We still aren't getting liquid errors passed to us for some reason, even on beta8

can you give me an example site please where I can see this behaviour? or some other way how to reproduce this problem?

@fw42

This comment has been minimized.

Show comment
Hide comment
@fw42

fw42 Jul 16, 2015

Contributor

(probably best to open a new issue for that, since I'm not sure how/if your problem is even related to this PR)

Contributor

fw42 commented Jul 16, 2015

(probably best to open a new issue for that, since I'm not sure how/if your problem is even related to this PR)

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jul 16, 2015

Contributor

We aren't getting errors at all. For example on the new jekyll3-assets when we mess up a piece of SCSS, no error gets spit out to us... at all. Somewhere it's being rescued (and I've not had the time to figure out where) on the assumption that it should be processed into the liquid template but this cannot happen when it just continues and our processor doesn't give a context to liquid to give a context to the template. This can be demonstrated with our log output:

[20:08:46] jordon@envygeeks:~/development/envygeeks/envygeeks.io (master *#) ~> script/dev
Starting services.
Configuration file: /srv/jekyll/_config.yml
            Source: /srv/jekyll
       Destination: /srv/jekyll/_site
 Incremental build: enabled
      Generating... 
                    done in 6.698 seconds.
 Auto-regeneration: enabled for '/srv/jekyll'
Configuration file: /srv/jekyll/_config.yml
    Server address: http://0.0.0.0:4000/
  Server running... press ctrl-c to stop.
      Regenerating: 1 file(s) changed at 2015-07-16 01:09:22 ...done in 0.313905306 seconds.
^CStopping services.
[20:09:25] jordon@envygeeks:~/development/envygeeks/envygeeks.io (master *#) ~> script/dev
Starting services.
Configuration file: /srv/jekyll/_config.yml
            Source: /srv/jekyll
       Destination: /srv/jekyll/_site
 Incremental build: enabled
      Generating... 
  Liquid Exception: Invalid CSS after "...ials/headroom";": expected "}", was "" in _layouts/default.html
/srv/jekyll/_assets/css/bundle.scss:37: Invalid CSS after "...ials/headroom";": expected "}", was "" (Sass::SyntaxError)
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:1162:in `expected'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:1098:in `expected'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:1093:in `tok!'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:640:in `block'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:632:in `ruleset'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:657:in `block_child'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:650:in `block_contents'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:117:in `stylesheet'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:42:in `parse'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/engine.rb:403:in `_to_tree'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/engine.rb:278:in `render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:74:in `block in call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/utils.rb:154:in `module_include'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:73:in `call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:30:in `call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:86:in `load_asset_by_uri'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:45:in `block in load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_cache'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:38:in `load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `yield'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/bundle.rb:23:in `block in call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/utils.rb:183:in `dfs'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/bundle.rb:24:in `call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:86:in `load_asset_by_uri'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:45:in `block in load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_cache'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:38:in `load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `yield'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/base.rb:63:in `find_asset'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/environment.rb:30:in `find_asset'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/bundler/gems/ruby-jekyll3-assets-104c280b029e/lib/jekyll/assets/tag.rb:55:in `find_asset'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/bundler/gems/ruby-jekyll3-assets-104c280b029e/lib/jekyll/assets/tag.rb:36:in `render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/block.rb:151:in `render_token'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/profiler/hooks.rb:5:in `block in render_token_with_profiling'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/profiler.rb:80:in `profile_token_render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/profiler/hooks.rb:4:in `render_token_with_profiling'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/block.rb:135:in `block in render_all'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/block.rb:122:in `each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/block.rb:122:in `render_all'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/block.rb:108:in `render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/template.rb:210:in `block in render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/template.rb:262:in `with_profiling'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/template.rb:209:in `render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/template.rb:222:in `render!'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:28:in `block (2 levels) in render!'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:36:in `measure_bytes'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:27:in `block in render!'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:43:in `measure_time'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:26:in `render!'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/renderer.rb:95:in `render_liquid'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/renderer.rb:137:in `place_in_layouts'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/renderer.rb:59:in `run'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:172:in `block (2 levels) in render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:170:in `each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:170:in `block in render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:169:in `each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:169:in `render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:59:in `process'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/command.rb:28:in `process_site'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/commands/build.rb:60:in `build'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/commands/build.rb:35:in `process'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/bin/jekyll:17:in `<top (required)>'
    from /usr/local/bin/jekyll:23:in `load'
    from /usr/local/bin/jekyll:23:in `<main>'
Stopping services.

The reason it is raised when we first boot is because it's passed into Jekyll::LiquidRenderer::File#measure_bytes which trips and raises properly, but under normal circumstances, we get no error at all in the terminal and we cannot get an error inside of the HTML site because Jekyll captures that error, throws it away (for some odd reason) and then continues on.

Contributor

envygeeks commented Jul 16, 2015

We aren't getting errors at all. For example on the new jekyll3-assets when we mess up a piece of SCSS, no error gets spit out to us... at all. Somewhere it's being rescued (and I've not had the time to figure out where) on the assumption that it should be processed into the liquid template but this cannot happen when it just continues and our processor doesn't give a context to liquid to give a context to the template. This can be demonstrated with our log output:

[20:08:46] jordon@envygeeks:~/development/envygeeks/envygeeks.io (master *#) ~> script/dev
Starting services.
Configuration file: /srv/jekyll/_config.yml
            Source: /srv/jekyll
       Destination: /srv/jekyll/_site
 Incremental build: enabled
      Generating... 
                    done in 6.698 seconds.
 Auto-regeneration: enabled for '/srv/jekyll'
Configuration file: /srv/jekyll/_config.yml
    Server address: http://0.0.0.0:4000/
  Server running... press ctrl-c to stop.
      Regenerating: 1 file(s) changed at 2015-07-16 01:09:22 ...done in 0.313905306 seconds.
^CStopping services.
[20:09:25] jordon@envygeeks:~/development/envygeeks/envygeeks.io (master *#) ~> script/dev
Starting services.
Configuration file: /srv/jekyll/_config.yml
            Source: /srv/jekyll
       Destination: /srv/jekyll/_site
 Incremental build: enabled
      Generating... 
  Liquid Exception: Invalid CSS after "...ials/headroom";": expected "}", was "" in _layouts/default.html
/srv/jekyll/_assets/css/bundle.scss:37: Invalid CSS after "...ials/headroom";": expected "}", was "" (Sass::SyntaxError)
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:1162:in `expected'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:1098:in `expected'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:1093:in `tok!'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:640:in `block'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:632:in `ruleset'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:657:in `block_child'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:650:in `block_contents'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:117:in `stylesheet'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/scss/parser.rb:42:in `parse'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/engine.rb:403:in `_to_tree'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sass-3.4.16/lib/sass/engine.rb:278:in `render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:74:in `block in call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/utils.rb:154:in `module_include'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:73:in `call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/sass_processor.rb:30:in `call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:86:in `load_asset_by_uri'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:45:in `block in load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_cache'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:38:in `load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `yield'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/bundle.rb:23:in `block in call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/utils.rb:183:in `dfs'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/bundle.rb:24:in `call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:86:in `load_asset_by_uri'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:45:in `block in load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:155:in `fetch_asset_from_dependency_cache'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/loader.rb:38:in `load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `yield'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/cached_environment.rb:47:in `load'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/base.rb:63:in `find_asset'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/sprockets-3.2.0/lib/sprockets/environment.rb:30:in `find_asset'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/bundler/gems/ruby-jekyll3-assets-104c280b029e/lib/jekyll/assets/tag.rb:55:in `find_asset'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/bundler/gems/ruby-jekyll3-assets-104c280b029e/lib/jekyll/assets/tag.rb:36:in `render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/block.rb:151:in `render_token'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/profiler/hooks.rb:5:in `block in render_token_with_profiling'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/profiler.rb:80:in `profile_token_render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/profiler/hooks.rb:4:in `render_token_with_profiling'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/block.rb:135:in `block in render_all'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/block.rb:122:in `each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/block.rb:122:in `render_all'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/block.rb:108:in `render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/template.rb:210:in `block in render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/template.rb:262:in `with_profiling'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/template.rb:209:in `render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/liquid-3.0.3/lib/liquid/template.rb:222:in `render!'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:28:in `block (2 levels) in render!'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:36:in `measure_bytes'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:27:in `block in render!'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:43:in `measure_time'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/liquid_renderer/file.rb:26:in `render!'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/renderer.rb:95:in `render_liquid'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/renderer.rb:137:in `place_in_layouts'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/renderer.rb:59:in `run'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:172:in `block (2 levels) in render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:170:in `each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:170:in `block in render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:169:in `each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:169:in `render'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/site.rb:59:in `process'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/command.rb:28:in `process_site'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/commands/build.rb:60:in `build'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/commands/build.rb:35:in `process'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
    from /srv/jekyll/vendor/bundle/ruby/2.2.0/gems/jekyll-3.0.0.pre.beta8/bin/jekyll:17:in `<top (required)>'
    from /usr/local/bin/jekyll:23:in `load'
    from /usr/local/bin/jekyll:23:in `<main>'
Stopping services.

The reason it is raised when we first boot is because it's passed into Jekyll::LiquidRenderer::File#measure_bytes which trips and raises properly, but under normal circumstances, we get no error at all in the terminal and we cannot get an error inside of the HTML site because Jekyll captures that error, throws it away (for some odd reason) and then continues on.

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jul 16, 2015

Contributor

Now one things we've considered is just capturing the errors ourselves and forcing it hit $stderr with Jekyll.logger inside of: https://github.com/jekyll-assets/jekyll3-assets/blob/master/lib/jekyll/assets/tag.rb#L33 but that doesn't really solve the issue of errors magically disappearing.

Contributor

envygeeks commented Jul 16, 2015

Now one things we've considered is just capturing the errors ourselves and forcing it hit $stderr with Jekyll.logger inside of: https://github.com/jekyll-assets/jekyll3-assets/blob/master/lib/jekyll/assets/tag.rb#L33 but that doesn't really solve the issue of errors magically disappearing.

@fw42

This comment has been minimized.

Show comment
Hide comment
@fw42

fw42 Jul 16, 2015

Contributor

Not sure I understand why you think this is related to my changes. Did you try reverting my profiling PR? Does that solve anything?

Contributor

fw42 commented Jul 16, 2015

Not sure I understand why you think this is related to my changes. Did you try reverting my profiling PR? Does that solve anything?

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jul 16, 2015

Contributor

@fw42 At first I thought it was (because it was early and I was lazy) but later after further investigation throughout the day I came to the conclusion it's not related, I just continued the conversation here because I sparked here, I will be opening another ticket so I can fix this larger problem eventually because I don't think I'm the only one this is happening to, a few times I've had people ask about problems with their site and can't figure it out because no error is ever given to them.

Contributor

envygeeks commented Jul 16, 2015

@fw42 At first I thought it was (because it was early and I was lazy) but later after further investigation throughout the day I came to the conclusion it's not related, I just continued the conversation here because I sparked here, I will be opening another ticket so I can fix this larger problem eventually because I don't think I'm the only one this is happening to, a few times I've had people ask about problems with their site and can't figure it out because no error is ever given to them.

@fw42

This comment has been minimized.

Show comment
Hide comment
@fw42

fw42 Jul 16, 2015

Contributor

Could be a bug in the regeneration code as well. Maybe it doesn't recognize the CSS file as a dependency of the Liquid file and then it doesn't regenerate the Liquid when the CSS changes.

Contributor

fw42 commented Jul 16, 2015

Could be a bug in the regeneration code as well. Maybe it doesn't recognize the CSS file as a dependency of the Liquid file and then it doesn't regenerate the Liquid when the CSS changes.

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jul 16, 2015

Contributor

@fw42 that also is part of the problem, the regeneration API is too tightly coupled to Jekyll, which makes it hard for plugins to tie in, I would have had to of done a lot of work to tie into the regeneration so I skipped it entirely.

Contributor

envygeeks commented Jul 16, 2015

@fw42 that also is part of the problem, the regeneration API is too tightly coupled to Jekyll, which makes it hard for plugins to tie in, I would have had to of done a lot of work to tie into the regeneration so I skipped it entirely.

@fw42

This comment has been minimized.

Show comment
Hide comment
@fw42

fw42 Jul 16, 2015

Contributor

Can't you do something like this in your new asset tag?

Can you check the metadata file (Marshal.load(File.read("..."))) and see if the Liquid's file's dependencies includes the CSS file?

Contributor

fw42 commented Jul 16, 2015

Can't you do something like this in your new asset tag?

Can you check the metadata file (Marshal.load(File.read("..."))) and see if the Liquid's file's dependencies includes the CSS file?

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jul 16, 2015

Contributor

I did try to do that but if I remember right I ended up getting some weird error I didn't feel like debugging so I settled on skipping marking myself as a dependency and preventing deletion with: https://github.com/jekyll-assets/jekyll3-assets/blob/master/lib/jekyll/assets/patches/jekyll/cleaner.rb#L12 which is not optimal (but I might be doing it entirely wrong...) It's not there because we aren't tied into the regenerator, I'll try again in the morning to reintegrate.

Contributor

envygeeks commented Jul 16, 2015

I did try to do that but if I remember right I ended up getting some weird error I didn't feel like debugging so I settled on skipping marking myself as a dependency and preventing deletion with: https://github.com/jekyll-assets/jekyll3-assets/blob/master/lib/jekyll/assets/patches/jekyll/cleaner.rb#L12 which is not optimal (but I might be doing it entirely wrong...) It's not there because we aren't tied into the regenerator, I'll try again in the morning to reintegrate.

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Jul 16, 2015

Contributor

I remember what the problem was now that I've re-implemented it @fw42 it was the sub-optimal performance. It's not the regeneration fault, it would happen with pretty much anything, but when we tied the build speeds went up again from sub-second to > 2 seconds which rendered the entire regeneration worthless since that was the build time without most assets so we tried to tie into the regenerator another way and got weird errors so I backed away for another solution which was disabling digests for logical_paths in development so that we could regenerate the site way faster.

But the errors are still ignored and thrown away by the watcher or something under it, and we should be spitting out to the terminal as well as to the template that way if one doesn't happen at least the other did.

Contributor

envygeeks commented Jul 16, 2015

I remember what the problem was now that I've re-implemented it @fw42 it was the sub-optimal performance. It's not the regeneration fault, it would happen with pretty much anything, but when we tied the build speeds went up again from sub-second to > 2 seconds which rendered the entire regeneration worthless since that was the build time without most assets so we tried to tie into the regenerator another way and got weird errors so I backed away for another solution which was disabling digests for logical_paths in development so that we could regenerate the site way faster.

But the errors are still ignored and thrown away by the watcher or something under it, and we should be spitting out to the terminal as well as to the template that way if one doesn't happen at least the other did.

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

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