fullstack-lang / gongdoc

A gong stack for editing UML diagrams of gong code
MIT License
1 stars 0 forks source link

Allow for specific gong stage per diagram package #157

Closed thomaspeugeot closed 1 year ago

thomaspeugeot commented 1 year ago

Currently, the code uses GetDefaultStage() API to access gong stage.

It will be a problem when 2 gongdoc stacks deal with different gong models.

Steps:

thomaspeugeot commented 1 year ago

test

localhost:8080/api/github.com/fullstack-lang/gongdoc/go/v1/classdiagrams?GONG__StackPath='github.com/fullstack-lang/gongdoc/go/tests/geometry/go/models'

shows that stacks are correctly initialized

http://localhost:8080/api/github.com/fullstack-lang/gong/go/v1/gongstructs?GONG__StackPath=github.com/fullstack-lang/gongdoc/go/tests/geometry/go/models

thomaspeugeot commented 1 year ago

Now, one have to path the GONG_StackPath to tree component and then to the classdiagram component

thomaspeugeot commented 1 year ago

problem, the pkgEltDocument has an init BEFORE the init of the AppComponent. Therefore, when

<lib-pkgelt-docs [GONG__StackPath]="soloStack"></lib-pkgelt-docs>

soloStack is not set

thomaspeugeot commented 1 year ago

Ok, now the classdiagram component is initialized but difficult to know why "lazy" ?

The tree does not display correctly. investigation.

thomaspeugeot commented 1 year ago

Ok we know the problem, the front repo is loaded 3 times. 2 times with the correct GONG_StackPath and 1 time with an incorrect GONG__StackPath (because the classdiagram component is initialized for an unkown reason).

the problem is that the front repo is a singloton, therefore, a pull will overwrite the singloton the a pull that was done with a former path.

Steps:

thomaspeugeot commented 1 year ago

Progress. Now, the front repo is correct. Problem, there are only four nodes.

In the back, we investiguate. OK, now forcing stage parameter on all generated API

thomaspeugeot commented 1 year ago

Still a problem. A node does not exist in the back end. This an updateNode and stack path is empty. This must be a problem in the front.

Tree is OK. Still problems with Classdiagram