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

Assert that storage key is defined. #643

Merged
merged 1 commit into from
Jan 25, 2018
Merged

Assert that storage key is defined. #643

merged 1 commit into from
Jan 25, 2018

Conversation

shaper
Copy link
Contributor

@shaper shaper commented Jan 25, 2018

This came up as an attempt to split on an undefined string while initially exploring Noe's prototype Social recipes. The recipe file has:

map 'FRIENDS_PROFILE_posts' #friends_posts as posts

and this ends up finding no storage key in Arc.instantiate. The recipe is rather kooky but at minimum having a more informative message seemed worth considering. Ref:

https://github.com/shaper/arcs-stories/blob/master/social/Social/Social.recipes#L25

Move assert to arc from storage provider factory.
@shaper shaper requested a review from piotrswigon January 25, 2018 00:37
@shaper
Copy link
Contributor Author

shaper commented Jan 25, 2018

@piotrswigon this is an example where a recipe (written by someone else) that I started looking at was failing with no useful developer facing info. It was just throwing an exception attempting to parse the storage key when the string was undefined.

Copy link
Collaborator

@piotrswigon piotrswigon left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, though I'm not sure I'm an approved reviewer for arcs/ yet, let's see what happens :)

@piotrswigon piotrswigon merged commit 54d39b6 into PolymerLabs:master Jan 25, 2018
@shaper shaper deleted the assert_storage_key branch February 24, 2018 01:02
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