Repository navigation
feat(diagram): include other diagrams with include "<path>" - #211
Merged
Merged
Conversation
include "archsight://Kind/name" splices the architecture/diagram of a resource, include "file://path.asd" an .asd file of the resources directory (never outside it), at the position of the directive: top level or inside any container. Includes nest (depth and count limits, cycles are errors). Dataflows and settings of a diagram included inside a container are ignored with a warning (server log, archsight lint). Render caches and ETags cover the included sources. Standalone archsight diagram supports file:// with --resources. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…iagram A prefix goes in front of every id the included diagram defines (nodes and dataflows) and the references to them inside it, so the same diagram can be included more than once. Nodes without a label keep showing their own id. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
include "..." { namespace "cs" } puts "cs." in front of the ids the included
diagram defines (cs.web), instead of a free-form string prefix. Namespaces nest
(o.in.x).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
include "<path>"directive for.asddiagrams, so shared parts are written once:archsight://<Kind>/<name>→ thearchitecture/diagramof that resourcefile://<path>→ an.asdfile, relative to the resources dir (never outside it; no absolute paths, dotfiles or symlinks out)columns); the included content appears at that position. Edges are resolved by id after the graph is built, so links work across the parts.dataflowortheme/legend/ranksin an include inside a container is ignored with a warning (server log,archsight lintwarnings); kept at the top level.depictsfollows includes.archsight diagram:file://only, rooted at the new--resources DIR(default: input's directory).Known limits: errors from inside an included diagram show that file's line numbers; Typst analysis output has no database, so includes there show the diagram error box.
Test plan
bundle exec rake(tests, steep, rubocop)archsight diagramwith afile://includearchsight serve, edit the included resource and reload🤖 Generated with Claude Code