Improvements
Improve runtime/debug
Go 1.18 incompatibility via stable go.mod
file parsing — #129 ⇄ #130 (⊶ df29129)
↠ As of Go 1.18 the debug.ReadBuildInfo function does not work for Mage executables anymore because the way how module information is stored changed. Therefore the fields of the returned debug.Module type only has zero values, including the module path. The debug.Module.Version field has a default value ((devel)
) which is not Semver compatible and causes the parsing to fail. The change in Go 1.18 also came with the new debug/buildinfo
package which allows to read the information from compiled binaries while the runtime/debug.ReadBuildInfo
function returns information from within the running binary. Both are not suitable anymore which is also described in the Go 1.18 version
command release notes:
The underlying data format of the embedded build information can change with new
go
releases, so an older version ofgo
may not handle the build information produced with a newer version ofgo
. To read the version information from a binary built withgo
1.18, use thego
version command and thedebug/buildinfo
package fromgo
1.18+.
To get the required module information that was previously provided by the runtime/debug package the official golang.org/x/mod/modfile package is now used instead that provides the implementation for a parser and formatter for go.mod
files 1. This allows to safely get the module path without the need to depend on runtime/dynamic logic that might change in future Go versions.
Note that this change also increased the minimum Go version from 1.17
to 1.19
!
Bug Fixes
Update to tmpl-go
template repository version 0.11.0
and 0.12.0
— #112, #127 ⇄ #113, #128 (⊶ a4e2a38, c4fe6cf)
↠ Updated to tmpl-go
version 0.11.0
and 0.12.0
which…
- fixed
golangci-lint
running errors due torevive
s unknowntime-equal
rule. - disabled the
revive
linter rulepackage-comments
. - updated to the
tmpl
template repository version0.11.0
.
See the full tmpl-go
version 0.11.0
and 0.12.0
and changelogs for all details.
The full changelog is available in the repository
Copyright © 2019-present Sven Greb