feat(core): implement plugin fiber state machine and reactive dependency reconciler

This commit is contained in:
ryan
2026-08-28 13:35:43 +08:00
parent 33294b3fae
commit 3570ccd5c3
7 changed files with 404 additions and 18 deletions
+3 -3
View File
@@ -238,14 +238,14 @@ func TestContextHierarchyAndFork(t *testing.T) {
// Child provides LogService
childLog := &logServiceImpl{}
core.Provide[LogService](child, childLog)
core.ProvideScoped[LogService](child, childLog)
// Child has LogService, parent does not
assert.True(t, core.Has[LogService](child))
assert.False(t, core.Has[LogService](parent))
// Child overrides SampleService
core.Provide[SampleService](child, &sampleServiceImpl{prefix: "Child:"})
// Child overrides SampleService locally
core.ProvideScoped[SampleService](child, &sampleServiceImpl{prefix: "Child:"})
childSvc, err := core.Inject[SampleService](child)
require.NoError(t, err)
assert.Equal(t, "Child: Ryan", childSvc.Greet("Ryan"))