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

fea/api ergonomics #20

Merged
merged 4 commits into from
Oct 14, 2024
Merged

fea/api ergonomics #20

merged 4 commits into from
Oct 14, 2024

Commits on Oct 12, 2024

  1. resolve the typestate scope in a different way

    - context: `end()` methods need to consume self so that the user must
      not use the contextual object after having emitted the end artifact.
      However, this introduces an issue in `scope()` methods, in that we
      need to pass the run object both to the async lambda and to call end,
      which forces the lambda to capture by reference. We cannot move into
      the lambda because we need to consume self in `end()`, so the lambda
      must receive a reference. This leads to needing to use a boxed future,
      because rust syntax doesn't have a way to specify captured lifetimes
      in async anon.
    - since `end()` is the only contentious method, make a new type
      `ScopedTestRun` which has everything except `end` and pass that with
      lifetime 'static into the lambda. This removes the need for the boxed
      future since no shorter refs are captured.
    
    Signed-off-by: mimir-d <[email protected]>
    mimir-d committed Oct 12, 2024
    Configuration menu
    Copy the full SHA
    2db3e47 View commit details
    Browse the repository at this point in the history
  2. refactor scopes for step + measurement series

    - similar to previous commit, this removes the dependency on boxed
      futures; remove the cargo dependency as well, and the feature flag
    
    Signed-off-by: mimir-d <[email protected]>
    mimir-d committed Oct 12, 2024
    Configuration menu
    Copy the full SHA
    53a6e23 View commit details
    Browse the repository at this point in the history
  3. remove the boilerplate needed for tv::Value

    - this commit adds template args such that the users dont need to
      manually covert their values into `tv::Value`
    - applies for measurements, metadata and run start params
    
    Signed-off-by: mimir-d <[email protected]>
    mimir-d committed Oct 12, 2024
    Configuration menu
    Copy the full SHA
    60b9633 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. Merge branch 'dev' into fea/api_ergonomics

    - fix readme to remove boxed-scopes
    
    Signed-off-by: mimir-d <[email protected]>
    mimir-d committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    31e0e8d View commit details
    Browse the repository at this point in the history