Conversation
ntner
added a commit
that referenced
this pull request
Mar 31, 2026
## Summary - Remove entirely unused packr dependency and all dead code that referenced it - Delete 365 files (56k+ lines), mostly vendored transitive dependencies ## Details Packr (`github.com/gobuffalo/packr`) was completely unused at runtime. The rack loads CloudFormation templates directly from the filesystem via `template.New(file).ParseFiles(path)` in `template.go:157`, with no packr involvement. The Dockerfile copies template files into the image. Dead code removed: - `pkg/templater/templater.go` — used `packr.Box` but had zero callers (no file imports this package) - `tools.go` — sole content was `_ "github.com/gobuffalo/packr/packr"` build tool import - `cmd/template/main.go` — dead code with an empty switch statement - `Makefile` — removed `package:` target (ran packr), `clean-package:` target (deleted never-generated `*-packr.go` files), and `package` dependency from `release-cli:`, `release-image:`, and `release-provider:` targets Vendored dependencies removed (transitive from packr): BurntSushi/toml, gobuffalo/buffalo-plugins, gobuffalo/envy, gobuffalo/events, gobuffalo/flect, gobuffalo/genny, gobuffalo/logger, gobuffalo/mapi, gobuffalo/meta, gobuffalo/packd, gobuffalo/packr, gobuffalo/syncx, inconshreveable/mousetrap, joho/godotenv, karrick/godirwalk, markbates/oncer, markbates/safe, rogpeppe/go-internal, spf13/cobra, and portions of golang.org/x/mod and golang.org/x/tools. ## Backward Compatibility No runtime code paths are affected. Template loading uses filesystem reads, not packr. The `package` Makefile target was only a dependency of `release-cli`, `release-image`, and `release-provider` — it ran packr to embed assets that were never actually used at runtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Details
Packr (
github.com/gobuffalo/packr) was completely unused at runtime. The rack loads CloudFormation templates directly from the filesystem viatemplate.New(file).ParseFiles(path)intemplate.go:157, with no packr involvement. The Dockerfile copies template files into the image.Dead code removed:
pkg/templater/templater.go— usedpackr.Boxbut had zero callers (no file imports this package)tools.go— sole content was_ "github.com/gobuffalo/packr/packr"build tool importcmd/template/main.go— dead code with an empty switch statementMakefile— removedpackage:target (ran packr),clean-package:target (deleted never-generated*-packr.gofiles), andpackagedependency fromrelease-cli:,release-image:, andrelease-provider:targetsVendored dependencies removed (transitive from packr): BurntSushi/toml, gobuffalo/buffalo-plugins, gobuffalo/envy, gobuffalo/events, gobuffalo/flect, gobuffalo/genny, gobuffalo/logger, gobuffalo/mapi, gobuffalo/meta, gobuffalo/packd, gobuffalo/packr, gobuffalo/syncx, inconshreveable/mousetrap, joho/godotenv, karrick/godirwalk, markbates/oncer, markbates/safe, rogpeppe/go-internal, spf13/cobra, and portions of golang.org/x/mod and golang.org/x/tools.
Backward Compatibility
No runtime code paths are affected. Template loading uses filesystem reads, not packr. The
packageMakefile target was only a dependency ofrelease-cli,release-image, andrelease-provider— it ran packr to embed assets that were never actually used at runtime.