Skip to content

Fix build break#634

Merged
anakrish merged 4 commits intomicrosoft:mainfrom
anakrish:fix-build-break
Mar 27, 2026
Merged

Fix build break#634
anakrish merged 4 commits intomicrosoft:mainfrom
anakrish:fix-build-break

Conversation

@anakrish
Copy link
Copy Markdown
Collaborator

No description provided.

- Update rand 0.10 API: use RngExt trait instead of removed Rng trait
- Update jsonschema 0.45 API: replace removed BasicOutput/apply with
  iter_errors for schema validation
- Update jni 0.22 API: migrate from deprecated JNIEnv to EnvUnowned
  with_env pattern, replace deprecated get_string/new_string/throw
  methods with their modern equivalents
- Update pyo3 0.28 API: replace removed PyObject with Py<PyAny>,
  deprecated downcast with cast, and removed with_gil with attach

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
Remove the groups.rust-dependencies catch-all group so Dependabot
opens a separate PR for each Cargo dependency update instead of
bundling them all into a single PR.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
Copy link
Copy Markdown

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.

Pull request overview

This PR addresses build breakages caused by upstream API changes in several dependencies (jsonschema, rand, PyO3, and jni) and updates project configuration accordingly.

Changes:

  • Update schema validation error collection/formatting to use jsonschema::Validator::iter_errors.
  • Adjust Rust/Python/Java bindings to match newer dependency APIs (PyO3 casts/return types; jni Env/EnvUnowned).
  • Update Dependabot Cargo config by removing the Cargo groups section.

Reviewed changes

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

Show a summary per file
File Description
src/schema/meta.rs Switches schema validation to iter_errors and updates error formatting.
src/builtins/numbers.rs Updates rand trait import to match the RNG API used by random_range.
bindings/python/src/lib.rs Updates PyO3 casting and return types; replaces with_gil usage with attach in extension glue.
bindings/java/src/lib.rs Migrates JNI glue from JNIEnv to EnvUnowned/Env and updates string/array handling.
.github/dependabot.yml Removes Cargo dependency grouping configuration and adjusts comments.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
Copy link
Copy Markdown

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.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Stream iter_errors directly into BTreeSet without intermediate Vec
- Use JNI_TRUE/JNI_FALSE for jboolean instead of bool coercion

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
Copy link
Copy Markdown

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.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@anakrish anakrish marked this pull request as ready for review March 27, 2026 12:31
@anakrish anakrish merged commit 35fb5d5 into microsoft:main Mar 27, 2026
63 checks passed
@anakrish anakrish deleted the fix-build-break branch March 27, 2026 17:34
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.

3 participants