Help test upcoming Hugo 0.50

I have scheduled Hugo 0.50 for Monday, and it would be helpful if you took the latest source for a spin if you know how to compile it.

The 2 big items here are:

  • The server Fast Render mode (the default when you run hugo server) should now work “without holes”; that is: If you make a change, and then navigate to a “totally different page”, that page should reflect the recent change.
  • Major overhaul of errors with a full filename with line/column location whenever possible. Also, we now show errors in the browser in server mode.

The last item was more work than it looks. For one it meant a rewrite of the “page parser” logic in Hugo. This has some additional benefits (now and in the future, it is also faster, as we now do it once), but the main point here is that we now know the exact byte position when something fails on a page. We had some great test coverage in this area, with some odd corner cases that saved my ass a few times, so I feel pretty confident – but shout if I have screwed up.

5 Likes

I just rebuilt using the master, and everything works just as before; it’s boring :stuck_out_tongue: (and that’s a great sign of a massive under-the-hood refactoring and improvements going well).

:+1:

4 Likes

I saw the hugo server panic once (unable to reproduce that consistently though). All I did was change disableFastRender from true to false in my site’s config.toml while the server was running, and I got:

Change detected, rebuilding site
2018-10-24 13:53:44.191 -0400
panic: no pageOutput

goroutine 10415 [running]:
github.com/gohugoio/hugo/hugolib.pageRenderer(0xc0004ea300, 0xc000bdd080, 0xc000bdd020, 0xc007e825b0)
        /home/kmodi/go.apps/src/github.com/gohugoio/hugo/hugolib/site_render.go:119 +0xd24
created by github.com/gohugoio/hugo/hugolib.(*Site).renderPages
        /home/kmodi/go.apps/src/github.com/gohugoio/hugo/hugolib/site_render.go:43 +0x160

That flag was meant to be provided as a CLI flag and not changed while the server is running. I will remove it from the “config”, and this problem will go away.

1 Like

Please don’t do that. I set that flag to true for all my sites. It saves me from typing out that long switch on the CLI.

1 Like

I just did.

But maybe I’ll change my mind tomorrow … :slight_smile:

1 Like

I know there are users on the forum with varying degrees of familiarity and comfort when it comes to installing from source, etc, so for a beginner friendly way for Mac users using Homebrew to try out the latest features, I keep it simple and added the following alias to my ~/.bash_profile:

alias updatehugo="brew uninstall --force hugo && brew install --HEAD hugo"

Then I just type updatehugo, which just now updated me to HEAD is now at 78a4c2e commands: Read disableFastRender from flag even if it's not changed, which you’ll notice is the latest commit to master. Yes, there are other ways, and this is boring for many on the forums (myself included), but hoping it gets more OSX users to test and provide feedback for this and other wicked-cool features :smile:

5 Likes

updated from source. tried to introduce all kind of errors on purpose, no problems so far. the error reporting is a huge improvement. thank you!

the fast rendering is working ok.

I will use this version normally, for developing. I’ll let you know if I find something.

2 Likes

@kaushalmodi I don’t mean to bring this thread off-topic, but something like the below would keep you from typing out the --disableFastRender flag on CLI every time. You could just run hugo server as normal.

hugo() {
    if [[ "$@" == server* ]]; then
        options="${@#'server'}"
        command hugo server --disableFastRender "$options"
    else
        command hugo "$@"
    fi
}
2 Likes

Good tip. I have reverted the above change, it’s not worth the potential noise. I will, if I remember, fix the crash you get when changing it when the server is running.

And I think there are many that use clever Bash aliases to start the Hugo server in different modes.

3 Likes

Don’t have time to go in-depth at the moment but ran the dev version with my personal site and everything worked just fine.

FYI - Anyone using the snap that wants to test this, you can run the following to switch over to the dev version:

sudo snap refresh hugo --channel=extended/edge
2 Likes

Am loving the on-screen errors and syntax highlighting. My testing thus far has been fine. Will see what else I can throw at it.

2 Likes

Some “site building” benchmarks shows that 0.50 should be slightly faster and consume less memory compared to 0.49.2:

image

5 Likes

Just fyi, This is still an issue in .50.

Not on my PC. And note that this particular thread isn’t about all open Hugo issues.This is about “have I broken something”.

1 Like

Sorry, please feel free to delete …Thanks!