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

nanoc 4.11.1 introduces breaking change by making compiled_content include the layout #1412

Closed
DivineDominion opened this issue Feb 20, 2019 · 9 comments · Fixed by #1421
Closed

Comments

@DivineDominion
Copy link

I upgraded my project from 4.11.0 to 4.11.2 and noticed a weird glitch: the full-text post previews included the layout again.

screenshot 2019-02-20 at 11 33 42

Turns out that between 4.11.0 and 4.11.1, #compiled_content changed and now returns a cached representation with the layout already added. I found that a call to compiled_content(snapshot: :pre) makes it look as expected.

So fixing this was pretty easy, I just wanted to let you know that this is a change at all so you might add it to the release notes.

I couldn't reproduce this in a vanilla project with v4.11.1, though. Maybe it's because the affected items are references in preprocess? If you aren't aware of this change and don't have a hunch what's going on and want me to investigate, I can try different configurations @ddfreyne

@denisdefreyne
Copy link
Member

Yikes — that is definitely a bug. Will investigate.

@denisdefreyne
Copy link
Member

This is almost certainly caused by 5cbad99 (part of #1394). It’s a refactoring that I’ve been wanting to make for a long time.

I’m still investigatating why it fails for you, though.

@denisdefreyne
Copy link
Member

@DivineDominion I’m not able to reproduce the problem you described. Could you create a zip of tmp/nanoc and send it to me (denis+github@denis.ws)? After you’ve done that, can you try removing tmp/nanoc and re-running Nanoc?

@denisdefreyne
Copy link
Member

@DivineDominion Are you still experiencing this issue?

@denisdefreyne
Copy link
Member

This is not an isolated issue, as I just saw the same issue come in: https://groups.google.com/forum/#!topic/nanoc/pbHOJ3T6wiY

@DivineDominion
Copy link
Author

While finding the fix wasn't that bad, I find it pretty hard to create a test project that crashes. I stopped a while ago but will try to squeeze in time this week to figure this out.

@denisdefreyne
Copy link
Member

I am now able to reproduce the problem, and am working on a fix.

@denisdefreyne
Copy link
Member

Here is a fix: #1421

I am struggling to write a regression test for it, though.

@DivineDominion
Copy link
Author

Good you found the culprit! I ran into it in another project just last week but couldn't trim it down to a simple example :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants