Skip to content

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 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

3 participants