Skip to content
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

Dependabot/cargo/jsonschema 0.21.0 #44

Merged

Conversation

stevenhorsman
Copy link
Contributor

With jsonschema v0.21.0 we get the error:

error[E0412]: cannot find type `JSONSchema` in crate `jsonschema`

this is because the struct was renamed to Validator in
v0.20.0
so update this reference along with the jsonschema version bump

dependabot bot and others added 2 commits February 3, 2025 13:31
Updates the requirements on [jsonschema](https://github.com/Stranger6667/jsonschema-rs) to permit the latest version.
- [Release notes](https://github.com/Stranger6667/jsonschema-rs/releases)
- [Changelog](https://github.com/Stranger6667/jsonschema-rs/blob/master/CHANGELOG.md)
- [Commits](Stranger6667/jsonschema@rust-v0.18.0...rust-v0.21.0)

---
updated-dependencies:
- dependency-name: jsonschema
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
With jsonschema v0.21.0 we get the error:
```
error[E0412]: cannot find type `JSONSchema` in crate `jsonschema`
```
this is because the struct was renamed to Validator in
[v0.20.0](https://github.com/Stranger6667/jsonschema/releases/tag/rust-v0.20.0)
so update this reference along with the jsonschema version bump

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
@stevenhorsman
Copy link
Contributor Author

Attempt to fix the error seen with #34

@stevenhorsman
Copy link
Contributor Author

Bah, the rebase has bumped to a newer version with more breaking changes in!

@stevenhorsman
Copy link
Contributor Author

stevenhorsman commented Feb 3, 2025

Bah, the rebase has bumped to a newer version with more breaking changes in!

Actually it seemed to be the clap create with a missing feature. I guess we are running with a new rust version, so it's finding more issues now.

@zvonkok @Apokleos - going forward, I wonder if we should pin the rust version used in the CI here to match the kata-agent version as I think it's the only consumer of this at the moment?

@zvonkok
Copy link
Contributor

zvonkok commented Feb 3, 2025

Yes we should to that. In some other projects I use rust-toolchain.yaml to pin it to the kata-agent.

Cargo.toml Outdated
@@ -14,23 +14,22 @@ keywords = ["container"]
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "cdi" # Name of the binary executable
name = "cdi" # Name of the binary executable
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the spacing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done - that's a weird auto format rule I've not hit before :)

Cargo.toml Outdated
path = "src/bin/cdi.rs" # Path to the source file

[[bin]]
name = "validate" # Name of the binary executable
name = "validate" # Name of the binary executable
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the spacing?

We are using the derive `Parser`, but didn't have
the feature, so are getting:
```
error: cannot find derive macro `Parser` in this scope
```

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
With newer rust version clippy complains with:
```
warning: this `map_or` is redundant
```
so replace with `is_some_and` as directed.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
@stevenhorsman stevenhorsman force-pushed the dependabot/cargo/jsonschema-0.21.0 branch from 448c6ef to 0fd7733 Compare February 3, 2025 14:49
```
error: empty line after outer attribute
```
so remove the new line between them

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
@zvonkok zvonkok merged commit 2528787 into cncf-tags:main Feb 3, 2025
2 of 3 checks passed
@stevenhorsman stevenhorsman deleted the dependabot/cargo/jsonschema-0.21.0 branch February 3, 2025 16:40
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.

2 participants