Skip to content

Commit

Permalink
sublibrary diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
kostmo committed Jan 7, 2024
1 parent a388af6 commit 5f322fd
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 2 deletions.
79 changes: 79 additions & 0 deletions docs/image/sublibrary-graph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions scripts/render-sublibrary-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash -ex

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR/..

# First, install cabal-plan:
#
# cabal install cabal-plan


# If the swarm.cabal file has changed, you may need to remove
# the 'plan.json' file from the cache and regenerate.
#
# Note that "rm -f dist-newstyle/cache/plan.json" is insufficient;
# we need remove the whole cache:
rm -r dist-newstyle/cache
cabal build

cabal-plan --hide-global --hide-builtin dot --tred --root swarm | twopi -Tsvg -o docs/image/sublibrary-graph.svg
4 changes: 2 additions & 2 deletions swarm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ description: Swarm is a 2D programming and resource gathering
* swarm TUI
* swarm app

To maintain this separation, inner layers should avoid introducing
dependencies on layers above them.
<<docs/image/sublibrary-graph.svg>>

license: BSD-3-Clause
license-file: LICENSE
Expand All @@ -39,6 +38,7 @@ extra-source-files: CHANGELOG.md
editors/vscode/syntaxes/*.json
editors/vim/*.vim
editors/vim/*.lua
extra-doc-files: docs/image/sublibrary-graph.svg
data-dir: data/
data-files: *.yaml, worlds/*.world, scenarios/**/*.yaml, scenarios/**/*.txt, scenarios/**/*.sw, *.txt, test/language-snippets/**/*.sw

Expand Down

0 comments on commit 5f322fd

Please sign in to comment.