Skip to content

Always reset output before run #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion web/src/lib/go/wrapper/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export interface ImportObject {
*
* @deprecated
* **WARNING:** Since Go 1.21.x this attribute was replaced by `gojs` namespace.
* @
*/
go: { [k: string]: ImportFunction }

Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/go/wrapper/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const getImportNamespace = (go: GoInstance) => (
* @param overlay Overlay object
* @param globalValue global namespace
*/
export const wrapGlobal = (overlay: object = {}, globalValue: object = window || globalThis || DedicatedWorkerGlobalScope) => {
export const wrapGlobal = (overlay: object = {}, globalValue: object = window || globalThis) => {
const mockObject = {
...overlay,
Go: GoWrapper,
Expand Down
2 changes: 1 addition & 1 deletion web/src/store/dispatchers/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const hasProgramTimeoutError = (events: EvalEvent[]) => {

const dispatchEvalEvents = (dispatch: DispatchFn, events: EvalEvent[]) => {
// TODO: support cancellation
dispatch(newProgramStartAction());

if (!events?.length) {
dispatch(newProgramFinishAction());
Expand Down Expand Up @@ -92,7 +93,6 @@ const dispatchEvalEvents = (dispatch: DispatchFn, events: EvalEvent[]) => {
// approach used in official playground, so should be enough for us.
let programEndTime = lastElem(eventsWithDelay)?.Delay ?? 0;

dispatch(newProgramStartAction());
eventsWithDelay.forEach(event => {
setTimeoutNanos(() => {
dispatch(newProgramWriteAction(event))
Expand Down