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

Site loading skipped #1211

Closed
Fjan opened this Issue Aug 30, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@Fjan
Contributor

Fjan commented Aug 30, 2017

Commit 213ba4f caused a small bug in 4.8.3 that results in the "Loading site..." step being skipped. The "Compiling site..." step now does the loading instead.

Steps to reproduce

  1. in default.rb put puts "I'm loading"
  2. nanoc compile

Expected behavior

(in 4.8.2)
Loading site… I'm loading done
Compiling site…

Actual behavior

(in 4.8.3)
Loading site… done
Compiling site…
I'm loading

Details

The line site.nil? that was removed in the commit apparently implicitly triggered the loading, because restoring it fixes the bug. It would probably be a good idea to make that more explicit in the code.

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Aug 30, 2017

Member

Good catch—I’ve started work on a fix in #1212.

Member

ddfreyne commented Aug 30, 2017

Good catch—I’ve started work on a fix in #1212.

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Aug 30, 2017

Member

The overlap between #load_site and #site has always bothered me. Looks like I finally got bit by it.

I’ll leave this issue open until I have a proper refactoring that makes this code less brittle, and makes the tests cover this case in a nice way.

Member

ddfreyne commented Aug 30, 2017

The overlap between #load_site and #site has always bothered me. Looks like I finally got bit by it.

I’ll leave this issue open until I have a proper refactoring that makes this code less brittle, and makes the tests cover this case in a nice way.

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Sep 3, 2017

Member

PR #1213 improves the situation by not making #load_site bypassable.

Member

ddfreyne commented Sep 3, 2017

PR #1213 improves the situation by not making #load_site bypassable.

@ddfreyne ddfreyne closed this Sep 3, 2017

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