Skip to content

Commit b7ff7fa

Browse files
committed
fix simu issues
1 parent 4e6b1c2 commit b7ff7fa

File tree

6 files changed

+9
-5
lines changed

6 files changed

+9
-5
lines changed

app.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ func (a App) StartSimulation(source string) error {
394394
if err != nil {
395395
return err
396396
}
397-
a.SimulationManager().ScriptRun(sim.NewScript(source, string(content)))
397+
simman := a.SimulationManager()
398+
simman.ScriptRun(sim.NewScript(source, string(content)))
399+
simman.FunctionRun("main", nil)
398400
return nil
399401
}
400402

frontend/src/components/DocumentEntry.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function RouteForType(type: string): string {
4040
return "/project/modules";
4141
case "solution":
4242
return "/project/solutions";
43-
case "scenario":
43+
case "simulation":
4444
return "/project/simulation";
4545
default:
4646
return "/project";

frontend/src/stores/LogsStore.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export const useLogsStore = create<LogsState & LogsActions>((set, get) => ({
8888
const { pushEvent, pushSimEvent, pushSolutionEvent } = get();
8989
set({ events: [], solutionEvents: [], simEvents: [] });
9090
EventsOn("log", (data) => {
91+
console.log("log-event", data)
9192
const event = JSON.parse(data);
9293
pushEvent(event);
9394
pushSimEvent(event);

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/apigear-io/studio
33
go 1.24.1
44

55
require (
6-
github.com/apigear-io/cli v0.46.0
6+
github.com/apigear-io/cli v0.46.2
77
github.com/creativeprojects/go-selfupdate v1.5.0
88
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
99
github.com/wailsapp/wails/v2 v2.10.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ github.com/antithesishq/antithesis-sdk-go v0.4.3-default-no-op h1:+OSa/t11TFhqfr
1717
github.com/antithesishq/antithesis-sdk-go v0.4.3-default-no-op/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E=
1818
github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ=
1919
github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw=
20-
github.com/apigear-io/cli v0.46.0 h1:aEsxIv5XZR5+N6X9lC/5KR0Ia3GeOnmwCjOSc9KAwhU=
21-
github.com/apigear-io/cli v0.46.0/go.mod h1:gi+Uw3Dkzjxlpix6x9pkKvxe2XPEyHtffZDGIWobqX8=
20+
github.com/apigear-io/cli v0.46.2 h1:pSwpUdxTPHgzFyWHv7+W811PH0mo785ExB9n3X7QtJA=
21+
github.com/apigear-io/cli v0.46.2/go.mod h1:gi+Uw3Dkzjxlpix6x9pkKvxe2XPEyHtffZDGIWobqX8=
2222
github.com/apigear-io/objectlink-core-go v0.5.2 h1:g1+YYmjA1Wppke5fm3xk2yd75HtRJeAOcCTgbvA6hLM=
2323
github.com/apigear-io/objectlink-core-go v0.5.2/go.mod h1:DG+oHkpZzqaXIB82RdLn7qY/8zrbRbQwgOPlTHLfTyY=
2424
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=

services.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func RegisterSimulationService(app *App) error {
125125
func RegisterLogService(ctx context.Context) error {
126126
log.Info().Msg("start log service")
127127
zlog.OnReportBytes(func(s string) {
128+
fmt.Printf("log msg: %s", s)
128129
runtime.EventsEmit(ctx, "log", s)
129130
})
130131
return nil

0 commit comments

Comments
 (0)