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

fix: added deprecated field to the related structs #61

Merged
merged 7 commits into from
Aug 19, 2024

Conversation

HasanAlrimawi
Copy link
Contributor

@HasanAlrimawi HasanAlrimawi commented Aug 13, 2024

This PR is compulsory as a first step to address issue deno repo issue
Changes
Added deprecated field to related structs in order to delegate deprecation info if found back to deno.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

Looks like the added test is failing?

src/registry.rs Outdated Show resolved Hide resolved
src/registry.rs Outdated Show resolved Hide resolved
@HasanAlrimawi
Copy link
Contributor Author

HasanAlrimawi commented Aug 19, 2024

I tried to update the visitors as mentioned to return Ok(v), but an error shows e.g. "mismatched types
expected enum std::option::Option found type bool" appears.
I also tried Ok(Some(v)) but then this error arises "expected type parameter T found type bool"

MORE IMPORTANTLY, I also tried to handle the deserialization at fn option level, without going through the visitor by returning Option<String> when Ok result is returned and returning a None value when Err result is received but the same happened.
I desperately changed Option<T> to Option<String> and updated anything connected to it, but still, it doesn't work even when I hardcode visitors to always return Ok(Some("some string".to_string())), the error is always "thread 'registry::test::deserializes_pkg_info_with_deprecated_as_array' panicked at src\registry.rs:910:66:
called Result::unwrap() on an Err value: Error("expected , or }".

Any insights??

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM

@dsherret dsherret merged commit ebd57a4 into denoland:main Aug 19, 2024
1 check passed
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