Skip to content

Make helper tool build deterministic#382

Merged
jayconrod merged 1 commit intobazel-contrib:masterfrom
andrew-d:andrew/deterministic-helpers
Nov 27, 2018
Merged

Make helper tool build deterministic#382
jayconrod merged 1 commit intobazel-contrib:masterfrom
andrew-d:andrew/deterministic-helpers

Conversation

@andrew-d
Copy link
Contributor

Currently, the builds for helper utilities fetch_repo and gazelle aren't deterministic, and have hashes that change depending on where they're built. Since these are built as repository rules, it makes it tricky to prefetch dependencies using bazel sync, since the hash of dependencies will change per-build.

These changes build the helper utilities with the appropriate set of flags to ensure that they're deterministic; this can be tested by running strings path-to-gazelle | egrep '(\/bazel\/|\/tmp\/)'.

Let me know if this works for you folks! All tests pass locally on Linux with these changes.

Copy link
Contributor

@jayconrod jayconrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. go_repository doesn't really support bazel sync yet (we'll probably eventually want to specify a go.mod-style version pattern or something), but more deterministic is better. Thanks!

@jayconrod jayconrod merged commit 455e693 into bazel-contrib:master Nov 27, 2018
@andrew-d andrew-d deleted the andrew/deterministic-helpers branch November 27, 2018 21:01
@andrew-d
Copy link
Contributor Author

Thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants