-
Notifications
You must be signed in to change notification settings - Fork 169
Conversation
Right now vfsgen is imported in a file with `+build ignore`. This cause `go mod tidy` to delete it from go.mod and therefore breaks dependabot. This patch simply adds the import to a built file.
an alternative is to switch to go:embed. But that means we would require go 1.16. Thoughts? |
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.
Can we not just add vfsgen while runtime in CI? That will avoid adding to the mod file at all.
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.
I like this approach as it is commonly used in golang and do not hide complexity in CI while allowing developers to use go mod tidy
without any issues.
Referencing shurcooL/vfsgen#83 just to have a GitHub link and revert this PR when upstream issue is solved. |
If we include in file whose package is being used actively in Promscale, won't that include in the promscale binary and increase the size, even though its not utilized? |
@Harkishen-Singh I don't believe the size difference is big enough to worry about |
Yeah, i check and the size diff is negligible, so we can go ahead. -rwxrwxr-x 1 harkishen harkishen 31M Oct 21 12:47 promscale_master
-rwxrwxr-x 1 harkishen harkishen 31M Oct 21 12:47 promscale_pr_822 |
bors r+ |
Build succeeded: |
Right now vfsgen is imported in a file with
+build ignore
.This cause
go mod tidy
to delete it from go.mod and thereforebreaks dependabot.
This patch simply adds the import to a built file.