Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been meaning to do this for a while, but with recent text changes it felt like a good moment.
So far we used tuples for outputs, but that is a bit annoying in certain places and makes pattern matching more verbose if we ignore tuple elements. Given that outputs are data structures that we keep, I should've done it from the start :)
I also moved output types specification from kino here. It's a fairly low-level detail, that doesn't matter for kino users in practice, and it is a part of the runtime specification, so here's a better place. Additionally, here we actually work with the outputs, so detailed typespecs can be more helpful.
I added a normalization function (
Session.normalize_runtime_output/1
) for backward compatibility and it handles all attributes that were added incrementally and may not be present. Going forward we should always normalize outputs there, so that we can assume complete outputs everywhere else.