Skip to content

Limit sinks to Measurement[A] values#281

Merged
gpampara merged 5 commits intociren:masterfrom
gpampara:io-updates
Apr 23, 2018
Merged

Limit sinks to Measurement[A] values#281
gpampara merged 5 commits intociren:masterfrom
gpampara:io-updates

Conversation

@gpampara
Copy link
Copy Markdown
Member

A bug was found by @stefanvds with the use of a sink in the runner process pipeline. When setting up a pipeline (without using a measure function), compilation would cause the compiler to try create a derivation that never completed. I'm actually surprised that the compiler didn't crash, although I suspect letting the compiler continue, without intervention, would eventually result in a crash. The specific case highlighted by @stefanvds had the compiler running for over 20 minutes.

Limiting all sinks to instead only accept Measurement[A] values corrects the derivation problem. In retrospect, it makes sense to only allow Measurement[A] values to be serialized through the sinks.

Naturally, this does not prevent alternate usage, but to use the sinks defined in the io module, a measurement needs to be done to allow the compilation to succeed now, not doing so results in a compiler error (as it should be).

Adjusted the missing implicit message to be more clear and to include
the new instance, for the benefit of the user.
Copy link
Copy Markdown

@stefanvds stefanvds left a comment

Choose a reason for hiding this comment

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

Change looks good. Branch compiles and runs on my machine, and the code review seems more logical with the requirement for Measurement.

@gpampara gpampara merged commit 033024f into ciren:master Apr 23, 2018
@gpampara gpampara deleted the io-updates branch April 23, 2018 06:42
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