Open e-wagner-OH opened 5 days ago
@e-wagner-OH to be clear, the repo that D2 is pulling from has submodules? And the issue is that those are not being detected?
If so, the fix should be simple, just want to understand.
@alixander - yes, exactly. Submodules not being detected within Studio. Also, when I push to a test branch from the super diagram in Studio, the submodule diagrams do not get pushed.
@e-wagner-OH I see, thanks for the information. I have a few followup questions:
@alixander What is in these submodules? D2 diagrams Are there any references being made from the main repo to submodules? E.g. icons, imports Yes, imports I didn't quite understand your last sentence. If the "super diagram" is the repository that contains those submodules, why would the submodules also get a git push? The super diagram would contain its own index.d2 file and the 13 git submodules of other diagrams. I wanted to use composition (layers and scenarios) to walk different groups through the work being considered.
I created a test with 2 git repos and I made them public. d2-test-a and d2-test-b.
In test-a, I have a ...@d2-test-b/index
line in the index.d2 and I have added the d2-test-b as a git submodule. Locally developing d2, the import command works fine and I get what I expect from the import.
When I connect to studio with the same branch, the git submodule is not available/ or pulled into terrastruct. Error in studio.
The super diagram would contain its own index.d2 file and the 13 git submodules of other diagrams.
Let's say I open the super diagram in D2 Studio and the contents of the submodules also appear. If I update the content of the submodule, is it expected those changes also be pushed to the submodule repository?
To be honest I haven't considered this use case. It's an interesting one that I'll think about more whether and how to support. Currently have a backlog of todo's and will queue this and get back to you in a few sprints.
@alixander - Thanks
I would assume that the git submodules would not be updatable via studio. Changes to them could be made via the composition configurations at the layer or scenario level.
Trying to create a super diagram that pulls in 13 other d2 diagrams. Have a github action that adds git submodules to a branch and pushes that branch. Try to open in d2 studio, and the git submodules and their dir are not showing up.
The git branch looks normal, I think it is just a limitation of studio at this point? How can I add other diagrams (which are in their own git repos) to another diagram that may have it's own dependencies on the lower level diagram?