Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
ItemRepSelector should prefer unprocessed items #977
Theory: If an item is known to have a dependency (because attempting to compiling it raised an
For example, a blog archive page, a tag page, … will collect the compiled content of many items, and thus has many dependencies. It makes sense for Nanoc to attempt compiling all other items before re-attempting compiling the item that generated the dependency.
The cause of this problem is illustrated by the new
expect(tentatively_yielded).to eq [:a, :b, :a, :c, :a, :d, :a, :e, :a]
The reason for this is that as of Nanoc 4.3.7, the initial set of item reps to recompile that is passed to the item rep selector is not every item, but only the outdated ones. Because of this, the item rep selector does not have enough information to realise that there are other items reps that might need to be recompiled before attempting to recompile
Repurposing the dependency graph from the previous run, as mentioned before, would avoid this problem.