aboutsummaryrefslogtreecommitdiffstatshomepage
AgeCommit message (Collapse)Author
2023-05-09Merge branch 'ratfactor:main' into testingChris Boesch
2023-05-08Cleaning up zig build outputDave Gauer
* Only show actual Zig compiler errors, not build internals to confused and dismay. * Remove advanced usage instructions not needed in normal operation.
2023-05-07Merge branch 'ratfactor:main' into testingChris Boesch
2023-05-07Merge pull request #292 from kimshrier/exercise_099_typoChris Boesch
Add missing word "a"
2023-05-07Merge pull request #291 from kimshrier/exercise_098_typoChris Boesch
Improve wording in some comments
2023-05-07Merge pull request #290 from kimshrier/exercise_096_fix_exampleChris Boesch
Fix reference to slice_ptr in example code
2023-05-07Merge pull request #289 from kimshrier/exercise_092_typoChris Boesch
Remove repeated word "with"
2023-05-07Merge pull request #288 from kimshrier/exercise_076_typoChris Boesch
Add missing word "of"
2023-05-07Merge pull request #287 from kimshrier/exercise_072_typoChris Boesch
Add missing word "to"
2023-05-07Merge pull request #286 from kimshrier/exercise_001_typoChris Boesch
fix typo well -> will
2023-05-07Add missing word "a"Kim SHrier
2023-05-07Improve wording in some commentsKim SHrier
2023-05-07Fix reference to slice_ptr in example codeKim SHrier
2023-05-07Remove repeated word "with"Kim SHrier
2023-05-07Add missing word "of"Kim SHrier
2023-05-07add missing word "to"Kim SHrier
2023-05-06fix typo well -> willKim SHrier
2023-05-06Merge branch 'ratfactor:main' into testingChris Boesch
2023-05-06Merge pull request #285 from chrboesch/improve_instructionChris Boesch
Improve instructions.
2023-05-06Merge branch 'main' into improve_instructionChris Boesch
2023-05-06Improve instructions.Chris Boesch
2023-05-06Merge branch 'ratfactor:main' into testingChris Boesch
2023-05-06Merge pull request #284 from perillo/improve-exercise-type-moreChris Boesch
Improve Exercise type more
2023-05-06build: improve Exercise.addExecutableManlio Perillo
Replace the file_path variable with path.
2023-05-06build: use multiline string literals when necessaryManlio Perillo
Update the output and hint fields in the `exercises` slice to use a multiline string literal when the string have multiple lines or use the `"` character. This will greatly improve readability. Additionally, remove the trailing whitespace on each line and check it in the validate_exercises function. Update the output comparison logic in ZiglingStep, since the current code assumes that the string has only one line. Update test/tests.zig to use the new `CheckNamedStep` in test case 1, since RunStep.StdIo.Check is no longer able to correctly check the output. Fixes #283
2023-05-06Merge branch 'ratfactor:main' into testingChris Boesch
2023-05-06build: remove assertion in `Exercise.key`Manlio Perillo
Use `orelse unreachable` instead, in order to simplify the code. Fix doc-comments in the Exercise type.
2023-05-06build: make `Exercise.hint` optionalManlio Perillo
Use an optional type, instead of an empty string, since it is more idiomatic.
2023-05-05Ex 101: Magic bags better than buckets for metaphorsDave Gauer
2023-05-05Merge pull request #281 from perillo/add-healed-path-optionChris Boesch
Add the -Dhealed-path option
2023-05-05build: add the healed-path optionManlio Perillo
This is necessary in the unit tests, to ensure each test case use a different exercises directory. Update test/tests.zig to use the new healed-path option, ensuring that each temp directory is removed. In test case 3, 4 and 5, move case_step as the first step in the dependency chain. This will improve the build summary tree. In test case 5, remove the dependency to heal_step, since it is not necessary.
2023-05-05Merge pull request #280 from arnon4/patch-1Chris Boesch
Fixed example syntax for inline else
2023-05-05Fixed example syntax for inline elseArnon
2023-05-04Merge branch 'main' of github.com:ratfactor/ziglingsDave Gauer
2023-05-04Ex 001 remove ancient script reference + wordingDave Gauer
2023-05-04test: remove obsolete comment in the heal functionManlio Perillo
Remove the comment about using POSIX patch variant, since we now use the -s option.
2023-05-04test: fix doc-commentsManlio Perillo
CheckStep, FailStep, fail, HealStep and heal incorrectly used a normal comment, instead of a doc-comment. Additionally, improve the documentation for FailStep and HealStep.
2023-05-04test: improve test case 1 and 2Manlio Perillo
In test case 1 and 2, remove the `i` variable and use `ex.number()` instead. In test case 2, when checking the exercise output from stderr, also check that stdout is empty and vice versa.
2023-05-04Merge pull request #265 from Arya-Elfren/methods-clarificationDave Gauer
Clarify the methods syntax sugar & a bit more
2023-05-04Merge pull request #264 from Arya-Elfren/float-clarificationDave Gauer
Clarify `f16` maths - closes #204
2023-05-03Merge branch 'ratfactor:main' into testingChris Boesch
2023-05-03Merge pull request #279 from perillo/refactor-zigling-step-2Chris Boesch
Refactor ZiglingStep
2023-05-03Added new flag 'run_test' to support test steps for test exercises.Chris Boesch
Also created a simple exercise '102_testing' to test the new flag. After the new build system is ready, we skip the exercise in the flow to finish the actual testing exercise.
2023-05-03build: improve coding style in ZiglingStepManlio Perillo
- Use an anonymous struct when initializing std.Build.Step. - Rename the builder parameter in the create method to b - Avoid lines too long Additionally: - In the run method, rename output to raw_output in order to make the next variable names shorter. - In the compile method, rename zig_file to path.
2023-05-03build: use @panic("OOM") instead of unreachableManlio Perillo
The code in ZiglingStep copied the error handling used in std.Build in the past. Use @panic("OOM") when the error is caused by the allocator failing to allocate memory.
2023-05-03build: improve the exercise output checkManlio Perillo
Make the error message consistent with the one in std.Build.RunStep, using the "=" character instead of "-" and correctly aligning the text.
2023-05-03build: don't use @This() in ZiglingStepManlio Perillo
Use ZiglingStep, instead. This is consistent with the coding style in std.Build.
2023-05-03build: remove ZiglingStep.builder fieldManlio Perillo
It is not necessary, since the builder is available in self.step.owner.
2023-05-03build: use Child.exec in ZiglingStep.runManlio Perillo
Update the run method to use Child.exec, instead of Child.spawn followed by Child.wait. This simplifies the code.
2023-05-03build: fix incorrect error handling in ZiglingStep.compileManlio Perillo
When handling the error from the eval method, some possible errors are ignored. The make method will only print the exercise hint and the help message. Print the unexpected error message, in the else prong. Note that FileNotFound can also be considered unexpected.