Commit graph

813 commits

Author SHA1 Message Date
Chris Boesch
5865ed5f2e Merge pull request #340 from nchataing/fix-main-build
fix: main entry point is broken with version 0.11.0-dev.4228
2023-07-26 19:46:45 +02:00
Nicolas Chataing
51a88cccf7 fix: main entry point is broken with version 0.11.0-dev.4228 2023-07-25 14:59:17 +02:00
Chris Boesch
477f18ebfc Merge pull request #337 from kimshrier/exercise_096_typo
fix typo
2023-07-03 18:59:54 +02:00
Kim SHrier
db653d29ee fix typo 2023-07-03 02:06:40 -06:00
Chris Boesch
e142d40fb0 Update 078_sentinels3.zig
Changed description of @ptrCast
closes https://github.com/ratfactor/ziglings/issues/334
2023-06-29 21:32:44 +02:00
Chris Boesch
bddff7a0a6 Version updated 2023-06-27 18:49:28 +02:00
Chris Boesch
1070fe5b40 Merge pull request #333 from ratfactor/v3853
Revised exercises due to the changes of Zig version 0.11.0-dev.3853
2023-06-27 00:15:48 +02:00
Chris Boesch
7ad0f06a07 Compatibility checks temporarily disabled (2) 2023-06-27 00:03:16 +02:00
Chris Boesch
496953e9a8 Compatibility checks temporarily disabled 2023-06-27 00:00:53 +02:00
Chris Boesch
d864860201 Unit tests temporarily disabled 2023-06-26 23:55:58 +02:00
Chris Boesch
a5a36337e8 Revised exercises due to the changes of Zig version 0.11.0-dev.3853 2023-06-26 23:43:39 +02:00
Chris Boesch
c3aed336e7 Merge pull request #331 from ratfactor/tokenization
First tokenization exerice
2023-06-26 09:21:26 +02:00
Chris Boesch
a2b0b976a6 First tokenization exerice. 2023-06-26 00:54:39 +02:00
Chris Boesch
2705e16c36 Merge pull request #329 from lorrding/refactor-var-to-const
Change `var` to `const` in some exercises
2023-06-22 16:51:03 +02:00
lording
d52f360731 Update outdated comments 2023-06-22 12:11:24 +00:00
lording
3e502fe69b Merge branch 'main' into refactor-var-to-const 2023-06-22 09:48:10 +00:00
Chris Boesch
9499e12469 Merge pull request #328 from ratfactor/v3747
Changed to zig developer version 3747
2023-06-22 11:44:59 +02:00
lording
d2d3dfa277 var to const when posssible 2023-06-22 09:41:41 +00:00
Chris Boesch
bd4a48c3c9 Changed to zig developer version 3747. 2023-06-22 11:31:46 +02:00
Chris Boesch
40bedacfdf Merge pull request #327 from lorrding/patch_v0.11.0-dev.3747
Fix breaking change in builtin casts functions
2023-06-22 11:25:22 +02:00
lording
ccb580f95d Fix broken builtin name in exercise 96 2023-06-22 08:23:22 +00:00
lording
39952817b3 Fix broken builtin name in exercise 36 2023-06-22 08:23:01 +00:00
Chris Boesch
f09a87c348 Merge pull request #325 from ckafi/what-a-dilema
fix typo
2023-06-18 19:02:24 +02:00
Tobias Frilling
5984444489 fix typo 2023-06-17 09:34:37 +02:00
Chris Boesch
9c9671bb15 Merge pull request #323 from ratfactor/issue318
Issue318
2023-06-11 23:54:05 +02:00
Chris Boesch
2815574e35 Removed debug info. 2023-06-11 23:45:50 +02:00
Chris Boesch
7a16ed09ac Fixed missing comptime. 2023-06-11 23:41:42 +02:00
Chris Boesch
cac5770e3c Merge pull request #321 from ratfactor/issue317
Fixed description of @addWithOverflow
2023-06-10 22:13:24 +02:00
Chris Boesch
33d3cc1647 Fixed description of @addWithOverflow 2023-06-10 22:04:03 +02:00
Chris Boesch
80c92e3c94 closes https://github.com/ratfactor/ziglings/pull/311 2023-06-09 17:25:10 +02:00
Chris Boesch
947d1e4fbb Update README.md
Added Tokenization as ToDo
2023-05-31 23:34:41 +02:00
Chris Boesch
79f2b62774 Merge pull request #313 from chrboesch/colors
Changed error text to bold.
2023-05-30 21:54:49 +02:00
Chris Boesch
9151557d39 Changed error text to bold. 2023-05-30 21:45:33 +02:00
Chris Boesch
b84a2f5c69 Merge pull request #312 from pdietl/pdietl/fix_grammar
Change grammar: there's -> there are ex. 17
2023-05-30 21:34:46 +02:00
Chris Boesch
940482a07e Merge pull request #308 from perillo/refactor-zigling-step-more
Refactor ZiglingStep more
2023-05-30 20:20:53 +02:00
Pete Dietl
edcf904ca2 Change grammar: there's -> there are ex. 17 2023-05-27 01:28:30 +02:00
Chris Boesch
1482b82500 changed version number 2023-05-25 15:18:14 +02:00
Chris Boesch
763cdb10ca Merge pull request #309 from pseudocc/main
change std.debug.TTY to std.io.tty
2023-05-25 15:15:28 +02:00
pseudoc
192bd2e803 change std.debug.TTY to std.io.tty
Zig commit:     0f6fa3f20b3b28958921bd63a9a9d96468455e9c

std: Move std.debug.{TTY.Config,detectTTYConfig} to std.io.tty

Also get rid of the TTY wrapper struct, which was exlusively used as a
namespace - this is done by the tty.zig root struct now.

detectTTYConfig has been renamed to just detectConfig, which is enough
given the new namespace. Additionally, a doc comment had been added.
2023-05-25 18:04:36 +08:00
Manlio Perillo
0b4ad6e99e build: use the old color style
In the `Zigling.printError` method, use a bold red color for the "error:"
string and a dim red color for the error message.

In the `Zigling.check_output` method, use the old color style.
2023-05-22 11:49:46 +02:00
Manlio Perillo
3e38a4fc84 build: in ZiglingStep.check_output panic in case of OOM
This is necessary since, when trimLines returns `std.mem.Allocator.Error`,
no error message will be displayed to the user.

An alternative is to use `std.Build.Step.fail`, but using @panic("OOM")
is simpler and consistent with existing code.
2023-05-20 07:25:53 +02:00
Manlio Perillo
d0de9e5348 build: use std.Build.Step.fail to report errors
Have all error messages handled in a single place (printError), by using
the `std.Build.Step.fail` method.  Ensure that the first letter in the
error message is lower case and remove coloring, since it is done in the
`ZiglingStep.printError` method.

Additionally, in the `ZiglingStep.check_test` method, remove trailing
whitespace from stderr.
2023-05-19 19:27:44 +02:00
Manlio Perillo
699f877bd5 build: remove ZiglingStep.eval
Remove the `ZiglingStep.eval` method and the src/ipc.zig source code.
Use `Step.evalZigProcess`, instead. This greatly simplifies the code.

Print the error messages and error bundle in `ZiglingStep.make`, both in
case of error and success.

Additionally, remove the `ZiglingStep.is_testing` field, since it is no
longer necessary.
2023-05-19 19:27:33 +02:00
Chris Boesch
282c50834a Merge pull request #305 from perillo/improve-run-test
Improve running tests
2023-05-18 12:14:14 +02:00
Manlio Perillo
54d5186982 Enable again the unit tests 2023-05-15 15:45:28 +02:00
Manlio Perillo
9ab9ebf33f Refactor testing support
Following the implementation in `std.Build.Step.Compile, add the Kind
type to differentiate between a normal executable and a test executable
running zig tests.  Replace `Exercise.run_test` field with `kind`.

Compile the exercise in both the exe and test cases, reducing code
duplication.

Add the `check_output` and `check_test` methods in ZiglingStep, in order
to differentiate the code checking a normal executable and a test
executable.

Update the tests to correctly check both the exe and test cases.  Remove
the temporary code added in commit 832772c.
2023-05-15 15:36:31 +02:00
Chris Boesch
3dafa3518b Update README.md
Marked 'testing' as finished.
2023-05-15 01:01:27 +02:00
Chris Boesch
5cbaa0441f Merge pull request #304 from chrboesch/testing_exercise
Added testing exercise.
2023-05-15 01:00:28 +02:00
Chris Boesch
76ee4eb043 Unit tests temporarily disabled. 2023-05-15 00:54:46 +02:00
Chris Boesch
c3a73b8e2b Added testing exercise. 2023-05-15 00:06:15 +02:00