Use version appropriate Go module path #1321
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR change? What problem does it solve?
This theme is packaged as a Go module in order to allow it to be managed as a dependency of Hugo-based websites.
There are two problems that cause this theme to be difficult to use as a Go module dependency:
This PR resolves the first of these problems by adding the required
/v7
suffix to the Go module path, bringing it into compliance with the Go module framework.The problem of non-compliant tag names must be fixed by an adjustment to the release procedure rather than a PR. However, this PR lays the groundwork for the use of compliant tag names in future releases.
Using a compliant module path as well as compliant tag names would benefit the users of this theme by allowing them to manage the dependency in a safe and efficient manner.
Module path
A Go module is identified by a "module path". The Go module framework requires that this path have a major version suffix if the project is at a version of 2.0.0 or above:
https://go.dev/ref/mod#major-version-suffixes
This project is at version 7.0, so its Go module path
github.com/adityatelange/hugo-PaperMod
violates this requirement.Tag names
Due to the current use of a tag name format that does not meet the the semver-compliant requirement of the Go module framework, the standard procedure for installing the theme in a Hugo-based website as a Go module dependency results in a potentially unstable beta version of the theme from the tip of the theme repository's default branch being installed.
The resulting "pseudo-version" of the dependency (e.g.,
v0.0.0-20230826144857-efe4cb45161b
) makes it so that updates of the dependency cannot be managed automatically via the popular Dependabot service.Was the change discussed in an issue or in the Discussions before?
No
Additional Context
Following the merge of this pull request, the instructions for installation as a Go module dependency should be updated with the new module path:
However, this will not be a breaking change even for those using the previous module path as it will continue to function as before.
PR Checklist