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

feat: expose the interpreter via the various APIs #1241

Merged
merged 6 commits into from
Apr 23, 2024
Merged

Commits on Apr 20, 2024

  1. feat(primer): add app-level handlers for eval via interpretation

    This commit only adds these handlers at the `Primer.App` module level.
    Hooking the interpreter up to the API and HTTP service will come in
    subsequent commits.
    
    Note that we add two handlers, one for time-bounded requests, and one
    for unbounded requests. We will not expose the unbounded handler via
    the HTTP API, since that would not be safe, but for local Haskell
    programs, it might be useful to run the unbounded interpreter and
    handle exceptions, timeouts, etc. in an application-specific manner,
    which the time-bounded interpreter doesn't really make possible.
    
    The time-bounded handler needs an additional `MonadIO` constraint
    because the variant of the interpreter that it uses handles timeouts
    and other imprecise exceptions that may be thrown by the interpreter.
    This is unlike any other actions in `Primer.App`, but it's unavoidable
    due to our particular lazy implementation of the interpreter. (See the
    comments in the interpreter source for details.)
    
    Signed-off-by: Drew Hess <src@drewhess.com>
    dhess committed Apr 20, 2024
    Configuration menu
    Copy the full SHA
    5ba0690 View commit details
    Browse the repository at this point in the history
  2. chore(primer): add interpreter test to actions tests

    This test change is a separate commit to the parent commit because it
    requires a change to `EditAppM`, namely adding a `MonadIO` instance to
    it. Prior to this change, no action tests required `IO`.
    
    Signed-off-by: Drew Hess <src@drewhess.com>
    dhess committed Apr 20, 2024
    Configuration menu
    Copy the full SHA
    460cb3e View commit details
    Browse the repository at this point in the history
  3. chore(primer-api): expose the interpreter via the API

    Signed-off-by: Drew Hess <src@drewhess.com>
    dhess committed Apr 20, 2024
    Configuration menu
    Copy the full SHA
    2fbc1c1 View commit details
    Browse the repository at this point in the history
  4. feat(primer-service): add bounded interpreter to the HTTP APIs

    Signed-off-by: Drew Hess <src@drewhess.com>
    dhess committed Apr 20, 2024
    Configuration menu
    Copy the full SHA
    45cd3a9 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. chore: add tests for evaluating top-level definitions

    Note that all of these tests that use the interpreter are currently
    expected to fail (or are commented out because they will fail) due to
    #1247
    
    Signed-off-by: Drew Hess <src@drewhess.com>
    dhess committed Apr 22, 2024
    Configuration menu
    Copy the full SHA
    b2031c7 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. chore: bump bounded interp test timeout for Wasm

    The Wasm version of this test needs more time.
    
    Signed-off-by: Drew Hess <src@drewhess.com>
    dhess committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    1510ede View commit details
    Browse the repository at this point in the history