Skip to content
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

[rules_go] show x archive isn't stable to package interface #4143

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joeljeske
Copy link
Contributor

@joeljeske joeljeske commented Oct 15, 2024

What type of PR is this?

Other - adding test case proving x archive isn't stable as intended

related to #4111

How to Use

Run bazel run //tests/core/go_library/reproducible_x:show_not_reproducible to build a go_library and hash the .x archive, and then to modify the implementation slightly, but not to change the package interface and expect the resulting .x hash to remain constant.

It was suggested that a sufficiently simple test case could result in source code being inlined into callers and thus modifying the resulting x archive, so I grabbed a "calculator" file to demonstrate sufficiently complex code that should result in a stable interface. In my tests, the resulting archive is not stable.

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.

1 participant