Attempt to make the version error and README clearer (#14)

This commit is contained in:
Dave Gauer 2021-02-14 19:25:35 -05:00
parent 03a09639c6
commit 4b8cb2e444
2 changed files with 13 additions and 8 deletions

View file

@ -32,7 +32,7 @@ Verify the installation and version of `zig` like so:
```bash ```bash
$ zig version $ zig version
0.8.0-dev.1065+<some hexadecimal string> 0.8.0-dev.1065+xxxxxxxxx
``` ```
Clone this repository with Git: Clone this repository with Git:
@ -52,14 +52,15 @@ $ zig build
The Zig language is under very active development. Ziglings will attempt to The Zig language is under very active development. Ziglings will attempt to
be current, but not bleeding-edge. However, sometimes fundamental changes be current, but not bleeding-edge. However, sometimes fundamental changes
will happen. Ziglings will check for a minimum version and build number will happen. Ziglings will check for a minimum version and build number.
(which is this one: `0.x.x-dev.<build number>`) and exit if your version of
Zig is too old. It is likely that you'll download a build which is greater (See Getting Started above for the current minimum.)
than the number in the example shown above in this README. That's okay!
It is likely that you'll download a build which is _greater_ than the minimum.
Once you have a version of the Zig compiler that works with your copy of Once you have a version of the Zig compiler that works with your copy of
Ziglings, they'll continue to work together forever. But if you update one, Ziglings, they'll continue to work together. But if you update one, you may
keep in mind that you may need to also update the other. need to also update the other.
## Advanced Usage ## Advanced Usage

View file

@ -271,7 +271,11 @@ pub fn build(b: *Builder) void {
// very old versions of Zig used warn instead of print. // very old versions of Zig used warn instead of print.
const stderrPrintFn = if (@hasDecl(std.debug, "print")) std.debug.print else std.debug.warn; const stderrPrintFn = if (@hasDecl(std.debug, "print")) std.debug.print else std.debug.warn;
stderrPrintFn( stderrPrintFn(
\\Error: Your version of zig is too old. Please download a master build from \\ERROR: Sorry, it looks like your version of zig is too old. :-(
\\
\\The README lists the minimum version and build number.
\\
\\Please download a master build from
\\https://ziglang.org/download/ \\https://ziglang.org/download/
\\ \\
, .{}); , .{});