jekyll: incremental build fails for very basic example

  • I believe this to be a bug, not a question about using Jekyll.
  • I updated to the latest Jekyll (or) if on GitHub Pages to the latest github-pages
  • I ran jekyll doctor to check my configuration
  • I read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
  • This is a feature request.

  • I am on (or have tested on) macOS 10+
  • I am on (or have tested on) Debian/Ubuntu GNU/Linux
  • I am on (or have tested on) Fedora GNU/Linux
  • I am on (or have tested on) Arch GNU/Linux
  • I am on (or have tested on) Other GNU/Linux
  • I am on (or have tested on) Windows 10+

  • I was trying to install.
  • There is a broken Plugin API.
  • I had an error on GitHub Pages, and I have reproduced it locally.
  • I had an error on GitHub Pages, and GitHub Support said it was a Jekyll Bug.
  • I had an error on GitHub Pages and I did not test it locally.
  • I was trying to build.
  • It was another bug.

My Reproduction Steps

The reproduction steps are contained in this repo. In short, I’m using Ruby version 2.4.1 and Jekyll 3.5.2 (the latest for both, I think). I generated a sample site with jekyll new example and then ran commands in there. This should ensure we’re all using the same test environment. I ran jekyll build --verbose --incremental, which built the site for the first time and generated everything. Then, I changed only index.md and ran jekyll build --verbose --incremental again, but it re-generated everything instead of just index.html.

The Output I Wanted

I expected only index.html to get re-generated, but based on the output of jekyll build --verbose --incremental and the modification timestamps of the files inside _site, all of the files were regenerated.

Here’s the output of both jekyll builds:

$ jekyll build --verbose --incremental
  Logging at level: debug
Configuration file: /home/sevko/dwn/jekyll-incremental-build-bug/example/_config.yml
         Requiring: jekyll-feed
         Requiring: kramdown
            Source: /home/sevko/dwn/jekyll-incremental-build-bug/example
       Destination: /home/sevko/dwn/jekyll-incremental-build-bug/example/_site
 Incremental build: enabled
      Generating...
       EntryFilter: excluded /Gemfile.lock
       EntryFilter: excluded /Gemfile
           Reading: _posts/2017-08-26-welcome-to-jekyll.markdown
        Generating: JekyllFeed::Generator finished in 0.00027174 seconds.
         Rendering: _posts/2017-08-26-welcome-to-jekyll.markdown
  Pre-Render Hooks: _posts/2017-08-26-welcome-to-jekyll.markdown
  Rendering Liquid: _posts/2017-08-26-welcome-to-jekyll.markdown
         Requiring: rouge
  Rendering Markup: _posts/2017-08-26-welcome-to-jekyll.markdown
         Requiring: kramdown
  Rendering Layout: _posts/2017-08-26-welcome-to-jekyll.markdown
         Rendering: _posts/2017-08-26-welcome-to-jekyll.markdown
  Pre-Render Hooks: _posts/2017-08-26-welcome-to-jekyll.markdown
  Rendering Liquid: _posts/2017-08-26-welcome-to-jekyll.markdown
  Rendering Markup: _posts/2017-08-26-welcome-to-jekyll.markdown
         Rendering: 404.html
  Pre-Render Hooks: 404.html
  Rendering Liquid: 404.html
  Rendering Markup: 404.html
  Rendering Layout: 404.html
         Rendering: about.md
  Pre-Render Hooks: about.md
  Rendering Liquid: about.md
  Rendering Markup: about.md
  Rendering Layout: about.md
         Rendering: index.md
  Pre-Render Hooks: index.md
  Rendering Liquid: index.md
  Rendering Markup: index.md
  Rendering Layout: index.md
         Rendering: assets/main.scss
  Pre-Render Hooks: assets/main.scss
  Rendering Liquid: assets/main.scss
  Rendering Markup: assets/main.scss
         Rendering: feed.xml
  Pre-Render Hooks: feed.xml
  Rendering Liquid: feed.xml
  Rendering Markup: feed.xml
  Rendering Layout: feed.xml
                    done in 0.181 seconds.
 Auto-regeneration: disabled. Use --watch to enable.
$ echo some-new-text >> index.md
$ jekyll build --verbose --incremental
  Logging at level: debug
Configuration file: /home/sevko/dwn/jekyll-incremental-build-bug/example/_config.yml
         Requiring: jekyll-feed
         Requiring: kramdown
            Source: /home/sevko/dwn/jekyll-incremental-build-bug/example
       Destination: /home/sevko/dwn/jekyll-incremental-build-bug/example/_site
 Incremental build: enabled
      Generating...
       EntryFilter: excluded /Gemfile.lock
       EntryFilter: excluded /Gemfile
           Reading: _posts/2017-08-26-welcome-to-jekyll.markdown
        Generating: JekyllFeed::Generator finished in 0.000278011 seconds.
         Rendering: _posts/2017-08-26-welcome-to-jekyll.markdown
  Pre-Render Hooks: _posts/2017-08-26-welcome-to-jekyll.markdown
  Rendering Liquid: _posts/2017-08-26-welcome-to-jekyll.markdown
         Requiring: rouge
  Rendering Markup: _posts/2017-08-26-welcome-to-jekyll.markdown
         Requiring: kramdown
  Rendering Layout: _posts/2017-08-26-welcome-to-jekyll.markdown
         Rendering: _posts/2017-08-26-welcome-to-jekyll.markdown
  Pre-Render Hooks: _posts/2017-08-26-welcome-to-jekyll.markdown
  Rendering Liquid: _posts/2017-08-26-welcome-to-jekyll.markdown
  Rendering Markup: _posts/2017-08-26-welcome-to-jekyll.markdown
         Rendering: 404.html
  Pre-Render Hooks: 404.html
  Rendering Liquid: 404.html
  Rendering Markup: 404.html
  Rendering Layout: 404.html
         Rendering: about.md
  Pre-Render Hooks: about.md
  Rendering Liquid: about.md
  Rendering Markup: about.md
  Rendering Layout: about.md
         Rendering: index.md
  Pre-Render Hooks: index.md
  Rendering Liquid: index.md
  Rendering Markup: index.md
  Rendering Layout: index.md
         Rendering: assets/main.scss
  Pre-Render Hooks: assets/main.scss
  Rendering Liquid: assets/main.scss
  Rendering Markup: assets/main.scss
         Rendering: feed.xml
  Pre-Render Hooks: feed.xml
  Rendering Liquid: feed.xml
  Rendering Markup: feed.xml
  Rendering Layout: feed.xml
                    done in 0.192 seconds.
 Auto-regeneration: disabled. Use --watch to enable.

I also ran stat on a file that I wouldn’t have expected to change before and after the second build just to make sure that Jekyll wasn’t misreporting things, and sure enough the modified timestamp changed:

Before the second build:

$ stat _site/404.html
  File: _site/404.html
  Size: 5547            Blocks: 16         IO Block: 4096   regular file
Device: 10304h/66308d   Inode: 3694371     Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/   sevko)   Gid: ( 1000/   sevko)
Access: 2017-08-26 12:48:52.654417304 +0300
Modify: 2017-08-26 12:48:52.654417304 +0300
Change: 2017-08-26 12:48:52.654417304 +0300
 Birth: -

After the second build:

$ stat _site/404.html
  File: _site/404.html
  Size: 5547            Blocks: 16         IO Block: 4096   regular file
Device: 10304h/66308d   Inode: 3694371     Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/   sevko)   Gid: ( 1000/   sevko)
Access: 2017-08-26 12:48:52.654417304 +0300
Modify: 2017-08-26 12:49:11.266367147 +0300
Change: 2017-08-26 12:49:11.266367147 +0300
 Birth: -

Unless I’m misunderstanding how incremental builds work, it seems like there’s a bug here.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 16 (8 by maintainers)

Most upvoted comments

I think this is most likely the same issue as #6241 i.e. the use of gem-based theme breaks incremental regeneration.

If I do these with a site created with Jekyll 3.5.2

  • comment out theme: minima in /_config.yml
  • copy files from minima gem e.g. cp -r $(bundle show minima)/* (otherwise error about layout not found would trigger regeneration)
  • delete .jekyll-metadata (in case gem-based theme files’ metadata are recorded there)

before running bundle exec jekyll serve -VI then incremental regeneration works. Otherwise, it’s always a full regeneration.