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

Get should validate the type of its input at runtime #6656

Closed
stuhood opened this issue Oct 18, 2018 · 2 comments
Closed

Get should validate the type of its input at runtime #6656

stuhood opened this issue Oct 18, 2018 · 2 comments
Assignees

Comments

@stuhood
Copy link
Member

stuhood commented Oct 18, 2018

Currently, a Get does not validate the declared type of its input at runtime, which causes graphs to fail with exceptions in the wrong places.

While constructing a Get we should fail fast in the Get constructor. The effect of this will be a much more usable exception.

@stuhood
Copy link
Member Author

stuhood commented Nov 1, 2018

The case where we were expecting a failure but didn't get it was related to #6657: the hypothesis was that @illicitonion was doing something like:

x = yield Get(X, Address, build_file_address)

... where build_file_address was of type BuildFileAddress, which is a subtype of Address, but not an exact match. We'd like the attempt to create an invalid Get instance like that to raise an exception.

@stuhood
Copy link
Member Author

stuhood commented Nov 8, 2018

Fixed in #6731. Thanks @dotordogh !

@stuhood stuhood closed this as completed Nov 8, 2018
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

No branches or pull requests

2 participants