lib/nanoc/base/compilation/compiler.rb in nanoc-3.3.1 vs lib/nanoc/base/compilation/compiler.rb in nanoc-3.3.2
- old
+ new
@@ -319,10 +319,15 @@
# Listen to processing start/stop
Nanoc::NotificationCenter.on(:processing_started, self) { |obj| @stack.push(obj) }
Nanoc::NotificationCenter.on(:processing_ended, self) { |obj| @stack.pop }
+ # Assign snapshots
+ reps.each do |rep|
+ rep.snapshots = rules_collection.snapshots_for(rep)
+ end
+
# Attempt to compile all active reps
loop do
# Find rep to compile
break if content_dependency_graph.roots.empty?
rep = content_dependency_graph.roots.each { |e| break e }
@@ -362,12 +367,9 @@
Nanoc::NotificationCenter.post(:processing_started, rep)
Nanoc::NotificationCenter.post(:visit_started, rep.item)
# Calculate rule memory if we haven’t yet done do
rules_collection.new_rule_memory_for_rep(rep)
-
- # Assign snapshots
- rep.snapshots = rules_collection.snapshots_for(rep)
if !outdatedness_checker.outdated?(rep) && compiled_content_cache[rep]
# Reuse content
Nanoc::NotificationCenter.post(:cached_content_used, rep)
rep.content = compiled_content_cache[rep]