Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

feat: scope #1084

Merged
merged 8 commits into from
Jun 15, 2023
Merged

feat: scope #1084

merged 8 commits into from
Jun 15, 2023

Conversation

tjjfvi
Copy link
Contributor

@tjjfvi tjjfvi commented Jun 15, 2023

Resolves #978

@tjjfvi tjjfvi marked this pull request as ready for review June 15, 2023 16:39
@tjjfvi tjjfvi requested a review from harrysolovay as a code owner June 15, 2023 16:39
@harrysolovay
Copy link
Contributor

Should we provide access to scope within the Rune system? (to enable the fluent API and patterns to decide how/when to cache-invalidate)

import { $accountInfo, polkadotDev } from "@capi/polkadot-dev"
import { $, createDevUsers, Scope } from "capi"

const { alexa } = await createDevUsers()

const scope = new Scope()

const accountInfo = polkadotDev.System.Account.value(alexa.publicKey)

const a = await accountInfo.run(scope)
await delay(30000)
const b = await accountInfo.run(scope) // could be different now
await delay(30000)
const c = await accountInfo.run(scope) // could be different yet again

How might one specify whether to rerun all occurrences, vs. idempotent per run, vs. per scope?

@tjjfvi
Copy link
Contributor Author

tjjfvi commented Jun 15, 2023

For now, these kinds of questions of out of scope (pun intended) until the rest of the caching/memoization system is more settled.

Readme.md Outdated Show resolved Hide resolved
harrysolovay
harrysolovay previously approved these changes Jun 15, 2023
Readme.md Outdated Show resolved Hide resolved
harrysolovay
harrysolovay previously approved these changes Jun 15, 2023
@tjjfvi tjjfvi added this pull request to the merge queue Jun 15, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 15, 2023
@harrysolovay harrysolovay enabled auto-merge June 15, 2023 17:57
Copy link
Contributor

@kratico kratico left a comment

Choose a reason for hiding this comment

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

LGTM

@harrysolovay harrysolovay added this pull request to the merge queue Jun 15, 2023
Merged via the queue into main with commit bc688f1 Jun 15, 2023
@harrysolovay harrysolovay deleted the scope branch June 15, 2023 18:14
tjjfvi added a commit that referenced this pull request Jun 21, 2023
@tjjfvi tjjfvi mentioned this pull request Jun 21, 2023
tjjfvi added a commit that referenced this pull request Jun 22, 2023
@tjjfvi tjjfvi mentioned this pull request Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rune cross-execution deduplication
3 participants