Hugo 0.48 will be >= Go 1.11 Only


#1

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?


Where does the "build with the last 2 Go versions" promise come from?
#2

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).

#3

Nope!


#4

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


#5

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).


#6

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:


#7

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


#8

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


#9

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

No objections from me @bep


#10

I was kidding :wink: @onedrawingperday


#11

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


#12

Can’t wait refactoring all those conditionals without Scratch.


#13

I couldn’t wait either :wink:


#14

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!


#15

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


#16

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?


#17

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


#18

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

Also ensure that you have the latest mage installed.


#19

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)


#20

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