diff --git a/app/client/src/sagas/EvalWorkerActionSagas.ts b/app/client/src/sagas/EvalWorkerActionSagas.ts index 4df4432cbf9..0fd6f604d4a 100644 --- a/app/client/src/sagas/EvalWorkerActionSagas.ts +++ b/app/client/src/sagas/EvalWorkerActionSagas.ts @@ -19,7 +19,6 @@ import { import { handleStoreOperations } from "./ActionExecution/StoreActionSaga"; import type { EvalTreeResponseData } from "workers/Evaluation/types"; import isEmpty from "lodash/isEmpty"; -import type { UnEvalTree } from "entities/DataTree/dataTreeTypes"; import { sortJSExecutionDataByCollectionId } from "workers/Evaluation/JSObject/utils"; import type { LintTreeSagaRequestData } from "plugins/Linting/types"; import { evalErrorHandler } from "./EvalErrorHandler"; @@ -27,7 +26,6 @@ import { getUnevaluatedDataTree } from "selectors/dataTreeSelectors"; export interface UpdateDataTreeMessageData { workerResponse: EvalTreeResponseData; - unevalTree: UnEvalTree; } export function* handleEvalWorkerRequestSaga(listenerChannel: Channel) { @@ -141,12 +139,12 @@ export function* handleEvalWorkerMessage(message: TMessage) { break; } case MAIN_THREAD_ACTION.UPDATE_DATATREE: { - const { unevalTree, workerResponse } = data as UpdateDataTreeMessageData; + const { workerResponse } = data as UpdateDataTreeMessageData; const unEvalAndConfigTree: ReturnType = yield select(getUnevaluatedDataTree); yield call(updateDataTreeHandler, { evalTreeResponse: workerResponse as EvalTreeResponseData, - unevalTree, + unevalTree: unEvalAndConfigTree.unEvalTree || {}, requiresLogging: false, configTree: unEvalAndConfigTree.configTree, }); diff --git a/app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts b/app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts index cee6048f50e..b94e8b93573 100644 --- a/app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts +++ b/app/client/src/workers/Evaluation/evalTreeWithChanges.test.ts @@ -190,7 +190,6 @@ describe("evaluateAndGenerateResponse", () => { expect(parsedUpdates).toEqual([]); expect(webworkerResponse).toEqual({ - unevalTree: {}, workerResponse: { dependencies: {}, errors: [], @@ -224,28 +223,6 @@ describe("evaluateAndGenerateResponse", () => { expect(parsedUpdates).toEqual([]); }); - test("should send the new unevalTree in the web worker response", () => { - const updatedLabelUnevalTree = produce(unEvalTree, (draft: any) => { - if (draft.Text1?.text) { - draft.Text1.text = UPDATED_LABEL; - } - }); - expect(evaluator.getOldUnevalTree()).toEqual(unEvalTree); - const updateTreeResponse = evaluator.setupUpdateTree( - updatedLabelUnevalTree, - configTree, - ); - // the new unevalTree gets set in setupUpdateTree - expect(evaluator.getOldUnevalTree()).toEqual(updatedLabelUnevalTree); - - const { unevalTree } = evalTreeWithChanges.evaluateAndGenerateResponse( - evaluator, - updateTreeResponse, - [], - [], - ); - expect(unevalTree).toEqual(updatedLabelUnevalTree); - }); describe("updates", () => { test("should generate updates based on the unEvalUpdates", () => { diff --git a/app/client/src/workers/Evaluation/evalTreeWithChanges.ts b/app/client/src/workers/Evaluation/evalTreeWithChanges.ts index d539eedba00..880f6f7c163 100644 --- a/app/client/src/workers/Evaluation/evalTreeWithChanges.ts +++ b/app/client/src/workers/Evaluation/evalTreeWithChanges.ts @@ -106,7 +106,6 @@ export const evaluateAndGenerateResponse = ( defaultResponse.evalMetaUpdates = [...(metaUpdates || [])]; return { workerResponse: defaultResponse, - unevalTree: {}, }; } @@ -134,7 +133,6 @@ export const evaluateAndGenerateResponse = ( ); defaultResponse.staleMetaIds = updateResponse.staleMetaIds; - const unevalTree = dataTreeEvaluator.getOldUnevalTree(); // when additional paths are required to be added as updates, we extract the updates from the data tree using these paths. const additionalUpdates = getNewDataTreeUpdates( @@ -159,7 +157,6 @@ export const evaluateAndGenerateResponse = ( return { workerResponse: defaultResponse, - unevalTree, }; };