Hugo 0.48 will be >= Go 1.11 Only

Go 1.11 was released last night and I’m in the process of upgrading the Hugo repo. We will also replace Go Dep with the new built-in Go Modules. This will enable us to update to Blackfriday v2.

But this also means that until Go 1.12 arrives, the current promise about “Hugo builds with the last 2 Go versions” does not apply.

Does anyone have any objections to the above?

10 Likes

And for those who have not read the release notes for Go 1.11 the two big items for Hugo is:

  • Variable re-assignment in Go templates. This is a big, big deal and can evaporate lots of ugly Scratch.Set constructs.
  • Go modules. Really fantastic dependency manager that is now built into the go command. Implemented by Russ Cox, one of the top smartest IT brains in this universe. It supports running multiple major versions of the same module (Blackfriday1 and 2).
6 Likes

Nope!

sounds good, what’s new/benefit in Blackfriday v2?

BF2 in itself not so much, but it enables us to fix some stuff. I have some plans to create a proper “content data structure” with sections like Footnotes, Headers (I make this up now as I write) and possibly some more in the future. This should enable creating proper ToC and … whatever. It also lays the foundation for more renderers (not just HTML). So we can render content per output format etc. (Latex, Epub).

4 Likes

In consideration of…

…how could anyone have any objections? The only objection is that I’m finally getting good with .Scratch

@gaetawoo, might want to check out the following, which I’m also looking forward to, as I think it will remove a lot of CSS- and JS-based hacks people are doing to work around the default behavior of #TableOfContents. Awesome, @bep:

1 Like

@rdwatters note that my thinking about “toc and footnotes” have evolved a little since I created the issue above. It is now even cooler.

2 Likes

I’m not surprised :smile: Looking forward to seeing what’s next. Thanks!

So do I. But if we can do without it, it’s for the best.

No objections from me @bep

I was kidding :wink: @alexandros

1 Like

Nope! I don’t use GoLang anyway, just the exe version. Go for it.

Can’t wait refactoring all those conditionals without Scratch.

3 Likes

I couldn’t wait either :wink:

4 Likes

This doesn’t mean that Scratch is disappearing though, right? I have some partials that use Scratch for passing multiple values back to the template calling the partial.

Otherwise, no objections. Looking forward to seeing more improvements in Hugo!

Scratch will live – and will still have plenty of use cases that this particular “new thing” does not help with.

4 Likes

I’m trying to build a new version of Hugo (have just built from github for… at least past year).
I’m having problems w/ mage (lots of issues building it’s update); lots of this kind of thing:

# runtime
/usr/local/go/src/runtime/map.go:64:2: bucketCntBits redeclared in this block
	previous declaration at /usr/local/go/src/runtime/hashmap.go:64:18
/usr/local/go/src/runtime/map.go:65:2: bucketCnt redeclared in this block
	previous declaration at /usr/local/go/src/runtime/hashmap.go:65:23
/usr/local/go/src/runtime/map.go:69:2: loadFactorNum redeclared in this block
	previous declaration at /usr/local/go/src/runtime/hashmap.go:69:18


I updated to go-1.11. Am I missing something simple?

The transition to Go 1.11 is half way through. See:

Yep, set GO111MODULE to "on" [Here’s my full build script].

Also ensure that you have the latest mage installed.

Also, you really don’t need Mage if you just want to build the Hugo binary. A working way would be to:

  1. Install Go 1.11
  2. Clone Hugo outside of GOPATH (i.e. to /usr/bep/dev/hugo or something
  3. cd /usr/bep/dev/hugo
  4. go install

(no need to set GO111MODULE once you’re not inside GOPATH)

1 Like

You mean mage install, right? So before step 4, go get -u -v github.com/magefile/mage would be needed (if latest mage not already installed)?