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

Dependencies of rep of same item are forgotten #1031

ddfreyne opened this issue Dec 23, 2016 · 0 comments


None yet
1 participant
Copy link

commented Dec 23, 2016

When an item has two representations, and one of those representations has dependencies that the other doesn’t, there can be a situation in which the dependencies for the other representation are forgotten.

Steps to reproduce


  • content/ with content [<%= @items["/bar.*"].compiled_content %>]

  • content/ with content 'I am bar!'

  • A rules file with content

     compile '/bar.*' do
       write '/bar.txt'
     compile '/foo.*', rep: :default do
       write '/foo.txt'
     compile '/foo.*', rep: :depz do
       filter :erb
       write '/foo_deps.txt'


  1. Site is compiled.
  2. The routing rule for the /foo.* item, :default rep, is changed to /foo-new.txt.
  3. Site is compiled.
  4. The contents of content/ are changed
  5. Site is compiled.


  • The contents of output/foo_deps.txt are expected to reflect the new content of content/, but instead still contains the old content.

Expected behavior

Item is deemed as outdated, and thus recompiled.

Actual behavior

Item is not recompiled.


The cause is likely

outdated_items.each { |i| @dependency_store.forget_dependencies_for(i) }

which only works when all reps of a given item are recompiled.

@ddfreyne ddfreyne added this to the 4.4.5 milestone Dec 23, 2016

ddfreyne added a commit that referenced this issue Dec 23, 2016

Merge pull request #1032 from nanoc/gh-1031-recompile-all-reps-of-out…

Recompile all reps of outdated items
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.