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

Comments

Projects
None yet
2 participants
@DivineDominion
Copy link

commented Feb 20, 2019

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

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

Yikes — that is definitely a bug. Will investigate.

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

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.

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Feb 21, 2019

@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?

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Mar 30, 2019

@DivineDominion Are you still experiencing this issue?

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Apr 2, 2019

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

@DivineDominion

This comment has been minimized.

Copy link
Author

commented Apr 2, 2019

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.

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Apr 27, 2019

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

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Apr 27, 2019

Here is a fix: #1421

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

@DivineDominion

This comment has been minimized.

Copy link
Author

commented Apr 29, 2019

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
You can’t perform that action at this time.