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

blueprint apply definition lookup error #560

Merged
merged 2 commits into from
May 31, 2023
Merged

blueprint apply definition lookup error #560

merged 2 commits into from
May 31, 2023

Conversation

MicroProofs
Copy link
Member

When trying to apply some parameters we kept facing this error.

Upon further inspection is seems like lookup was using Reference::as_key which returns the definition ref with ~1. The definitions map does not contain keys in that format, the keys in this map use / instead of ~1.

We've updated as_key to always replace ~1 with / so that lookups work as expected.

Screenshot 2023-05-31 at 12 19 30 AM

MicroProofs and others added 2 commits May 31, 2023 00:18
Co-authored-by: Lucas Rosa <x@rvcas.dev>
Co-authored-by: Lucas Rosa <x@rvcas.dev>
@MicroProofs MicroProofs requested a review from KtorZ May 31, 2023 04:29
Copy link
Member

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

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

I think that should work. Indeed, in the JSON schema, the definitions keys will be using / whereas the pointers references will be using ~1.

@KtorZ KtorZ merged commit fb5f81d into main May 31, 2023
@KtorZ KtorZ deleted the blueprint_apply_fix branch May 31, 2023 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🚀 Released
Development

Successfully merging this pull request may close these issues.

2 participants