createLazy: wrap nested service groups and accept partial (subset) schemas
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- api
Rechercherichtung
Start with AsyncDataService.createLazy and synthesizeService in @adobe/data-rpc, which already projects nested services recursively. The issue says an implementation exists on local branch knye/create-lazy-nested (commit c3aa3f1c) but is unpushed, so confirm with maintainers before duplicating it. Done means nested object members are wrapped at any depth, partial: true checks subset schemas, and vitest --project node passes.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
AsyncDataService.createLazy only wraps top-level observe / function members. A nested organizational group (an object member with its own properties, e.g. an ECS database's actions / computed) is rejected at compile time and memberKind throws on it at runtime, even though @adobe/data-rpc's synthesizeService already projects nested services recursively from the same kind of schema.
It also requires the schema to describe the loaded service completely. There is no way to lazily expose a curated subset of a larger service without hand-writing a copy of it.
Firefly Studio needs both: each App exposes its main service to runtime agents as a schema-described createLazy instance, so the schema is introspectable immediately while the app's real service (and its lazily-loaded chunk) loads only on an agent's first use. Those main services are nested (ECS actions / computed), and an app exposes less than its full main service.
Proposed change
- Nested groups. Wrap
type: 'object'members recursively at any depth. Resolve every depth from the one root load in a single step, so calls queued before load on members at different depths still run in the order they were made. partial?: boolean(defaultfalse). Whentrue, the gate checks that the loaded service satisfies the schema (every described member exists with an assignable type; a wrong type or unknown member is a compile error). The instance carries only the described members and is typed as the schema (plusserviceName/schema) rather than as the whole service. Withoutpartial, the existing complete-schema gate and the instance type are unchanged, so existing callers' declaration emit is unaffected.
Status
Implemented with tests on branch knye/create-lazy-nested (local, not yet pushed): commit c3aa3f1c, bumping to 0.10.32. tsc -b clean; vitest --project node 148 files / 1808 tests pass. Verified in Firefly Platform via a local store swap: all existing createLazy consumers pass.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 12
- Forks
- 8
- Ø Merge
- 11 Std. 2 Min.
- Gemergte PRs (30 T.)
- 23
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus adobe/data
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
ecs: let kernels issue commands through helpers (component lists, symbol-keyed values, void helpers)Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
Maintainer antworten meist innerhalb von 1 Tag
-
ecs: an architecture standard (layout, naming, exports, checker, diagrams) for the new ECS samples, and how to distribute itEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 8/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 22/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
riverqueue/river#1576 ·
Maintainer antworten meist innerhalb von 1 Tag
-
[bug] A prompt queued during a run is assessed without its textEvtl. vergeben @jwiegley hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
DevMortimer/pi-warden#211 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 84/100
mattermost/compass-design#191 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Add unit tests for the organization admin role checkEvtl. vergeben @SaffuSafwan hat das heute übernommen. Offenarea/core good first issue help wanted
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
elmohq/elmo#1095 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
HorusGoul/trizum#559 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag