Skip to content

Fix compilation on 32 bit architectures #936

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

Merged
merged 1 commit into from
Apr 8, 2025
Merged

Fix compilation on 32 bit architectures #936

merged 1 commit into from
Apr 8, 2025

Conversation

jtibshirani
Copy link
Contributor

@jtibshirani jtibshirani commented Apr 7, 2025

This PR fixes a bug where Zoekt would not compile on 32-bit architectures. It
also takes the opportunity to start using the math library everywhere instead
of our own constants like maxUInt32 to help prevent this sort of issue in the
future by encouraging devs to select the most accurate "max" type for their
specific situation.

Closes #935

@jtibshirani jtibshirani requested a review from Copilot April 7, 2025 21:19
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

index/matchtree_test.go:309

  • [nitpick] Consider revising the error message to use consistent pluralization (e.g. "documents") for clarity.
t.Fatalf("expected %d document, but got at least 1 more", len(want))

index/matchtree.go:676

  • [nitpick] The variable name 'minCount' could be made more descriptive to clarify that it stores the minimum number of candidates from the children.
minCount := math.MaxInt

@jtibshirani jtibshirani requested a review from a team April 7, 2025 21:39
@jtibshirani jtibshirani merged commit 4aa5792 into main Apr 8, 2025
10 checks passed
@jtibshirani jtibshirani deleted the jtibs/uint32 branch April 8, 2025 15:06
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.

Bug: Cannot build on 32-bit system
2 participants