fix: patch esaxx-rs for Windows CRT mismatch and update lancedb depen…#491
fix: patch esaxx-rs for Windows CRT mismatch and update lancedb depen…#491felix-schultz merged 1 commit intoalphafrom
Conversation
Summary of ChangesHello @felix-schultz, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing cross-platform compatibility, particularly for Windows and iOS environments, by making targeted adjustments to dependency configurations. It addresses critical build and linking issues related to the C Runtime Library on Windows and refines the usage of specific features within the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces targeted dependency updates to improve cross-platform compatibility, especially for Windows. The changes include patching esaxx-rs to resolve a CRT mismatch and conditionally enabling the fp16kernels feature for lancedb on non-Windows platforms. The approach is sound and directly addresses the described issues. My review includes a couple of suggestions to improve the long-term stability and maintainability of the dependency overrides by using specific commit revisions instead of branches.
| # Patch esaxx-rs to fix Windows CRT mismatch (upstream hardcodes static CRT /MT, | ||
| # conflicting with ort_sys which uses dynamic CRT /MD → LNK2038) | ||
| [patch.crates-io] | ||
| esaxx-rs = { git = "https://github.com/thewh1teagle/esaxx-rs.git", branch = "feat/dynamic-msvc-link" } |
There was a problem hiding this comment.
For long-term stability and reproducible builds, it's recommended to pin this patch to a specific commit hash (rev) instead of a branch. This prevents cargo update from pulling in unexpected changes from the feat/dynamic-msvc-link branch.
| esaxx-rs = { git = "https://github.com/thewh1teagle/esaxx-rs.git", branch = "feat/dynamic-msvc-link" } | |
| esaxx-rs = { git = "https://github.com/thewh1teagle/esaxx-rs.git", rev = "3c8ac57d245ab328f7c71953b7c116a8d1d5498f" } |
| # Using lancedb branch with lance v3.0.0-beta.1 which includes iOS fp16kernels fix (PR #5747) | ||
| lancedb = { git = "https://github.com/lancedb/lancedb.git", branch = "codex/update-lance-3-0-0-beta-1", features = ["polars", "remote", "aws", "azure", "gcs", "fp16kernels"]} | ||
| # fp16kernels are not supported on Windows (lance skips compiling the C kernels for MSVC) | ||
| lancedb = { git = "https://github.com/lancedb/lancedb.git", branch = "codex/update-lance-3-0-0-beta-1", features = ["polars", "remote", "aws", "azure", "gcs"]} |
There was a problem hiding this comment.
For long-term stability and reproducible builds, it's recommended to pin this dependency to a specific commit hash (rev) instead of a branch. This prevents cargo update from pulling in unexpected changes from the codex/update-lance-3-0-0-beta-1 branch. The same should be applied to the target-specific dependency on line 45.
| lancedb = { git = "https://github.com/lancedb/lancedb.git", branch = "codex/update-lance-3-0-0-beta-1", features = ["polars", "remote", "aws", "azure", "gcs"]} | |
| lancedb = { git = "https://github.com/lancedb/lancedb.git", rev = "422e10ba43576384250dc22fbd1d7e4c0ac9d2cb", features = ["polars", "remote", "aws", "azure", "gcs"]} |
| iceberg-datafusion = { git = "https://github.com/TM9657/iceberg-rust.git", branch = "main", optional = true } | ||
|
|
||
| [target.'cfg(not(target_os = "windows"))'.dependencies] | ||
| lancedb = { git = "https://github.com/lancedb/lancedb.git", branch = "codex/update-lance-3-0-0-beta-1", features = ["fp16kernels"]} |
There was a problem hiding this comment.
Pinning this to a specific commit hash (rev) ensures consistency with the main dependency declaration and improves build reproducibility.
| lancedb = { git = "https://github.com/lancedb/lancedb.git", branch = "codex/update-lance-3-0-0-beta-1", features = ["fp16kernels"]} | |
| lancedb = { git = "https://github.com/lancedb/lancedb.git", rev = "422e10ba43576384250dc22fbd1d7e4c0ac9d2cb", features = ["fp16kernels"]} |
This pull request makes targeted dependency updates and configuration changes to improve cross-platform compatibility, particularly for Windows and iOS environments. The main focus is on adjusting how certain crates are compiled and linked, to avoid platform-specific issues.
Dependency and platform compatibility updates:
lancedbdependency inpackages/storage/Cargo.tomlto remove thefp16kernelsfeature for Windows, since fp16kernels are not supported and Lance skips compiling the C kernels for MSVC.lancedbwith thefp16kernelsfeature enabled only for non-Windows targets, ensuring correct feature usage across platforms.Build and linking fixes:
esaxx-rscrate inCargo.tomlto use a fork that links against the dynamic MSVC CRT, resolving a conflict withort_syswhich uses dynamic CRT and avoiding linker errors on Windows.…dencies