-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: deterministic compiled mainfile #348
fix: deterministic compiled mainfile #348
Conversation
sort template data so resulting mainfile is consistantly reproducible, which is important to leverage build cache and results in a consistent build id on output (given identical build parameters, e.g. ldflags, output file name, etc.) Result of `mage -compile ./mage_static && go tool buildid ./mage_static` should now always be identical on repeated invocation. Results in a probably imperceptible build time quickening, but solves a minor peave of mine, and adds a test as protection from regression :)
Co-authored-by: Nate Finch <nate.finch@gmail.com>
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, thanks!
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.
A few more spelling fixes.
got caught out not using vim's spellcheck Co-authored-by: Paul Burlumi <paul@burlumi.com>
got caught out not using vim's spellcheck Co-authored-by: Paul Burlumi <paul@burlumi.com>
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.
@natefinch LGTM too after the changes :-)
(just looking at PR's and issues to help with after seeing your msg to make this group-owned)
Lemme check this tonight and I can probably merge it. |
Co-authored-by: Paul Burlumi <paul@burlumi.com>
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, thanks!
sort template data so resulting mainfile is consistantly reproducible,
which is important to leverage build cache and results in a consistent
build id on output (given identical build parameters, e.g. sorted ldflags, etc.)
Result of
mage -compile ./mage_static && go tool buildid ./mage_static
should now always be identical on repeated invocation.
Results in a probably imperceptible build time quickening, but solves a
minor peave of mine, and adds a test as protection from regression :)
also a couple minor formatting fixes from gopls courtesy of format on save.