feat: PRSDM-10268 bring Presidium Open Source up to date 20260217#269
feat: PRSDM-10268 bring Presidium Open Source up to date 20260217#269Quantumplate merged 15 commits intodevelopfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Presidium Open Source codebase by updating dependencies and replacing deprecated packages. The changes focus on upgrading Go to 1.25, Hugo to v0.155.3, migrating from the deprecated packr library to Go's native embed package, and updating various outdated dependencies to their latest stable versions.
Changes:
- Updated Go version from 1.23.0 to 1.25 across all modules and workflows
- Upgraded Hugo from v0.87.0 to v0.155.3 and updated Hugo references in documentation
- Replaced
packr/v2with Go's nativeembed.FSfor template embedding - Updated multiple deprecated dependencies including
pkg/errors,yaml.v2,sprig/v2, andgoutils - Modernized build tooling in Makefile and GitHub Actions workflows
Reviewed changes
Copilot reviewed 38 out of 41 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Updated Go version to 1.25 and dependencies including Hugo v0.155.3, sprig v3, yaml v3, and other modernized packages |
| embedded.go | New file implementing Go's embed directive for templates |
| main.go | Initialize embedded filesystem for template service |
| pkg/domain/service/template/template.go | Refactored to use fs.FS interface instead of packr, added SetFS and findModuleRoot functions |
| pkg/domain/service/conversion/markdown/operations.go | Added local isAbsURL function to replace removed Hugo paths.IsAbsURL |
| pkg/domain/service/conversion/conversion.go | Updated copy.Options Skip function signature for v1.14.1 API |
| pkg/configtranslation/configfile.go | Fixed YAML struct tags and migrated to yaml.v3 |
| pkg/domain/service/conversion/fileactions/fileactions.go | Replaced pkg/errors with stdlib fmt.Errorf |
| Makefile | Modernized with new targets, help documentation, and updated build commands |
| .goreleaser.yaml | Removed packr2 hook and added extended build tag |
| .github/workflows/release.yml | New workflow with updated action versions |
| docs/go.mod | Updated Go version and theme dependencies |
| templates/*/go.mod | Updated from 1.16/1.23 to 1.25 across all template directories |
| templates/*/go.mod.tmpl | Renamed from go.mod to support embed (added .tmpl suffix) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Zalaras
left a comment
There was a problem hiding this comment.
Some from Claude, I filtered some out:
- GetListing() behaviour change (pkg/domain/service/template/template.go)
- The old implementation returned all walk entries; the new one filters to files only (if !d.IsDir()).
- Any caller that relied on directory entries being included in the listing will silently break. This needs verification that no callers depend on that behaviour, or a comment explaining the intentional change.
- ProcessTemplate() strips .tmpl suffix unconditionally
- strings.TrimSuffix(filename, ".tmpl") is applied to output filenames. This is correct for the renamed go.mod.tmpl files, but if any template file in templates/ does not have a .tmpl extension, this is a no-op and fine. However, if a non-template file happened to end in .tmpl for other reasons, it would be silently renamed. Low risk, but worth a comment.
- go.mod template version inconsistency
- Template go.mod.tmpl files were bumped to go 1.25 for most archetypes. Confirm this is intentional — generated projects will require Go 1.25, which users must have installed.
- Panic in template.New() — pkg/domain/service/template/template.go
panic("templates directory not found: " + err.Error())
A panic at startup is acceptable for a fatal misconfiguration, but this should ideally return an error to main and exit cleanly with a message, rather than a panic stack trace presented to the end user. - Silent error discard in findModuleRoot()
dir, _ := os.Getwd()
f os.Getwd() fails (e.g., deleted working directory), dir will be empty and the loop will silently fail to find go.mod. The function should at minimum log a warning or return an error sentinel. - docs/layouts/index.html copyright still reads ©2018 — trivial, but it's been in place since the original and this PR touches the file; a good opportunity to update it.
- docs/content/recipes/hosting/github-pages.md — the recipe now uses hugo-version: 'latest' instead of a pinned version (0.87.0). This is more maintainable, but latest in CI can introduce surprise breaking changes for users following the recipe. Consider recommending a minimum version comment. We should use the org one here
- release.yml still uses GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} — this uses a PAT secret rather than the built-in GITHUB_TOKEN. That's fine if required for cross-repo operations, but if it's only needed for the release itself, the default GITHUB_TOKEN with appropriate permissions would be preferable and simpler.
- There are no new tests for the embed.FS migration path or findModuleRoot(). Given this is a significant behaviour change in the template service, at minimum a smoke test verifying New() can locate and enumerate templates would add confidence.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 70 out of 76 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Zalaras
left a comment
There was a problem hiding this comment.
Doesn't run locally:
damianhunter@MacBook-Pro-2 presidium % go run main.go presidium
# command-line-arguments
./main.go:9:17: undefined: templatesFS
damianhunter@MacBook-Pro-2 presidium % go run main.go
# command-line-arguments
./main.go:9:17: undefined: templatesFS
Description
Actions taken:
embed.FSand removepackrpackage.Ticket
Screenshots