Skip to content

[quality of life] Fix "--all-features" - #1338

Open
Mark Hildebrand (hildebrandmw) wants to merge 1 commit into
mainfrom
mhildebr/all-features
Open

[quality of life] Fix "--all-features"#1338
Mark Hildebrand (hildebrandmw) wants to merge 1 commit into
mainfrom
mhildebr/all-features

Conversation

@hildebrandmw

Copy link
Copy Markdown
Contributor

Building the workspace with --all-features has been broken since open-sourcing due to the flatbuffers-build feature in diskann-quantization requiring the flatc compiler. This kind of made sense before open-sourcing, but now is problematic since the feature does not actually enable any functionality in the crate.

This PR moves the flatbuffer compilation step into a very simple script and removes the build step from diskann-quantization. The script is intentionally kept pretty dumb (no directory or stale file removal) because (1) I'm afraid of wiping someone's hard drive and (2) updates do not happen frequently).

The min/max quantizer was updated to have a formatting similar to the other generated files.

As a consequence, CI has been updated to use --all-features instead of the (long) explicit list. This actually increases coverage because a few features were missed and means that we no longer need to maintain this list manually.

AI disclosure: I still cannot type - an agent generated the new script, updated the README, removed the old build.rs and updated CI. This is another reason I wanted to keep the script simple.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes workspace builds under cargo ... --all-features by removing the diskann-quantization build-time dependency on flatc (previously via the flatbuffers-build feature + build.rs) and shifting FlatBuffers generation to a checked-in helper script. CI is updated to exercise --all-features directly instead of maintaining an explicit features list.

Changes:

  • Remove diskann-quantization’s flatbuffers-build feature and delete build.rs to eliminate flatc as a build requirement.
  • Add diskann-quantization/tools/generate-flatbuffers.sh for regenerating checked-in FlatBuffers bindings, and update crate docs accordingly.
  • Update CI/nightly workflows to run clippy/tests/docs with --all-features.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
diskann-quantization/tools/generate-flatbuffers.sh New script to regenerate checked-in FlatBuffers Rust bindings.
diskann-quantization/src/flatbuffers/minmax/quantizer_generated.rs Regenerated/rewrapped generated FlatBuffers output to match repo formatting conventions for generated files.
diskann-quantization/src/flatbuffers.rs Update module doc to point to the new generation script and clarify why a custom import tree is maintained.
diskann-quantization/README.md Document how to regenerate FlatBuffers bindings and which flatc version to use.
diskann-quantization/Cargo.toml Remove flatbuffers-build feature entry.
diskann-quantization/build.rs Delete build-time flatc compilation/copy step.
.github/workflows/nightly.yml Switch clippy/tests/docs to --all-features.
.github/workflows/ci.yml Switch clippy/tests/docs to --all-features.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

-o "$output" \
"$root"/schemas/*.fbs

rm "$output/mod.rs"
Comment on lines +54 to +60
cat <<'EOF'
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT license.
*/

EOF
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.00000% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.55%. Comparing base (2bb3a53) to head (55a3b5c).

Files with missing lines Patch % Lines
...tion/src/flatbuffers/minmax/quantizer_generated.rs 64.00% 27 Missing ⚠️

❌ Your patch status has failed because the patch coverage (64.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1338      +/-   ##
==========================================
+ Coverage   92.54%   92.55%   +0.01%     
==========================================
  Files         522      521       -1     
  Lines       99531    99506      -25     
==========================================
- Hits        92107    92099       -8     
+ Misses       7424     7407      -17     
Flag Coverage Δ
miri 92.55% <64.00%> (+0.01%) ⬆️
unittests 92.52% <64.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
diskann-quantization/src/flatbuffers.rs 100.00% <ø> (ø)
...tion/src/flatbuffers/minmax/quantizer_generated.rs 57.14% <64.00%> (-3.19%) ⬇️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

5 participants