-
-
Notifications
You must be signed in to change notification settings - Fork 194
Search for boxes in vendor directory #200
base: master
Are you sure you want to change the base?
Conversation
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.
Found some fixes!
P.S. share your ideas, feedbacks or issues with us at https://github.com/fixmie/feedback (this message will be removed after the beta stage).
@@ -9,7 +9,7 @@ import ( | |||
"github.com/gobuffalo/packr/v2/plog" | |||
) | |||
|
|||
var DefaultIgnoredFolders = []string{".", "_", "vendor", "node_modules", "_fixtures", "testdata"} | |||
var DefaultIgnoredFolders = []string{".", "_", "node_modules", "_fixtures", "testdata"} |
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.
exported identifier "DefaultIgnoredFolders" should have comment
var DefaultIgnoredFolders = []string{".", "_", "node_modules", "_fixtures", "testdata"} | |
// DefaultIgnoredFolders ... | |
var DefaultIgnoredFolders = []string{".", "_", "node_modules", "_fixtures", "testdata"} |
I don’t quite understand why you would want to harvest boxes in vendor. Do you want to have a super project and assemble boxes from inner projects? The way you have modified the code now changes a default that will most certainly surprise the majority of users. Could you instead modify the public |
The reason for the change originated in our need to use boxes from one project in another project. But I think the rationale here goes deeper. The existing box resolution logic was able to pick up boxes in GOPATH but not in vendor directory which is Go default import resolution order. For example, if I have "github.com/x/y" that uses packr boxes in GOPATH, the boxes will be bundled into my binary. But the code Go compiles will be taken from the vendor directory (if it exists) leading to some unexpected behaviour. If you feel that such a fix would not be globally appropriate, we will keep using our forked version. |
Why not just making the ignored folder configurable? |
+1 for something that allows us to pick up packr boxes in the We need to grab a text template defined in one of our dependencies. |
When dependencies are vendored (not stored in GOPATH or GOROOT), packr is not able to find Boxes. This Change allows locating boxes in vendor directory (excluding github.com/gobuffalo/packr)