#8 Refactor system diagram build to use redo

Open
erlehmann wants to merge 1 commits from erlehmann/reform:redo-system-diagram into master

This PR refactors the system diagram build to use redo.

Advantages:

  • build.sh now builds before waiting for changes
  • Separation of concerns in build scripts
  • Targets can be build separately

Disadvantages:

  • New dependency on redo.
    • This could be remedied by including Avery Pennarun's “do” script.
This PR refactors the system diagram build to use redo. Advantages: * build.sh now builds before waiting for changes * Separation of concerns in build scripts * Targets can be build separately Disadvantages: * New dependency on redo. * This could be remedied by including Avery Pennarun's “do” script.
erlehmann commented 4 months ago
Poster

This is the dependency graph:

; redo-dot |sed 's_'`{pwd}^'/__g' 
digraph redo {
concentrate=true;rankdir=LR;ranksep=2;splines=polyline
node[shape=rectangle]
subgraph dependencies { edge[style=solid,minlen=2]
"system-diagram.pdf" -> "system-diagram.svg"
"system-diagram.pdf" -> "system-diagram.pdf.do"
"system.html" -> "system-diagram.svg"
"system.html" -> "system.md"
"system.html" -> "system.html.do"
"system-diagram.svg" -> "system-diagram.dot"
"system-diagram.svg" -> "system-diagram.svg.do"
"all" -> "system.html"
"all" -> "system-diagram.pdf"
"all" -> "all.do"
}
subgraph dependencies_ne { edge[style=dotted,minlen=1]
}
}
This is the dependency graph: ``` ; redo-dot |sed 's_'`{pwd}^'/__g' digraph redo { concentrate=true;rankdir=LR;ranksep=2;splines=polyline node[shape=rectangle] subgraph dependencies { edge[style=solid,minlen=2] "system-diagram.pdf" -> "system-diagram.svg" "system-diagram.pdf" -> "system-diagram.pdf.do" "system.html" -> "system-diagram.svg" "system.html" -> "system.md" "system.html" -> "system.html.do" "system-diagram.svg" -> "system-diagram.dot" "system-diagram.svg" -> "system-diagram.svg.do" "all" -> "system.html" "all" -> "system-diagram.pdf" "all" -> "all.do" } subgraph dependencies_ne { edge[style=dotted,minlen=1] } } ```
erlehmann commented 4 months ago
Poster

Note that the build is not atomic because all.do deletes the targets. This could be removed if accompanied by one of the following measures:

  1. Removing build outputs from the git repository. This is the solution I would prefer.

  2. Using redo instead of redo-ìfchange in dofiles. This works, but the dependency graph will be wrong.

I think that keeping build output in the repository can and will be a problem.

Note that the build is not atomic because `all.do` deletes the targets. This could be removed if accompanied by one of the following measures: 1. Removing build outputs from the git repository. This is the solution I would prefer. 2. Using `redo` instead of `redo-ìfchange` in dofiles. This works, but the dependency graph will be wrong. I think that keeping build output in the repository can and will be a problem.
erlehmann commented 4 months ago
Poster

I realized that build.sh already builds before waiting for changes. Sorry!

I realized that build.sh already builds before waiting for changes. Sorry!
This pull request can be merged automatically.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
Cancel
Save
There is no content yet.