Skip to content

Commit

Permalink
deploy: 46bf75f
Browse files Browse the repository at this point in the history
  • Loading branch information
Gohla committed Sep 20, 2023
1 parent fb45140 commit 09616a3
Show file tree
Hide file tree
Showing 27 changed files with 63 additions and 59 deletions.
2 changes: 1 addition & 1 deletion 1_programmability/0_setup/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ <h1 id="setup"><a class="header" href="#setup">Setup</a></h1>
<p>Run <code>cargo build</code> to test if the project was set up correctly.
The output should look something like:</p>
<pre><code class="language-shell "> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Finished dev [unoptimized + debuginfo] target(s) in 0.09s
</code></pre>
<details id="admonition-download-source-code" class="admonition example">
<summary class="admonition-title">
Expand Down
2 changes: 1 addition & 1 deletion 1_programmability/1_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ <h2 id="api-implementation"><a class="header" href="#api-implementation">API Imp
<p>Build the project by running <code>cargo build</code>.
The output should look something like:</p>
<pre><code class="language-shell "> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
</code></pre>
<details id="admonition-rust-help" class="admonition info">
<summary class="admonition-title">
Expand Down
4 changes: 2 additions & 2 deletions 1_programmability/2_non_incremental/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ <h2 id="simple-test"><a class="header" href="#simple-test">Simple Test</a></h2>
<p>Run the test by running <code>cargo test</code>.
The output should look something like:</p>
<pre><code class="language-shell "> Compiling pie v0.1.0 (/pie)
Finished test [unoptimized + debuginfo] target(s) in 0.41s
Running unittests src/lib.rs (/pie/target/debug/deps/pie-2022d1785b8ce336)
Finished test [unoptimized + debuginfo] target(s) in 0.33s
Running unittests src/lib.rs (/pie/target/debug/deps/pie-6c9d55a7ef727e00)

running 1 test
test context::non_incremental::test::test_require_task_direct ... ok
Expand Down
6 changes: 3 additions & 3 deletions 2_incrementality/5_context/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ <h3 id="exploring-incrementality"><a class="header" href="#exploring-incremental
You should see the <code>println!</code> in <code>ReadStringFromFile</code> appear in your console as the incremental context correctly determines that this task is new (i.e., has no output) and must be executed.
It should look something like:</p>
<pre><code> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 1.16s
Finished dev [unoptimized + debuginfo] target(s) in 1.05s
Running `/pie/target/debug/examples/incremental`
A) New task: expect `read_task` to execute
Reading from input.txt with Modified stamper
Expand All @@ -661,7 +661,7 @@ <h4 id="reuse"><a class="header" href="#reuse">Reuse</a></h4>
</code></pre>
<p>Running with <code>cargo run --example incremental</code> should produce output like:</p>
<pre><code> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.58s
Finished dev [unoptimized + debuginfo] target(s) in 0.47s
Running `/pie/target/debug/examples/incremental`
A) New task: expect `read_task` to execute
Reading from input.txt with Modified stamper
Expand Down Expand Up @@ -814,7 +814,7 @@ <h4 id="same-file-different-stampers"><a class="header" href="#same-file-differe
<p>Of course, using an <code>Exists</code> stamper for <code>ReadStringFromFile</code> does not make a lot of sense, but this is for demonstration purposes only.</p>
<p>Running <code>cargo run --example incremental</code> now should produce output like:</p>
<pre><code> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.65s
Finished dev [unoptimized + debuginfo] target(s) in 0.51s
Running `/pie/target/debug/examples/incremental`
A) New task: expect `read_task` to execute
Reading from input.txt with Modified stamper
Expand Down
16 changes: 9 additions & 7 deletions custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@
--content-max-width: 1200px;
}

/* Set Diff2Html table padding to 0 */
/* Diff2Html fixes */
/* Reset table padding to 0 */
table.d2h-diff-table td, th {
padding: 0;
}

/* Make Diff2Html use font family and size that is defined by the book */
/* Use font family and size that is defined by the book */
.d2h-diff-table {
font-family: var(--mono-font) !important;
font-size: var(--code-font-size) !important;
}

/* Unset vertical align to fix Diff2Html alignment issues */
/* Unset vertical align, fixing alignment issues */
.d2h-code-line-ctn {
vertical-align: unset !important;
}

/* Unset overflow-x to fix a lot of issues with Diff2Html */
/* Unset highlight.js overflow-x to fix a lot of issues */
.hljs {
overflow-x: unset !important;
}
/* Fix empty placeholder lines being selectable */
.d2h-emptyplaceholder .d2h-code-line-ctn {
user-select: none !important;
}
2 changes: 1 addition & 1 deletion gen/1_programmability/0_setup/cargo.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Finished dev [unoptimized + debuginfo] target(s) in 0.09s
Binary file modified gen/1_programmability/0_setup/source.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion gen/1_programmability/1_api/a_cargo.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Binary file modified gen/1_programmability/1_api/source.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions gen/1_programmability/2_non_incremental/d_cargo.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Compiling pie v0.1.0 (/pie)
Finished test [unoptimized + debuginfo] target(s) in 0.41s
Running unittests src/lib.rs (/pie/target/debug/deps/pie-2022d1785b8ce336)
Finished test [unoptimized + debuginfo] target(s) in 0.33s
Running unittests src/lib.rs (/pie/target/debug/deps/pie-6c9d55a7ef727e00)

running 1 test
test context::non_incremental::test::test_require_task_direct ... ok
Expand Down
Binary file modified gen/1_programmability/2_non_incremental/source.zip
Binary file not shown.
Binary file modified gen/2_incrementality/1_require_file/source.zip
Binary file not shown.
Binary file modified gen/2_incrementality/2_stamp/source.zip
Binary file not shown.
Binary file modified gen/2_incrementality/3_dependency/source.zip
Binary file not shown.
Binary file modified gen/2_incrementality/4_store/source.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion gen/2_incrementality/5b_context_example/d_main.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 1.16s
Finished dev [unoptimized + debuginfo] target(s) in 1.05s
Running `/pie/target/debug/examples/incremental`
A) New task: expect `read_task` to execute
Reading from input.txt with Modified stamper
2 changes: 1 addition & 1 deletion gen/2_incrementality/5b_context_example/e_reuse.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.58s
Finished dev [unoptimized + debuginfo] target(s) in 0.47s
Running `/pie/target/debug/examples/incremental`
A) New task: expect `read_task` to execute
Reading from input.txt with Modified stamper
Expand Down
2 changes: 1 addition & 1 deletion gen/2_incrementality/5b_context_example/l_diff_stamp.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.65s
Finished dev [unoptimized + debuginfo] target(s) in 0.51s
Running `/pie/target/debug/examples/incremental`
A) New task: expect `read_task` to execute
Reading from input.txt with Modified stamper
Expand Down
Binary file modified gen/2_incrementality/5b_context_example/source.zip
Binary file not shown.
Binary file modified gen/3_min_sound/1_session/source.zip
Binary file not shown.
42 changes: 21 additions & 21 deletions gen/3_min_sound/2_tracker/i_writing_example.txt
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.79s
Finished dev [unoptimized + debuginfo] target(s) in 0.66s
Running `/pie/target/debug/examples/incremental`
A) New task: expect `read_task` to execute
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))
← Ok("Hi")

B) Reuse: expect no execution
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))

C) Inconsistent file dependency: expect `read_task` to execute
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))
← Ok("Hello")

D) New task, reuse other: expect only `write_task` to execute
→ WriteStringToFile(WriteStringToFile(ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified)), "/tmp/.tmpTfXwzf/output.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
→ WriteStringToFile(WriteStringToFile(ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified)), "/tmp/.tmpto8R4J/output.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))
← Ok("")

E) Inconsistent file and task dependency: expect both tasks to execute
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))
← Ok("Hello, World!")
→ WriteStringToFile(WriteStringToFile(ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified)), "/tmp/.tmpTfXwzf/output.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
→ WriteStringToFile(WriteStringToFile(ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified)), "/tmp/.tmpto8R4J/output.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))
← Ok("")

F) Early cutoff: expect only `read_task` to execute
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))
← Ok("Hello, World!")
✓ WriteStringToFile(WriteStringToFile(ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified)), "/tmp/.tmpTfXwzf/output.txt", Modified))
✓ WriteStringToFile(WriteStringToFile(ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified)), "/tmp/.tmpto8R4J/output.txt", Modified))

G) Regenerate changed output file: expect only `write_task` to execute
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
→ WriteStringToFile(WriteStringToFile(ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified)), "/tmp/.tmpTfXwzf/output.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))
→ WriteStringToFile(WriteStringToFile(ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified)), "/tmp/.tmpto8R4J/output.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))
← Ok("")

H) Regenerate deleted output file: expect only `write_task` to execute
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
→ WriteStringToFile(WriteStringToFile(ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified)), "/tmp/.tmpTfXwzf/output.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))
→ WriteStringToFile(WriteStringToFile(ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified)), "/tmp/.tmpto8R4J/output.txt", Modified))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input.txt", Modified))
← Ok("")

I) Different tasks: expect `read_task_b_modified` and `read_task_b_exists` to execute
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input_b.txt", Modified))
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input_b.txt", Modified))
← Ok("Test")
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input_b.txt", Exists))
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input_b.txt", Exists))
← Ok("Test")

J) Different stampers: expect only `read_task_b_modified` to execute
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input_b.txt", Modified))
→ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input_b.txt", Modified))
← Ok("Test Test")
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpTfXwzf/input_b.txt", Exists))
✓ ReadStringFromFile(ReadStringFromFile("/tmp/.tmpto8R4J/input_b.txt", Exists))
Binary file modified gen/3_min_sound/2_tracker/source.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ <h1 id="setup"><a class="header" href="#setup">Setup</a></h1>
<p>Run <code>cargo build</code> to test if the project was set up correctly.
The output should look something like:</p>
<pre><code class="language-shell "> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Finished dev [unoptimized + debuginfo] target(s) in 0.09s
</code></pre>
<details id="admonition-download-source-code" class="admonition example">
<summary class="admonition-title">
Expand Down
14 changes: 7 additions & 7 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ <h1 id="setup"><a class="header" href="#setup">Setup</a></h1>
<p>Run <code>cargo build</code> to test if the project was set up correctly.
The output should look something like:</p>
<pre><code class="language-shell "> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Finished dev [unoptimized + debuginfo] target(s) in 0.09s
</code></pre>
<details id="admonition-download-source-code" class="admonition example">
<summary class="admonition-title">
Expand Down Expand Up @@ -276,7 +276,7 @@ <h2 id="api-implementation"><a class="header" href="#api-implementation">API Imp
<p>Build the project by running <code>cargo build</code>.
The output should look something like:</p>
<pre><code class="language-shell "> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
</code></pre>
<details id="admonition-rust-help" class="admonition info">
<summary class="admonition-title">
Expand Down Expand Up @@ -419,8 +419,8 @@ <h2 id="simple-test"><a class="header" href="#simple-test">Simple Test</a></h2>
<p>Run the test by running <code>cargo test</code>.
The output should look something like:</p>
<pre><code class="language-shell "> Compiling pie v0.1.0 (/pie)
Finished test [unoptimized + debuginfo] target(s) in 0.41s
Running unittests src/lib.rs (/pie/target/debug/deps/pie-2022d1785b8ce336)
Finished test [unoptimized + debuginfo] target(s) in 0.33s
Running unittests src/lib.rs (/pie/target/debug/deps/pie-6c9d55a7ef727e00)

running 1 test
test context::non_incremental::test::test_require_task_direct ... ok
Expand Down Expand Up @@ -2883,7 +2883,7 @@ <h3 id="exploring-incrementality"><a class="header" href="#exploring-incremental
You should see the <code>println!</code> in <code>ReadStringFromFile</code> appear in your console as the incremental context correctly determines that this task is new (i.e., has no output) and must be executed.
It should look something like:</p>
<pre><code> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 1.16s
Finished dev [unoptimized + debuginfo] target(s) in 1.05s
Running `/pie/target/debug/examples/incremental`
A) New task: expect `read_task` to execute
Reading from input.txt with Modified stamper
Expand All @@ -2899,7 +2899,7 @@ <h4 id="reuse"><a class="header" href="#reuse">Reuse</a></h4>
</code></pre>
<p>Running with <code>cargo run --example incremental</code> should produce output like:</p>
<pre><code> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.58s
Finished dev [unoptimized + debuginfo] target(s) in 0.47s
Running `/pie/target/debug/examples/incremental`
A) New task: expect `read_task` to execute
Reading from input.txt with Modified stamper
Expand Down Expand Up @@ -3052,7 +3052,7 @@ <h4 id="same-file-different-stampers"><a class="header" href="#same-file-differe
<p>Of course, using an <code>Exists</code> stamper for <code>ReadStringFromFile</code> does not make a lot of sense, but this is for demonstration purposes only.</p>
<p>Running <code>cargo run --example incremental</code> now should produce output like:</p>
<pre><code> Compiling pie v0.1.0 (/pie)
Finished dev [unoptimized + debuginfo] target(s) in 0.65s
Finished dev [unoptimized + debuginfo] target(s) in 0.51s
Running `/pie/target/debug/examples/incremental`
A) New task: expect `read_task` to execute
Reading from input.txt with Modified stamper
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions src/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@
--content-max-width: 1200px;
}

/* Set Diff2Html table padding to 0 */
/* Diff2Html fixes */
/* Reset table padding to 0 */
table.d2h-diff-table td, th {
padding: 0;
}

/* Make Diff2Html use font family and size that is defined by the book */
/* Use font family and size that is defined by the book */
.d2h-diff-table {
font-family: var(--mono-font) !important;
font-size: var(--code-font-size) !important;
}

/* Unset vertical align to fix Diff2Html alignment issues */
/* Unset vertical align, fixing alignment issues */
.d2h-code-line-ctn {
vertical-align: unset !important;
}

/* Unset overflow-x to fix a lot of issues with Diff2Html */
/* Unset highlight.js overflow-x to fix a lot of issues */
.hljs {
overflow-x: unset !important;
}
/* Fix empty placeholder lines being selectable */
.d2h-emptyplaceholder .d2h-code-line-ctn {
user-select: none !important;
}

0 comments on commit 09616a3

Please sign in to comment.