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

Improve Support for Dataflow Errors to Work with the IDE #1409

Closed
11 tasks done
iamrecursion opened this issue Jan 18, 2021 · 1 comment · Fixed by #1433
Closed
11 tasks done

Improve Support for Dataflow Errors to Work with the IDE #1409

iamrecursion opened this issue Jan 18, 2021 · 1 comment · Fixed by #1433
Assignees
Labels
--breaking Important: a change that will break a public API or user-facing behaviour p-high Should be completed in the next sprint

Comments

@iamrecursion
Copy link
Contributor

iamrecursion commented Jan 18, 2021

Summary

In order to allow APIs to be better designed around broken value semantics, we need to make some deep changes to the interpreter to support these in a more effective way. At the same time, we need to add a way of propagating panic information through nodes while continuing to execute in the IDE.

Value

Errors will be handled in a fashion that is amenable to both dataflow-oriented and normal programming.

Specification

  • Add support for traces to broken values. This trace should contain the trace of where the value has been created, with each element being a trace.
  • Increase the number of type checks to handle broken values properly in more places. This will slow the compiler down but must include:
    • Atom construction, which should produce a broken value.
    • Method resolution, which should be identity on a broken value.
    • Polyglot arguments evaluation, where the polyglot function should never be called.
    • Function calls should leave things alone except for if the function itself is an error.
  • Extend the builtins DSL to handle broken values by performing typechecks in code. These should be profiled. Will need to infer to avoid these typechecks when an argument is a runtime error.
  • Properly create broken values in more places (e.g. division by zero).
  • Add stdlib tests for these cases.
  • Create a Sentry value type that contains the panic and the stack trace. This should be an Exception.
  • Add typechecks to the same places as for broken values that look for the sentry value and re-throw the sentry from the new location.

Acceptance Criteria & Test Cases

  • We handle all of this properly.
@iamrecursion iamrecursion added Type: Enhancement --breaking Important: a change that will break a public API or user-facing behaviour p-high Should be completed in the next sprint labels Jan 18, 2021
@iamrecursion iamrecursion self-assigned this Jan 18, 2021
@wdanilo
Copy link
Member

wdanilo commented Jan 18, 2021

I would add benchmarking as criteria with comparison to the previous version n set of benchmarks - these benchmarks (comparisons) should be part of the PR + demo day.

@iamrecursion iamrecursion modified the milestones: Sprint 2021-01-04, Sprint 2021-01-18 Jan 19, 2021
@iamrecursion iamrecursion changed the title Improve Support for Datalow Errors to Work with the IDE Improve Support for Dataflow Errors to Work with the IDE Jan 19, 2021
@iamrecursion iamrecursion mentioned this issue Jan 27, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--breaking Important: a change that will break a public API or user-facing behaviour p-high Should be completed in the next sprint
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants