-
Notifications
You must be signed in to change notification settings - Fork 24
Replace packr and packd in gobuffalo cli with embed.FS #48
Replace packr and packd in gobuffalo cli with embed.FS #48
Conversation
In 1.16 files and directories starting with a dash (e.g. I used a custom The next steps:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @fasmat, thanks for putting this together. Left a couple of comments on things that would be nice to have and future tasks. It was a nice excercise to review this PR.
@@ -0,0 +1,100 @@ | |||
module coke | |||
|
|||
go 1.17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this work when building against Go 1.16 (We still run tests there).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is just a newly generated project with cli and it defaults to the installed go version (1.17 in my setup).
I will update that again when gobuffalo/buffalo is completely free of packr and then tackle the Todo that mentioned generating and building a new buffalo project in a test
|
||
switch opts.Style { | ||
case "multi": | ||
g.Box(packr.New("github.com/gobuffalo/buffalo/multi", "../docker/templates/multi")) | ||
multi, err := fs.Sub(templates, "templates/multi") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a follow up action from this one: moving to only have multi-stage docker file. That would simplify this generator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I've seen #42 but we should resolve that task in a dedicated PR. I didn't want to do too much at once.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'm on that one.
I started migrating a bunch of files away from
packr
toembed
already, but some are still missing. This PR is just here to keep track of the changes and allow for early feedback.I needed to upgrade
gobuffalo/genny
to be compatible withio/fs
and other golang 1.16 features: gobuffalo/genny#42Next steps:
gobuffalo/buffalo
codebase also needs to be migrated frompackr
toembed.FS