link dependencies

This commit is contained in:
Vyacheslav Matyukhin 2022-09-12 13:42:39 +04:00
parent 757d458ecf
commit 97ff56b46a
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C
2 changed files with 7 additions and 3 deletions

View File

@ -13,7 +13,7 @@ let dispatch = (
// () => ReducerInterface_GenericDistribution.dispatch(call, environment), // () => ReducerInterface_GenericDistribution.dispatch(call, environment),
() => ReducerInterface_Date.dispatch(call, environment), () => ReducerInterface_Date.dispatch(call, environment),
() => ReducerInterface_Duration.dispatch(call, environment), () => ReducerInterface_Duration.dispatch(call, environment),
() => ReducerInterface_Number.dispatch(call, environment), // () => ReducerInterface_Number.dispatch(call, environment),
// () => FunctionRegistry_Library.dispatch(call, environment, reducer), // () => FunctionRegistry_Library.dispatch(call, environment, reducer),
])->E.O2.defaultFn(() => chain(call, environment, reducer)) ])->E.O2.defaultFn(() => chain(call, environment, reducer))
} }

View File

@ -187,8 +187,12 @@ let linkDependencies = (project: t, sourceId: string): ProjectItem.T.continuatio
let doLinkAndRun = (project: t, sourceId: string): unit => { let doLinkAndRun = (project: t, sourceId: string): unit => {
let context = Reducer_Context.createContext(project->getStdLib, project->getEnvironment) let context = Reducer_Context.createContext(project->getStdLib, project->getEnvironment)
// FIXME: fill context with dependencies // FIXME: fill context with dependencies
// let continuation = linkDependencies(project, sourceId) let continuation = linkDependencies(project, sourceId)
let newItem = project->getItem(sourceId)->ProjectItem.run(context) let contextWithContinuation = {
...context,
bindings: continuation->Reducer_Bindings.extend,
}
let newItem = project->getItem(sourceId)->ProjectItem.run(contextWithContinuation)
// Js.log("after run " ++ newItem.continuation->Reducer_Bindings.toString) // Js.log("after run " ++ newItem.continuation->Reducer_Bindings.toString)
project->setItem(sourceId, newItem) project->setItem(sourceId, newItem)
} }