|
1 | 1 | import { compileAndRun as compileAndRunCCode } from '@sourceacademy/c-slang/ctowasm/dist/index'; |
2 | 2 | import { tokenizer } from 'acorn'; |
| 3 | +import { IConduit } from 'conductor/dist/conduit'; |
3 | 4 | import { Context, interrupt, Result, resume, runFilesInContext } from 'js-slang'; |
4 | 5 | import { ACORN_PARSE_OPTIONS, TRY_AGAIN } from 'js-slang/dist/constants'; |
5 | 6 | import { InterruptedError } from 'js-slang/dist/errors/errors'; |
6 | 7 | import { manualToggleDebugger } from 'js-slang/dist/stdlib/inspector'; |
7 | 8 | import { Chapter, ErrorSeverity, ErrorType, SourceError, Variant } from 'js-slang/dist/types'; |
8 | 9 | import { eventChannel, SagaIterator } from 'redux-saga'; |
9 | 10 | import { call, cancel, cancelled, fork, put, race, select, take } from 'redux-saga/effects'; |
10 | | -import { IConduit } from 'sa-conductor/dist/conduit'; |
11 | 11 | import * as Sourceror from 'sourceror'; |
12 | | -import InterpreterActions from 'src/commons/application/actions/InterpreterActions'; |
13 | | -import { selectFeatureSaga } from 'src/commons/featureFlags/selectFeatureSaga'; |
14 | | -import { makeCCompilerConfig, specialCReturnObject } from 'src/commons/utils/CToWasmHelper'; |
15 | | -import { javaRun } from 'src/commons/utils/JavaHelper'; |
16 | | -import { BrowserHostPlugin } from 'src/features/conductor/BrowserHostPlugin'; |
17 | | -import { createConductor } from 'src/features/conductor/createConductor'; |
18 | | -import { flagConductorEnable } from 'src/features/conductor/flagConductorEnable'; |
19 | | -import { flagConductorEvaluatorUrl } from 'src/features/conductor/flagConductorEvaluatorUrl'; |
20 | | -import StoriesActions from 'src/features/stories/StoriesActions'; |
21 | 12 |
|
| 13 | +import InterpreterActions from '../../../../commons/application/actions/InterpreterActions'; |
| 14 | +import { selectFeatureSaga } from '../../../../commons/featureFlags/selectFeatureSaga'; |
| 15 | +import { makeCCompilerConfig, specialCReturnObject } from '../../../../commons/utils/CToWasmHelper'; |
| 16 | +import { javaRun } from '../../../../commons/utils/JavaHelper'; |
22 | 17 | import { EventType } from '../../../../features/achievement/AchievementTypes'; |
| 18 | +import { BrowserHostPlugin } from '../../../../features/conductor/BrowserHostPlugin'; |
| 19 | +import { createConductor } from '../../../../features/conductor/createConductor'; |
| 20 | +import { flagConductorEnable } from '../../../../features/conductor/flagConductorEnable'; |
| 21 | +import { flagConductorEvaluatorUrl } from '../../../../features/conductor/flagConductorEvaluatorUrl'; |
| 22 | +import StoriesActions from '../../../../features/stories/StoriesActions'; |
23 | 23 | import { isSchemeLanguage, OverallState } from '../../../application/ApplicationTypes'; |
24 | 24 | import { SideContentType } from '../../../sideContent/SideContentTypes'; |
25 | 25 | import { actions } from '../../../utils/ActionsHelper'; |
@@ -520,7 +520,8 @@ export function* evalCodeConductorSaga( |
520 | 520 | const { hostPlugin, conduit }: { hostPlugin: BrowserHostPlugin; conduit: IConduit } = yield call( |
521 | 521 | createConductor, |
522 | 522 | url, |
523 | | - async (fileName: string) => files[fileName] |
| 523 | + async (fileName: string) => files[fileName], |
| 524 | + (pluginName: string) => {} // TODO: implement dynamic plugin loading |
524 | 525 | ); |
525 | 526 | const stdoutTask = yield fork(handleStdout, hostPlugin, workspaceLocation); |
526 | 527 | yield call([hostPlugin, 'startEvaluator'], entrypointFilePath); |
|
0 commit comments