Code Monkey home page Code Monkey logo

Comments (12)

ratfactor avatar ratfactor commented on August 15, 2024 2

New README text:

Verify the installation and build number of zig like so:
$ zig version
0.8.0-dev.1065+xxxxxxxxx
...
A Note About Versions
The Zig language is under very active development. In order to be current, Ziglings tracks development builds of the Zig compiler rather than versioned release builds. The last stable release was 0.7.1, but Ziglings needs a dev build with pre-release version "0.8.0" and a build number at least as high as that shown in the example version check above.

It is likely that you'll download a build which is greater than the minimum.

Once you have a build of the Zig compiler that works with Ziglings, they'll continue to work together. But keep in mind that if you update one, you may need to also update the other.

New version fail message:

\ERROR: Sorry, it looks like your version of zig is too old. :-(
\
\Ziglings requires development build
\
\ 0.8.0-dev.1065
\
\or higher. Please download a development ("master") build from
\https://ziglang.org/download/

🤓

And just throwing this info out into the ether: when we update the Ziglings target build, there are now 3️⃣ places where it will need to change: one in the README and two in zig.build (until somebody figures out how to format strings all known revisions of Zig past, present, and future).

from ziglings.

mlawren avatar mlawren commented on August 15, 2024 1

Thanks for the deep investigation. Just another usability issue. When I attempt to build with the same old version of zig I get your new error message:

mark@mlwin:~/mark/Downloads/zig-windows-x86_64-0.8.0-dev.1059+79730e6f5/ziglings$ PATH=.. zig build 04
ERROR: Sorry, it looks like your version of zig is too old. :-(

Ziglings requires development build

    0.8.0-dev.1065

or higher. Please download a development ("master") build from
https://ziglang.org/download/
Cannot run step '04' because it does not exist
Usage: C:\Users\mark\Downloads\zig-windows-x86_64-0.8.0-dev.1059+79730e6f5\zig.exe build [steps] [options]

... [lots of text snipped]

But as you can see it doesn't stop after the error, attempting to run the step anyway (and producing a usage message along the way). Perhaps a harder exit is in order?

from ziglings.

ratfactor avatar ratfactor commented on August 15, 2024

It actually is...but it's super close. The minimum build we're targeting at the moment is 1065 and you've got 1059.

We should print the minimum we're accepting alongside the version you have to make this clearer.

from ziglings.

ratfactor avatar ratfactor commented on August 15, 2024

So, I got this to work...until I actually tested it with an older version.

The Catch-22 here is that the format string syntax changed between builds, so my attempt to print the old version number doesn't work with old versions. 🤣

I have attempted to reword the error message and README to make it clearer that even a lower build number can be too old.

I think I'll just leave this issue sitting here for another week or so in case any powerful Zig maestros happen to be wandering by and want to tackle the chicken-and egg task (and test thoroughly with a spectrum of Zig versions to make sure it works)!

from ziglings.

g-w1 avatar g-w1 commented on August 15, 2024

Zig version 0.8.0 doesn't exist. 0.8.0-dev.1059+79730e6f5 means that it is 0.8.0 minus the version number. So 0.7.1 plus a version. I have seen this confusion a lot lately.

from ziglings.

ratfactor avatar ratfactor commented on August 15, 2024

@g-w1 What does

0.8.0 minus the version number

mean? I don't think I've seen this versioning scheme before. Is this documented somewhere on ziglang.org? I didn't find anything in a cursory sweep.

And do you think we need to update any of the Ziglings wording to be more accurate/helpful?

Relevant part of README.md:

The Zig language is under very active development. Ziglings will attempt to be current, but not bleeding-edge. However, sometimes fundamental changes will happen. Ziglings will check for a minimum version and build number.

And the build.zig version warning:

ERROR: Sorry, it looks like your version of zig is too old. :-(

The README lists the minimum version and build number.

Thanks!

from ziglings.

g-w1 avatar g-w1 commented on August 15, 2024

@g-w1 What does

0.8.0 minus the version number

mean? I don't think I've seen this versioning scheme before. Is this documented somewhere on ziglang.org? I didn't find anything in a cursory sweep.

ziglang/zig#6509

I think its just to comply better with semver.

from ziglings.

ratfactor avatar ratfactor commented on August 15, 2024

@g-w1 Well, that turned out to be a bit of a rabbit hole. Time to close some browser tabs. 😆

If I read everything correctly, everything after the - in -dev.xxxxxx+xxxxxxx is all a pre-release tag. So, yeah, 0.8.0 is not a released version. That's true.

But would it be wrong to colloquially refer to the master builds as "version 0.8.0"?

from ziglings.

g-w1 avatar g-w1 commented on August 15, 2024

I think it would be wrong. 0.8.0 is not out yet. Perhaps we could call it nightly build or dev build. And to clear up confusion we should state that the current stable zig version is 0.7.1 and the dev build is what ziglings uses.

from ziglings.

ratfactor avatar ratfactor commented on August 15, 2024

@g-w1 Yup, that's a good point. I especially like the distinction between stable and dev when we can use that distinction to refer to what ziglings supports. 👍

I'll compose some new wording for the README and build.zig.

Thanks again!

from ziglings.

ratfactor avatar ratfactor commented on August 15, 2024

@mlawren Good catch! I never tried that. I believe I've got that fixed now. (Also thanks for reminding me that I could set PATH for a single command. I'm embarrassed to say that I was renaming Zig install directories to use old versions to test this. 😆 ).

from ziglings.

ratfactor avatar ratfactor commented on August 15, 2024

Gonna go ahead and close this one now. We seem to have a pretty good handle on versions now.

from ziglings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.